当前位置: 技术问答>linux和unix
请救几个LINUX命令?
来源: 互联网 发布时间:2016-07-28
本文导语: 1,查看某一个进程的信息? 2,查看某一个进程下有哪些线程? | 1 ps aux|grep postgres 2 pstree|grep postgres | [root@RHEL4 dev]# ps -ef UID PID PPID C STIME TTY ...
1,查看某一个进程的信息?
2,查看某一个进程下有哪些线程?
2,查看某一个进程下有哪些线程?
|
1 ps aux|grep postgres
2 pstree|grep postgres
2 pstree|grep postgres
|
[root@RHEL4 dev]# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 15:52 ? 00:00:00 init [3]
root 2 1 0 15:52 ? 00:00:00 [migration/0]
root 3 1 0 15:52 ? 00:00:00 [ksoftirqd/0]
root 4 1 0 15:52 ? 00:00:00 [events/0]
root 5 4 0 15:52 ? 00:00:00 [khelper]
root 6 4 0 15:52 ? 00:00:00 [kacpid]
root 17 4 0 15:52 ? 00:00:00 [kblockd/0]
root 35 4 0 15:52 ? 00:00:00 [pdflush]
root 36 4 0 15:52 ? 00:00:00 [pdflush]
root 38 4 0 15:52 ? 00:00:00 [aio/0]
root 18 1 0 15:52 ? 00:00:00 [khubd]
root 37 1 0 15:52 ? 00:00:00 [kswapd0]
root 184 1 0 15:52 ? 00:00:00 [kseriod]
PID 进程id
PPID 父进程id
不知道这是你要的显示结果吗
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 15:52 ? 00:00:00 init [3]
root 2 1 0 15:52 ? 00:00:00 [migration/0]
root 3 1 0 15:52 ? 00:00:00 [ksoftirqd/0]
root 4 1 0 15:52 ? 00:00:00 [events/0]
root 5 4 0 15:52 ? 00:00:00 [khelper]
root 6 4 0 15:52 ? 00:00:00 [kacpid]
root 17 4 0 15:52 ? 00:00:00 [kblockd/0]
root 35 4 0 15:52 ? 00:00:00 [pdflush]
root 36 4 0 15:52 ? 00:00:00 [pdflush]
root 38 4 0 15:52 ? 00:00:00 [aio/0]
root 18 1 0 15:52 ? 00:00:00 [khubd]
root 37 1 0 15:52 ? 00:00:00 [kswapd0]
root 184 1 0 15:52 ? 00:00:00 [kseriod]
PID 进程id
PPID 父进程id
不知道这是你要的显示结果吗
|
PS(1) Linux User's Manual PS(1)
NAME
ps - report a snapshot of the current processes.
SYNOPSIS
ps [options]
................
THREAD DISPLAY
H Show threads as if they were processes
-L Show threads, possibly with LWP and NLWP columns
-T Show threads, possibly with SPID column
m Show threads after processes
-m Show threads after processes
................
|
http://blog.chinaunix.net/u2/68904/showart_711096.html
http://blog.chinaunix.net/u3/93182/showart_2042962.html
top
ps
http://blog.chinaunix.net/u3/93182/showart_2042962.html
top
ps
|
这2个论坛 讲的很详细了
大家告诉你是top ps这2个命令了 你好好了解一下这2个命令就会了