ps aux <----show all process
ps auxf <----show all process as tree format
ps a -l <----here -l means long format, see detail
pstree <----show process as tree format
pstree -p <----display with pid
pstree -H 1974 <----high light the 1974 process
top
top -d 2 <----Change data with 2 second.
top -b -n 2 > /home/ray/topresult <----run top 2 times and redirect the result to a file
in top interface:
press q is exit
press M is sort by memory
press < or > means sort by previous or next column
free -m <----Check memory status
netstat -ntlp <----Show the network status, here "l" means those listening process
vmstat 2 <----Check CPU status, take snapshot with 2 seconds
vmstat 2 4 <----Check CPU status, take snapshot with 2 seconds and do it 4 times
vmstat -d <----Show disk read write status
df -h <----Show harddisk space size
runlevel <----Show previous and current runlevel
No comments:
Post a Comment