This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
# TODO: Add a queue element for generated pids so that the | |
# producer may run in parallel with consumer loop | |
# Some function that takes a long time to process | |
longprocess() { | |
# Sleep up to 6 seconds | |
sleep $((3 + RANDOM % 3)) | |
# Randomly exit with 0 or 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
# Extracts unresolved symbols for a Loadable Kernel Module (LKM) | |
# then checks systemtap to see if those symbols are available | |
# in the kernel symbol map, returning only those which are able | |
# to be tapped. | |
# Note: one may also append a '?' to the function | |
# in the stap script to denote optional probes: | |
# probe kernel.function("foo")? , kernel.function("bar"), ... { println(pp()) } | |
# or check faster with: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Selected solutions for https://github.com/iovisor/bcc/blob/master/docs/tutorial_bcc_python_developer.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# parallel testing | |
# | |
# arg: basename of the test | |
# output: results/$basename_`date +"%m-%d-%H_%m_%S"`/ | |
# assumes we are in same directory with afs_dir_test_setup.sh | |
pids="" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Traces afs_linux_write_begin() into the kernel grab_cache_page_write_begin() | |
global traceme | |
function printf_indent(str, parm_str) { | |
printf ("%s -> %s P %s\n", thread_indent(1), str, parm_str); | |
} | |
function printf_deindent(str, ret_str) { | |
printf ("%s <- %s R %s\n", thread_indent(-1), str, ret_str); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Inject page allocation failures only for a specific module | |
# Requires debugfs and kernel fault injection framework enabled | |
FAILTYPE=fail_page_alloc | |
module=$1 | |
if [ -z $module ] | |
then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Automatically generated file; DO NOT EDIT. | |
# Linux/x86 4.4.134 Kernel Configuration | |
# | |
# CONFIG_64BIT is not set | |
CONFIG_X86_32=y | |
CONFIG_X86=y | |
CONFIG_INSTRUCTION_DECODER=y | |
CONFIG_PERF_EVENTS_INTEL_UNCORE=y | |
CONFIG_OUTPUT_FORMAT="elf32-i386" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
make[3]: Leaving directory '/home/jhg/work/lmu5530_sdk/openwrt/tools/bison' | |
make[3]: Entering directory '/home/jhg/work/lmu5530_sdk/openwrt/tools/mklibs' | |
(cd /home/jhg/work/lmu5530_sdk/build_dir/host/mklibs-0.1.35; rm -f aclocal.m4; if [ -f ./configure.ac ] || [ -f ./configure.in ]; then [ -d ./autom4te.cache ] && rm -rf autom4te.cache; [ -e ./config.rpath ] || ln -s /home/jhg/work/lmu5530_sdk/scripts/config.rpath ./config.rpath; touch NEWS AUTHORS COPYING ABOUT-NLS ChangeLog; AUTOM4TE=/home/jhg/work/lmu5530_sdk/staging_dir/host/bin/autom4te AUTOCONF=/home/jhg/work/lmu5530_sdk/staging_dir/host/bin/autoconf AUTOMAKE=/home/jhg/work/lmu5530_sdk/staging_dir/host/bin/automake ACLOCAL=/home/jhg/work/lmu5530_sdk/staging_dir/host/bin/aclocal AUTOHEADER=/home/jhg/work/lmu5530_sdk/staging_dir/host/bin/autoheader LIBTOOLIZE=/home/jhg/work/lmu5530_sdk/staging_dir/host/bin/libtoolize LIBTOOL=/home/jhg/work/lmu5530_sdk/staging_dir/host/bin/libtool M4=/home/jhg/work/lmu5530_sdk/staging_dir/host/bin/m4 AUTOPOINT=true /home/j |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:16.04 | |
# Install build dependencies (and vim for editing) | |
RUN apt-get -qq update \ | |
&& apt-get install -y git build-essential wget make libncurses-dev flex bison gperf python python-serial python-dev libssl-dev libffi-dev vim \ | |
&& apt-get clean \ | |
&& wget https://bootstrap.pypa.io/get-pip.py \ | |
&& python get-pip.py \ | |
&& ln -s /usr/local/bin/pip /usr/bin/pip \ | |
&& pip install --upgrade setuptools\ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Resolve by hack ConnMan + OpenVPN Client inability to add/del default route | |
# TODO: Get this packaged for upstream somewhere OpenVPN, ConnMan, OSMC, *Elec | |
# perhaps with systemd after openvpn goes up. | |
### Example output of openvpn client: | |
# Fri Jun 14 00:04:39 2019 /sbin/ip route add 0.0.0.0/0 via 192.168.xxx.1 | |
# RTNETLINK answers: File exists | |
# Fri Jun 14 00:04:39 2019 ERROR: Linux route add command failed: external program exited with error status: 2 | |