2010年7月23日 星期五

Process

1. basic
顯示目前所有程序, 並對 memory 作排序
ps -e o user,pid,size,cmd | sort -k3 -n -r | more

///////////////////////////////////////
ps report a snapshot of the current processes
///////////////////////////////////////
-e Select all identical
-o userdefine output

command:
KEY LONG DESCRIPTION
c cmd simple name of executable
C pcpu cpu utilization
f flags flags as in long format F field
g pgrp process group ID
G tpgid controlling tty process group ID
j cutime cumulative user time
J cstime cumulative system time
k utime user time
m min_flt number of minor page faults
M maj_flt number of major page faults
n cmin_flt cumulative minor page faults
N cmaj_flt cumulative major page faults
o session session ID
p pid process ID
P ppid parent process ID
r rss resident set size
R resident resident pages
s size memory size in kilobytes
S share amount of shared pages
t tty the device number of the controlling tty
T start_time time process was started
U uid user ID number
u user user name
v vsize total VM size in kB
y priority kernel scheduling priority

/////////////////////////////////////////
sort
//////////////////////////////////////////
-k key
-n number sort
-r reverse


/////////////////////////////////
killall
///////////////////////////////////
說明: 可用程序名稱 刪除程序
like: killall /user/httpd

沒有留言:

張貼留言