Skip to content

Instantly share code, notes, and snippets.

View silver2row's full-sized avatar
🫒
Cough, blur, dang!

set_ silver2row

🫒
Cough, blur, dang!
View GitHub Profile
strace -ff sudo apt install python3-numpy
execve("/usr/bin/sudo", ["sudo", "apt", "install", "python3-numpy"], 0x7ffd969cd7b0 /* 21 vars */) = 0
brk(NULL) = 0x55ef1ab7c000
fcntl(0, F_GETFD) = 0
fcntl(1, F_GETFD) = 0
fcntl(2, F_GETFD) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5a191ba000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/libexec/sudo/glibc-hwcaps/x86-64-v3/libaudit.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/libexec/sudo/glibc-hwcaps/x86-64-v3/", 0x7fffdb112520, 0) = -1 ENOENT (No such file or directory)
@silver2row
silver2row / .zip
Created July 25, 2024 03:58
.zip of tracing
[ 0.000000] Linux version 6.6.36.3-microsoft-standard-WSL2 (root@39abeb63c66c) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) #1 SMP PREEMPT_DYNAMIC Sat Jun 29 07:01:04 UTC 2024
[ 0.000000] Command line: initrd=\initrd.img WSL_ROOT_INIT=1 panic=-1 nr_cpus=4 hv_utils.timesync_implicit=1 earlycon=uart8250,io,0x3f8,115200 console=hvc0 debug pty.legacy_count=0
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009ffff] usable
[ 0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000e0fff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000001fffff] ACPI data
[ 0.000000] BIOS-e820: [mem 0x0000000000200000-0x00000000f7ffffff] usable
@silver2row
silver2row / AM335x_PRU.cmd
Created November 9, 2021 00:34 — forked from jadonk/AM335x_PRU.cmd
PRU programming with Debian Stretch BeagleBoard.org IoT 2017-06-11 image
/****************************************************************************/
/* AM335x_PRU.cmd */
/* Copyright (c) 2015 Texas Instruments Incorporated */
/* */
/* Description: This file is a linker command file that can be used for */
/* linking PRU programs built with the C compiler and */
/* the resulting .out file on an AM335x device. */
/****************************************************************************/
-cr /* Link using C conventions */
@silver2row
silver2row / gpsDataWrite.py
Created April 26, 2019 19:28 — forked from jilkka/gpsDataWrite.py
Write GPS data to a file using Python and GPSd
# Runs perfectly using Python 2.7.3 on Raspian.
# GPSD Official Documentation:
# http://www.catb.org/gpsd/gpsd_json.html
# Original GpsPoller script by Dan Mandle:
# http://www.danmandle.com/blog/getting-gpsd-to-work-with-python/
# Original readCoordinates funtion by recantha:
# https://github.com/recantha/picorder-v3/blob/master/picorder.py
# Additional modifications by Jacob Ilkka:
# http://blog.jacobilkka.com/python-gps-data-writer/
@silver2row
silver2row / gpioinfo
Created September 5, 2018 01:56
RE: BBB and gpioinfo from libgpiod
debian@beaglebone:~$ gpioinfo
gpiochip0 - 32 lines:
line 0: "MDIO_DATA" unused input active-high
line 1: "MDIO_CLK" unused input active-high
line 2: "SPI0_SCLK" "P9_22" input active-high [used]
line 3: "SPI0_D0" "P9_21" input active-high [used]
line 4: "SPI0_D1" "P9_18" input active-high [used]
line 5: "SPI0_CS0" "P9_17" input active-high [used]
line 6: "SPI0_CS1" "cd" input active-low [used]
line 7: "ECAP0_IN_PWM0_OUT" "P9_42" input active-high [used]
@silver2row
silver2row / filename.py
Created April 24, 2018 19:39
Getting ideas for routine check-up...strace!
2088 stat64("/usr/lib/python2.7", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
2088 stat64("/usr/lib/python2.7", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
2088 stat64("/usr/lib/python2.7/site", 0xbe8d4320) = -1 ENOENT (No such file or directory)
2088 open("/usr/lib/python2.7/site.arm-linux-gnueabihf.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
2088 open("/usr/lib/python2.7/site.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
2088 open("/usr/lib/python2.7/sitemodule.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
2088 open("/usr/lib/python2.7/site.py", O_RDONLY|O_LARGEFILE) = 3
2088 fstat64(3, {st_mode=S_IFREG|0644, st_size=19947, ...}) = 0
2088 open("/usr/lib/python2.7/site.pyc", O_RDONLY|O_LARGEFILE) = 4
@silver2row
silver2row / MotorBridge.py
Created February 13, 2018 22:35
strace.log for MotorBridge.py
2474 execve("/usr/bin/python", ["python", "./MotorBridge.py"], [/* 15 vars */]) = 0
2474 brk(NULL) = 0x145d000
2474 uname({sysname="Linux", nodename="beaglebone", ...}) = 0
2474 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
2474 mmap2(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6fe5000
2474 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
2474 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
2474 fstat64(3, {st_mode=S_IFREG|0644, st_size=24105, ...}) = 0
2474 mmap2(NULL, 24105, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6fdf000
2474 close(3) = 0
@silver2row
silver2row / pusher
Created October 11, 2017 12:00
Getting Pusher to work on a sudo pip install pusher
Collecting pusher
Downloading pusher-1.7.2.tar.gz (155kB)
100% |████████████████████████████████| 163kB 51kB/s
Collecting six (from pusher)
Downloading six-1.11.0-py2.py3-none-any.whl
Collecting requests>=2.3.0 (from pusher)
Downloading requests-2.18.4-py2.py3-none-any.whl (88kB)
100% |████████████████████████████████| 92kB 93kB/s
Collecting urllib3 (from pusher)
Downloading urllib3-1.22-py2.py3-none-any.whl (132kB)
3855 read(8, "s 0 0\ncgroup /sys/fs/cgroup/free"..., 1024) = 940
3855 open("/sys/devices/platform/ocp/ocp:P8_13_pinmux/state", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
3855 open("/sys/devices/platform/ocp", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 4
3855 open("/sys/devices/platform/ocp/48304000.epwmss", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 4
3855 open("/sys/devices/platform/ocp/48304000.epwmss/48304200.pwm/pwm", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 4
3855 stat64("/sys/devices/platform/ocp/48304000.epwmss/48304200.pwm/pwm/pwmchip6/pwm1", 0xbea9ff10) = -1 ENOENT (No such file or directory)
3855 open("/sys/devices/platform/ocp/48304000.epwmss/48304200.pwm/pwm/pwmchip6/export", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
3855 stat64("/sys/devices/platform/ocp/48304000.epwmss/48304200.pwm/pwm/pwmchip6/pwm1", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
3855 open("/sys/devices/platform/ocp/48304000.epwmss/48304200.pwm/pwm/pwmchip6/pwm1/period", O_RDWR) = 4
3855 op