linux most common use

来源:互联网 发布:数据泄密防护系统 编辑:程序博客网 时间:2024/05/01 22:37

1. change password

 

passwd [user]

 

2. add user

useradd [user]

 

 bash:useradd:command not found

/usr/sbin/useradd 

or

#vi .bash_profile PATH=$PATH:/bin:/usr/sbin

 

3. view process of a port

lsof -i :8080

netstat -tlnp

 

4.

 

http://www.roboticfan.com/blog/user_2005/104/2009617176.shtml

 

http://xxxyrq369.blog.163.com/blog/static/35722482010316101140497/

 

5. monitoring

iostat

 

r/s

The number of read requests that were issued to the device per second.
w/s
The number of write requests that were issued to the device per second.

svctm

The average service time (in milliseconds) for I/O requests that were issued to the device.

vmstat

 

sar

If the %idle is near zero, your CPU is overloaded. If the %iowait is large, your disks are overloaded.