Xargs
Kill process According to keyword
ps-ef | grep keyword | awk ' {print $} ' | Xargs kill-9
Watch
Real-time monitoring of Redis values
watch-n 0.2 ' redis-cli-h 127.0.0.1-p 6379-a password, Llen List_key ' based on watch command
netstat
/**
*-A,--all,--listening display all sockets (default:connected)
*-E,--extend display Other/more I nformation
*-P,--programs display pid/program name
for sockets *-N,--numeric don ' t resolve names< c13/>*/
//View all TCP connections under Linux and number
netstat-n | awk '/^tcp/{++s[$NF]} end {for (a) print a, S[a]} '
//root According to the keyword view TCP connection information
NETSTAT-ANEP | grep-e "Key1.*key2"
grep
Or operation, add-e parameter
grep-e "Key1|key2"
//or operation, use Egrep extension to match
egrep "Key1|key2"
//or operation, matching word inside plus backslash \, Start opening egrep extension regular match
grep "Key1\|key2"
//with operation, same or Operation
grep "Key1.*key2"
grep-e "Key1.*key2"
egrep "Key1" . *key2 "
tcpdump
/**
* Monitor packet * host specifies IP receive and send packets * Port Current host 80 port receive and send packets
* src specified source
* DST Specifies target
*-i specify NIC
* -NN Digital Display port number
* -A to display packets in ASCII *- x Display packets in 16-in and ASCII-s to output the TCP's serial number in absolute terms, not relative value
* -VV output Detailed message information
// Gets the packet that IP communicates with the current host 80 port, and displays in ASCII
# tcpdump-i Eth1-nna host xxx.xxx.xxx.xxx and TCP port
Gets the packet that IP communicates with the current host 80 port, displaying in 16 and ASCII, showing the absolute value of serial number
# Tcpdump-i ETH1-XSNNVV host xxx.xxx.xxx.xxx and Port
Get IP Send to local port 80 package
# tcpdump-i Eth1-nna src host xxx.xxx.xxx.xxx and TCP port
//Get local 80 port packets sent to IP, and in 16 and ASCII Show
# tcpdump-i ETH1-NNX DST host xxx.xxx.xxx.xxx and TCP port 80
ifconfig
View all cards in this machine
# ifconfig-a
Sysctl
Ulimit
Iftop
Real-time Monitoring system Traffic
# Iftop