- tcpprep, first:C2S, Second S2C, Generate cache file tcpprep –auto=first –pcap=icmp.pcap –cachefile=icmp_in.cache
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
| # On Controller node | |
| $ tcpdump -envi eth0 | grep -i gre | |
| $ tcpdump -envi br-int | |
| $ tcpdump -envi br-tun | |
| $ ip netns exec qrouter-d72adddf-4c02-4916-ae6d-16bfdaf59d99 tcpdump -nn -i qr-63ea2815-b5 icmp | |
| $ ip netns exec qrouter-d72adddf-4c02-4916-ae6d-16bfdaf59d99 tcpdump -nn -i qg-e7110dba-a9 icmp | |
| $ tcpdump -envi 192.168.122.163 | |
| $ tcpdump -envi br-ex | |
| $ tcpdump -i eth0 -n arp or icmp |
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
| find dirname -type f | parallel 'nfdump -r {} "host $ip"' | tee /tmp/out.txt |
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/local/python2.7.2/bin/python | |
| # $Id$ | |
| # Author: <[email protected]> | |
| # Purpose: Run nfdump for flow exports so searches happen in splunk for atleast the IP hit | |
| # Created: Wed Aug 28 08:50:27 CDT 2013 | |
| import sys | |
| import unittest | |
| import argparse | |
| import subprocess, datetime |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
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
| input { | |
| syslog = { | |
| type => syslog | |
| port => 514 | |
| } | |
| } | |
| filter { | |
| grok { | |
| type => "auditd" | |
| pattern => [" AUDIT type=%{WORD:audit_type} msg=audit\(%{NUMBER:audit_epoch}:%{NUMBER:audit_coun |
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
| _docker_procs() | |
| { | |
| local procs | |
| procs="$(docker ps -q)" | |
| COMPREPLY=( $(compgen -W "${procs}" -- ${cur}) ) | |
| } | |
| _docker_imgs() | |
| { | |
| local repos tags imgs |
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 | |
| # by TB : 2012-10-12 | |
| if [ "$USER" != "root" ] | |
| then | |
| echo "You must be root to execute this script (in order to instruct the kernel to drop the cache)!" | |
| exit 1 | |
| fi | |
| if [ -z "$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
| #!/bin/bash -e | |
| # Little program that measure the speed in MBps of a file transfer occuring in the current directory | |
| LASTTIME=$(date +%s) | |
| LASTSIZE=$(du -bs . 2> /dev/null | awk '{ print $1 }') | |
| TOTALSIZE=0 | |
| TOTALTIME=0 | |
| while true |
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 | |
| # by TB : 2012-10-12 | |
| if [ "$USER" != "root" ] | |
| then | |
| echo "You must be root to execute this script (in order to instruct the kernel to drop the cache)!" | |
| exit 1 | |
| fi | |
| if [ -z "$1" ] |