[Linux Network]Linux下测试网络

COMMANDtcpdump - dump traffic on a network

EXAMPLE
tcpdump host xxx.xxx.xxx.xxx
tcpdump -i eth0
tcpdump -i eth0 src host xxx.xxx.xxx.xxx
tcpdump -i eth0 dst host xxx.xxx.xxx.xxx
tcpdump ip host xxx.xxx.xxx.xxx and ! xxx.xxx.xxx.xxx
tcpdump tcp port xx and host xxx.xxx.xxx.xxx
tcpdump udp port xx

OPTIONS
-i --interface interface
  Listen on interface, If unspecified, choose first interface in system interface list.

-c count
  Exit after receiving count packets.

-q
  Quick (quiet?) output. Print less protocol information so output lines are shorter.

-S --absolute-tcp-sequence-numbers
  Print absolute, rather than relative, TCP sequence numbers.

COMMANDdd - convert and copy a file

EXAMPLE
dd if=/dev/null bs=100M count=10 of=test_network_file

OPTIONS
if=FILE
  read from FILE instead of stdin

of=FILE
  write to FILE instead of stdout

bs=BYTES
  read and write up to BYTES bytes at a time

count=N
  copy only N input blocks

COMMANDncat - Concatenate and redirect sockets

Usage: ncat [options] [hostname] [port]

OPTIONS
-l, --listen
  Bind and listen for incoming connections
-u, --udp
  Use UDP instead of default TCP
-p, --source-port port
  Specify source port to use
-s, --source addr
  Specify source address to use(doesn't affect -l)

-o, --output
  Dump session data to a file

-d, --delay

COMMANDtime - time a simple COMMAND or give resource usage

time writes a message to standard error giving timing statistics about this program run. These statistics consist of
(i) the elapsed real time between invocation and termination
(ii) the user CPU time
(iii) the system CPU time

EXAMPLE
TIMEFORMAT=”“ time -v ./exe

发表评论

电子邮件地址不会被公开。必填项已用 * 标注