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
    
  
  
    
  | ---------------------------------------------------------------------------------------------------- | |
| tcpdump -s 0 #capture entire etherner header and IP packet | |
| tcpdump -ni tap55ec3c7f-91 ip6 #locate the ICMPv6 packets | |
| tcpdump -s0 -n -i any -w /tmp/$(hostname)-smbtrace.pcap #if the SMB client or SMB server is a Unix host,Troubleshooting Server Message Block (SMB) | |
| tcpdump -D #Print the list of the network interfaces available on the system and on which tcpdump can capture packet | |
| tcpdump -X -vvv -n -i eth0 | 
  
    
      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
    
  
  
    
  | var newLine = []byte("\n")[0] | |
| var goPathPrefix = "\t/go/src/" | |
| var goUsersPrefix = "\t/Users/" | |
| func dumpStacktrace(skipLines int) []byte { | |
| stack := debug.Stack() | |
| init, lines := 0, 0 | |
| // First pass: seek stack start skiping lines if necessary | |
| if skipLines > 0 { | 
  
    
      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
    
  
  
    
  | # Run tests for package in current location | |
| go test -run=. -bench=. -benchtime=5s -count 5 -benchmem -cpuprofile=cpu.out -memprofile=mem.out -trace=trace.out ./ | tee bench.txt | |
| go tool pprof -http :8080 cpu.out | |
| go tool pprof -http :8081 mem.out | |
| go tool trace trace.out | |
| go tool pprof $FILENAME.test cpu.out | |
| # (pprof) list <func name> | |
| # go get -u golang.org/x/perf/cmd/benchstat |