ifconfig: 显示和设置网络的接口,可以打开或者关闭某一个网络接口。ex:::::ifconfig up /down eth0
netstat: 显示网络状态,整个网络情况,显示socket,tcp,udp等的连接情况。
tcpdump:监视网络接口所有流过的数据包。参数ip host,port
ps -aus:显示瞬间进程的动态
top:实时显示process的动态
top与ps的区别:
ps看到的是命令执行瞬间的进程信息,而top可以持续的监视
ps只是查看进程,而top还可以监视系统性能,如平均负载,cpu和内存的消耗
另外top还可以操作进程,如改变优先级(命令r)和关闭进程(命令k)
free: 显示内存的使用情况,包括实体内存,虚拟内存,共享内存区段
route:查看路由器信息。
grep:查找文件里符合条件的字符串。
ps查看到的进程状态:
R、S、D、T、Z、X 六种状态做个说明。
PROCESS STATE CODES
Here are the different values that the s, stat and state output specifiers (header "STAT" or "S") will display to describe the state of a process.
D Uninterruptible sleep (usually IO)
R Running or runnable (on run queue)
S Interruptible sleep (waiting for an event to complete)
T Stopped, either by a job control signal or because it is being traced.
W paging (not valid since the 2.6.xx kernel)
X dead (should never be seen)
Z Defunct ("zombie") process, terminated but not
reaped by its parent.
For BSD formats and when the stat keyword is used,additional characters may be displayed:
< high-priority (not nice to other users)
N low-priority (nice to other users)
L has pages locked into memory (for real-time and custom IO)
s is a session leader
l is multi-threaded (using CLONE_THREAD, like NPTL pthreads do)
+ is in the foreground process group