项目常用的linux命令

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


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值