1. ps command SunOS ps 命令分析:
参数:
-e 显示所有用户的进程 -f 以 full 格式显示结果
-j 显示 进程的session id 与 process group id.
-u 显示某一uid 的进程
-a 显示终端上的所有进程,包括其他用户的进程
- r 只显示正在运行的进程
输出的某些columns 的含义:
PPID: parent pid.
PGID :Process group id
PRI : priority 进程的优先级
I : nice value.
STIME: Process start time
S : Process status ( O running, W wait, .....)
cmd : Process command name
SID : Process session id
Time : Process cumulative time
2. kill command using:
kill -signal pid
常用的信号名: SIGHUP (1): 启动被终止的进程 SIGINT (2): 中断一个进程的执行 SIGKILL( 9 ) : 强制停止某一个进程 SIGTERM (15) : 以正常结束的方式终止某一进程 SIGSTOP (17) : 暂停一个进程的执行