Skip to content

Instantly share code, notes, and snippets.

View sdstrowes's full-sized avatar

Stephen Strowes sdstrowes

View GitHub Profile
sds@islay:130:~$ traceroute 194.71.107.15
traceroute to 194.71.107.15 (194.71.107.15), 64 hops max, 52 byte packets
1 cpc2-broo7-2-0-gw.14-2.cable.virginmedia.com (86.11.184.1) 24.203 ms 11.656 ms 9.002 ms
2 renf-core-1a-ae3-3586.network.virginmedia.net (82.23.161.237) 15.601 ms 11.151 ms 7.833 ms
3 renf-core-2a-ae2-0.network.virginmedia.net (213.105.175.221) 8.516 ms 11.233 ms 7.786 ms
4 manc-bb-1c-ae13-0.network.virginmedia.net (62.253.174.37) 38.311 ms 13.866 ms 18.403 ms
5 manc-bb-1b-ae6-0.network.virginmedia.net (213.105.159.89) 26.507 ms 14.465 ms 15.698 ms
6 know-core-1b-pc200.network.virginmedia.net (195.182.178.150) 28.728 ms 21.815 ms 17.029 ms
7 * * *
8 * * *
sds@carney:0:~$ last -x
sds pts/0 islay.local Sun Apr 21 21:16 still logged in
runlevel (to lvl 2) 2.6.38-8-generic Sun Apr 21 21:15 - 21:22 (00:06)
reboot system boot 2.6.38-8-generic Sun Apr 21 21:15 - 21:22 (00:06)
shutdown system down 2.6.38-8-generic Wed Nov 7 15:42 - 21:15 (165+04:33)
runlevel (to lvl 0) 2.6.38-8-generic Wed Nov 7 15:42 - 15:42 (00:00)
sds pts/0 islay Wed Nov 7 15:42 - down (00:00)
sds pts/2 islay Thu Nov 1 13:20 - 19:27 (1+06:07)
sds pts/0 islay Thu Nov 1 11:13 - 13:21 (1+02:08)
sds@ubuntu:~$ cat /etc/issue
Ubuntu 10.04.4 LTS \n \l
sds@ubuntu:~$ uname -a
Linux ubuntu 2.6.32-45-server #104-Ubuntu SMP Tue Feb 19 21:35:01 UTC 2013 x86_64 GNU/Linux
sds@ubuntu:~$ bprobe --version
Welcome to bprobe v.1.0.0fi919 ($Revision: 1983 $) for x86_64-unknown-linux-gnu
Built on 03/05/13 03:02:46 AM
sds@ubuntu:~/test$ cat segfault.c
#include <stdio.h>
int main(void)
{
char* foo = NULL;
printf("%c\n", *foo);
return 0;
}
sds@ubuntu:~/test$
sds@ubuntu:~/test$ cat spin.c
#include <unistd.h>
int main(void)
{
while (1) {
sleep(1);
}
return 0;
}
sds@ubuntu-12-04:~$ gdb ./spin
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
sds@islay:0:~$ ping boundary.com
PING boundary.com (66.228.54.120): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
64 bytes from 66.228.54.120: icmp_seq=5 ttl=51 time=138.789 ms
Request timeout for icmp_seq 6
Request timeout for icmp_seq 7
@sdstrowes
sdstrowes / gist:9763713
Created March 25, 2014 15:06
control t
sds@becomerich-lm:~$ ping -q 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
^T
load: 1.23 cmd: ping 16805 running 0.00u 0.00s
2/2 packets received (100.0%) 121.688 min / 128.423 avg / 135.159 max
^T
load: 1.22 cmd: ping 16805 running 0.00u 0.00s
6/6 packets received (100.0%) 121.688 min / 172.922 avg / 235.270 max
^C
--- 8.8.8.8 ping statistics ---
sds@uist:/tmp$ valgrind --tool=massif --pages-as-heap=yes --massif-out-file=massif.out awk '!x[$0]++' blah.txt > /tmp/foo
==2388== Massif, a heap profiler
==2388== Copyright (C) 2003-2012, and GNU GPL'd, by Nicholas Nethercote
==2388== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==2388== Command: awk !x[$0]++ blah.txt
==2388==
==2388==
sds@uist:/tmp$ ms_print massif.out | head -30
--------------------------------------------------------------------------------
Command: awk !x[$0]++ blah.txt
@sdstrowes
sdstrowes / gist:2c1ca212265844716b56
Created June 19, 2014 04:19
valgrind on awk in seconds
sds@uist:/tmp$ valgrind --tool=massif --pages-as-heap=yes --massif-out-file=massif.out --time-unit=ms awk '!x[$0]++' blah.txt > /tmp/foo
==2429== Massif, a heap profiler
==2429== Copyright (C) 2003-2012, and GNU GPL'd, by Nicholas Nethercote
==2429== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==2429== Command: awk !x[$0]++ blah.txt
==2429==
==2429==
sds@uist:/tmp$ ms_print massif.out | head -30
--------------------------------------------------------------------------------
Command: awk !x[$0]++ blah.txt