Skip to content

Instantly share code, notes, and snippets.

View PhirePhly's full-sized avatar

Kenneth Finnegan PhirePhly

View GitHub Profile
@PhirePhly
PhirePhly / ntp.conf
Created May 28, 2014 20:19
Needed config lines for strata 1 NTP servers
# NEMA time from GPSd
server 127.127.28.0
fudge 127.127.28.0 refid GPS
# 1PPS from GPSd
server 127.127.28.1 prefer
fudge 127.127.28.1 refid GPS1
kenneth@odin:~$ ifconfig -a
em0 Link encap:Ethernet HWaddr 00:22:4d:ad:ad:be
inet addr:10.44.1.127 Bcast:10.44.1.255 Mask:255.255.255.0
inet6 addr: fe80::222:4dff:fead:adbe/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:33044 errors:0 dropped:0 overruns:0 frame:0
TX packets:23402 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:38380796 (38.3 MB) TX bytes:1651076 (1.6 MB)
Interrupt:17 Memory:80020000-80040000
kenneth@thor:~$ ntpq -pn -c rv
remote refid st t when poll reach delay offset jitter
==============================================================================
-205.233.73.201 72.214.41.45 3 u 58 64 377 88.240 7.810 0.506
-85.25.148.4 179.47.64.217 2 u 50 64 377 176.591 5.172 5.263
+72.87.88.202 64.250.229.100 2 u 59 64 377 96.172 2.468 1.348
+208.97.140.69 132.239.1.6 2 u 50 64 377 20.079 2.156 3.425
-91.189.89.199 140.203.204.77 2 u 57 64 377 163.520 5.535 0.202
*127.127.28.1 .GPS1. 0 l 15 64 377 0.000 0.007 0.010
239.192.6.87 .MCST. 16 u - 64 0 0.000 0.000 0.000
@PhirePhly
PhirePhly / ax25_headerlengthcheck.patch
Created May 23, 2014 07:53
Patch against aprx svn r593 fixing that empty path trackers are never "recently heard"
diff -u trunk/interface.c kwf/interface.c
--- trunk/interface.c 2014-05-23 00:42:35.275061632 -0700
+++ kwf/interface.c 2014-05-23 00:47:03.346194971 -0700
@@ -1013,7 +1013,7 @@
if (debug) printf("interface_receive_ax25() from %s axlen=%d tnc2len=%d\n",aif->callsign,axlen,tnc2len);
- if (axaddrlen <= 14) return; // SOURCE>DEST without any VIAs..
+ if (axaddrlen < 14) return; // Malformed packet without at least SOURCE>DEST.
// Note: Above one disables MICe destaddress-SSID embedded
@PhirePhly
PhirePhly / crawl_archive.sh
Created March 30, 2014 22:25
Parses a Pipermail archive into an mbox file
#!/bin/bash
# Kenneth Finnegan, 2014
#
# Crawls a Pipermail GNU Mailman archive
# and parses it into a local mbox file to be
# opened by any standard mail user agent (mail, mutt, etc)
# example@example$ mutt -f mailinglist.mbox
ARCHIVEURL="http://www.tapr.org/pipermail/aprssig/"
OUTMBOX=mailinglist.mbox
@PhirePhly
PhirePhly / gist:9606989
Created March 17, 2014 19:57
breakapart.sh
#!/bin/bash
ls keys/ >keylist.txt
seq 10 99 |
while read KEYSUFFIX; do
mkdir -p chunks/keys.$KEYSUFFIX
grep -e "$KEYSUFFIX\.key" keylist.txt |
while read KEYFILE; do
mv keys/$KEYFILE chunks/keys.$KEYSUFFIX/
@PhirePhly
PhirePhly / multicast.ntp.conf
Last active January 3, 2016 01:39
Sample config for peering multicast NTP servers
# /etc/ntp.conf for multicast servers
# Kenneth Finnegan, 2014
# Logging of stats, etc
driftfile /var/lib/ntp/ntp.drift
statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
@PhirePhly
PhirePhly / gist:6505410
Last active December 22, 2015 17:19
Google TraceRoute from Burning Man
traceroute to google.com (74.125.239.7), 64 hops max, 52 byte packets
1 w6bhzubnt2.lan (10.75.16.1) 2.609 ms 1.901 ms 1.685 ms
2 vlan169.gw-noc.nv.burningman.com (100.96.169.1) 23.192 ms 37.225 ms *
3 ge-0-0-3.gw-tower.nv.burningman.com (162.212.144.25) 43.990 ms 33.872 ms 36.477 ms
4 * ge0-23.switch02.eagle-ridge.hdiss.net (206.230.61.49) 44.925 ms 26.257 ms
5 ge0-1.core01.eagle-ridge.hdiss.net (206.230.60.137) 36.504 ms 33.675 ms 26.209 ms
6 ge0-1.core01.virgina-peak.hdiss.net (206.230.60.33) 40.050 ms 27.245 ms 77.479 ms
7 pos1-0.core01.red-peak.hdiss.net (206.230.60.145) 74.894 ms 40.548 ms 44.026 ms
8 ge0-3.edge01.red-peak.hdiss.net (206.230.60.133) 53.654 ms 33.060 ms 29.372 ms
9 sl-gw32-stk-1-2.sprintlink.net (144.223.50.169) 59.124 ms 91.725 ms 37.068 ms
@PhirePhly
PhirePhly / 36Disks.txt
Created May 13, 2013 16:48
Ever wonder what it looks like when a Linux box has 36 hard drives?
kenneth@KWF2:~$ ls /dev/sd*
/dev/sda /dev/sda1 /dev/sda2 /dev/sdaa /dev/sdab /dev/sdac /dev/sdad
/dev/sdae /dev/sdaf /dev/sdag /dev/sdah /dev/sdai /dev/sdaj /dev/sdb
/dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh /dev/sdi /dev/sdj
/dev/sdk /dev/sdl /dev/sdm /dev/sdn /dev/sdo /dev/sdp /dev/sdq /dev/sdr
/dev/sds /dev/sdt /dev/sdu /dev/sdv /dev/sdw /dev/sdx /dev/sdy /dev/sdz
kenneth@KWF2:~$ cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md0 : active raid6 sdaj[34] sdai[33] sdah[32] sdag[31] sdaf[30] sdae[29]
@PhirePhly
PhirePhly / geodecpuinfo
Created September 14, 2012 22:34
/proc/cpuinfo from a National Semi Geode box
kenneth@geode:~$ cat /proc/cpuinfo
processor : 0
vendor_id : Geode by NSC
cpu family : 5
model : 9
model name : Geode(TM) Integrated Processor by National Semi
stepping : 2
cpu MHz : 300.670
cache size : 16 KB
fdiv_bug : no