System/Network Measuring/Monitoring Theory & Tools

System/Network Measuring/Monitoring Theory & Tools

2012-03-07. Category & Tags: Leading, Soft&Skills Leading, Soft&Skills, Measurement, 系统, 网络, 监控, 测量

See also: Network Hardware - Fiber: /fiber.
NMAP: /nmap.

Private IPv4 Network & Ranges #

  • 10.0.0.0/8 ( 10.0.0.0 - 10.255.255.255 );
  • 172.16.0.0/12 ( 172.16.0.0 - 172.31.255.255 );
  • 192.168.0.0/16 ( 192.168.0.0 - 192.168.255.255 )

ref: 内网 IP 段有哪些

Tools #

trace route #

  • mtr (my traceroute / traceroute 2.0)

real-time speed #

  • bmon (graph); multi-interface
  • nload (graph)
    • unit : (k)bit
    • min, max, avg, total
    • (avg is the same as nethogs)
  • slurm (graph);
    • slurm **-i** wlan0\* nethogs
  • sudo nethogs wlan0
    • pid, user, program
    • CPU-consuming
    • (stable, the same as avg of nload)
  • ifstat
    • scrolling text
  • iftop (current graph) [speed per connection] nic is needed, otherwise wired by default.
    • sudo iftop -i wlan0
    • unit : (k)bit
    • Reverse-DNS (don’t like it , use ’n’ to toggl)
  • dstat
    • scrolling text
    • // all stat of system
  • ntop // TODO, how-to
  • sar // all stat of system (cpu/net/ram/io) (see: sar )
  • sudo nethogs // network [speed per rprogress & PID], like htop for progresses

network traffic capturing #

For windows, use Wireshark. For localhost in windows, use RawCap+Wireshark.

tcpdump write to file and standard output #

tcpdump -w - -U | tee my_file.pcap | tcpdump -r - tcpdump <capture filter args here> -w - | tee $(date +%Y-%m-%d_%H%M%S).pcap | tcpdump -r - tcpdump -w somefile --print (v > 4.99.0)

-w - tells tcpdump to write binary data to stdout -U tells tcpdump to write each packet to stdout as it is received, rather than buffering them and outputting in chunks tee writes that binary data to a file AND to its own stdout -r - tells the second tcpdump to get its data from its stdin

ref

other #

  • mrtg
  • trafshow (trace traffic flow in hex mode) // requires X11 ???

ref:

  1. http://blog.chinaunix.net/uid-14007815-id-107856.html
  2. https://groups.google.com/forum/?fromgroups#!topic/shlug/HXwy5KxDbUsroups.google.com/forum/?fromgroups#!topic/shlug/HXwy5KxDbUs)