Skip to content

Instantly share code, notes, and snippets.

View anarazel's full-sized avatar

Andres Freund anarazel

View GitHub Profile
ACPI Warning: \_SB.PCI0.GFX0._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requ>
ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI>
pci 0000:01:00.0: optimus capabilities: enabled, status dynamic power, hda bios codec su>
VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.PEG0.PEGP handle
nouveau: detected PR support, will not use DSM
nouveau 0000:01:00.0: enabling device (0002 -> 0003)
nouveau 0000:01:00.0: NVIDIA TU117 (167000a1)
nouveau 0000:01:00.0: bios: version 90.17.31.00.26
nouveau 0000:01:00.0: fb: 4096 MiB GDDR5
nouveau 0000:01:00.0: fb: VPR locked, but no scrubber binary!
[ 2465.619] _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
[ 2465.619] _XSERVTransMakeAllCOTSServerListeners: server already running
[ 2465.620] (--) Log file renamed from "/var/log/Xorg.pid-18392.log" to "/var/log/Xorg.1.log"
[ 2465.620]
X.Org X Server 1.20.7
X Protocol Version 11, Revision 0
[ 2465.620] Build Operating System: Linux 4.19.0-6-amd64 x86_64 Debian
[ 2465.620] Current Operating System: Linux alap5 5.5.0-andres-06886-g050b83aa3110-dirty #21 SMP Mon Feb 3 03:26:24 PST 2020 x86_64
[ 2465.620] Kernel command line: BOOT_IMAGE=/vmlinuz-5.5.0-andres-06886-g050b83aa3110-dirty root=/dev/mapper/alap5-root ro apparmor=0 rd.luks.options=discard systemd.show_status=1 i915.fastboot=1 i915.modeset=1 psmouse.synaptics_intertouch=1
[ 2465.620] Build Date: 05 February 2020 04:27:36PM
Feb 06 11:17:09 alap5 kernel: microcode: microcode updated early to revision 0xca, date = 2019-10-03
Feb 06 11:17:09 alap5 kernel: Linux version 5.5.0-andres-09561-gf8ef83909441-dirty (andres@alap5) (gcc version 9.2.1 20200203 (Debian 9.2.1-28)) #24 SMP Wed Feb 5 16:21:56 PST 2020
Feb 06 11:17:09 alap5 kernel: Command line: BOOT_IMAGE=/vmlinuz-5.5.0-andres-09561-gf8ef83909441-dirty root=/dev/mapper/alap5-root ro apparmor=0 rd.luks.options=discard systemd.show_status=1 i915.fastboot=1 i915.modeset=1 psmouse.synaptics_intertouch=1
Feb 06 11:17:09 alap5 kernel: x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
Feb 06 11:17:09 alap5 kernel: x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
Feb 06 11:17:09 alap5 kernel: x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
Feb 06 11:17:09 alap5 kernel: x86/fpu: Supporting XSAVE feature 0x008: 'MPX bounds registers'
Feb 06 11:17:09 alap5 kernel: x86/fpu: Supporting XSAVE feature 0x010: 'MPX CSR'
Feb 06 11:17:09 alap5 kernel: x86/fpu:
Feb 06 13:50:36 alap5 kernel: microcode: microcode updated early to revision 0xca, date = 2019-10-03
Feb 06 13:50:36 alap5 kernel: Linux version 5.5.0-andres-09828-g4c6ef1517061-dirty (andres@alap5) (gcc version 9.2.1 20200203 (Debian 9.2.1-28)) #26 SMP Thu Feb 6 13:36:12 PST 2020
Feb 06 13:50:36 alap5 kernel: Command line: BOOT_IMAGE=/vmlinuz-5.5.0-andres-09828-g4c6ef1517061-dirty root=/dev/mapper/alap5-root ro apparmor=0 rd.luks.options=discard systemd.show_status=1 i915.fastboot=1 i915.modeset=1 psmouse.synaptics_intertouch=1
Feb 06 13:50:36 alap5 kernel: x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
Feb 06 13:50:36 alap5 kernel: x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
Feb 06 13:50:36 alap5 kernel: x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
Feb 06 13:50:36 alap5 kernel: x86/fpu: Supporting XSAVE feature 0x008: 'MPX bounds registers'
Feb 06 13:50:36 alap5 kernel: x86/fpu: Supporting XSAVE feature 0x010: 'MPX CSR'
Feb 06 13:50:36 alap5 kernel: x86/fpu:
@anarazel
anarazel / kernel.log
Created February 12, 2020 22:12
kernel log of boot on nv117 mobile w/ drm.debug=0x16 debug=outp=trace
This file has been truncated, but you can view the full file.
Feb 12 14:05:48 alap5 kernel: e820: reserve RAM buffer [mem 0xafd10000-0xafffffff]
Feb 12 14:05:48 alap5 kernel: e820: reserve RAM buffer [mem 0xb8800000-0xbbffffff]
Feb 12 14:05:48 alap5 kernel: e820: reserve RAM buffer [mem 0x841000000-0x843ffffff]
Feb 12 14:05:48 alap5 kernel: Bluetooth: Core ver 2.22
Feb 12 14:05:48 alap5 kernel: NET: Registered protocol family 31
Feb 12 14:05:48 alap5 kernel: Bluetooth: HCI device and connection manager initialized
Feb 12 14:05:48 alap5 kernel: Bluetooth: HCI socket layer initialized
Feb 12 14:05:48 alap5 kernel: Bluetooth: L2CAP socket layer initialized
Feb 12 14:05:48 alap5 kernel: Bluetooth: SCO socket layer initialized
Feb 12 14:05:48 alap5 kernel: NetLabel: Initializing
@anarazel
anarazel / memview.sql
Created October 9, 2020 16:16
memory details view for postgres implemented as a dirty hack
DROP VIEW IF EXISTS mem_raw;
CREATE VIEW mem_raw AS
SELECT pid,
(
SELECT json_object_agg(m[1], m[2])
FROM
pg_read_file(format('/proc/%s/status', pid)) s(smaps),
regexp_matches(smaps, '^([a-zA-Z][^:]+):\s+(.*)$', 'ng') m
) AS status_split
,(
#include <pthread.h>
#include <stdio.h>
#include <stdint.h>
#include <unistd.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#define NTHREADS 40
#!/usr/bin/env python3
import os
import sys
import re
from csv_helper import csv
import collections
import datetime
import signal
5 seconds per test
O_DIRECT supported on this platform for open_datasync and open_sync.
Compare file sync methods using one 8kB write:
(in wal_sync_method preference order, except fdatasync is Linux's default)
open_datasync 522565.439 ops/sec 2 usecs/op
fdatasync n/a
fsync 221.680 ops/sec 4511 usecs/op
fsync_writethrough 244.217 ops/sec 4095 usecs/op
open_sync n/a
SeaBIOS (version 1.8.2-google)
Total RAM Size = 0x00000000f0000000 = 3840 MiB
CPUs found: 1 Max CPUs supported: 1
found virtio-scsi at 0:3
virtio-scsi vendor='Google' product='PersistentDisk' rev='1' type=0 removable=0
virtio-scsi blksize=512 sectors=48234496 = 23552 MiB
drive 0x000f2320: PCHS=0/0/0 translation=lba LCHS=1024/255/63 s=48234496
Sending Seabios boot VM event.
Booting from Hard Disk 0...
Malformed line (7):