Linux ps 查看进程

时间:2022-09-10 05:05:00
[root@wang /]# ps aux ps -elf ^C
[root@wang /]# ps aux
USER PID
%CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.1 19232 1592 ? Ss Dec14 0:01 /sbin/init root 2 0.0 0.0 0 0 ? S Dec14 0:00 [kthreadd] root 3 0.0 0.0 0 0 ? S Dec14 0:00 [migration/0] root 4 0.0 0.0 0 0 ? S Dec14 0:02 [ksoftirqd/0] root 5 0.0 0.0 0 0 ? S Dec14 0:00 [migration/0] root 6 0.0 0.0 0 0 ? S Dec14 0:03 [watchdog/0] root 7 0.0 0.0 0 0 ? S Dec14 0:00 [migration/1] root 8 0.0 0.0 0 0 ? S Dec14 0:00 [migration/1] root 9 0.0 0.0 0 0 ? S Dec14 0:05 [ksoftirqd/1] root 10 0.0 0.0 0 0 ? S Dec14 0:03 [watchdog/1] root 11 0.0 0.0 0 0 ? S Dec14 0:00 [migration/2] root 12 0.0 0.0 0 0 ? S Dec14 0:00 [migration/2] root 13 0.0 0.0 0 0 ? S Dec14 0:01 [ksoftirqd/2] root 14 0.0 0.0 0 0 ? S Dec14 0:03 [watchdog/2] root 15 0.0 0.0 0 0 ? S Dec14 0:00 [migration/3] root 16 0.0 0.0 0 0 ? S Dec14 0:00 [migration/3] root 17 0.0 0.0 0 0 ? S Dec14 0:02 [ksoftirqd/3] root 18 0.0 0.0 0 0 ? S Dec14 0:03 [watchdog/3] root 19 0.0 0.0 0 0 ? S Dec14 0:40 [events/0] root 20 0.0 0.0 0 0 ? S Dec14 1:20 [events/1] root 21 0.0 0.0 0 0 ? S Dec14 0:28 [events/2] root 22 0.1 0.0 0 0 ? S Dec14 10:08 [events/3] root 23 0.0 0.0 0 0 ? S Dec14 0:00 [cgroup] root 24 0.0 0.0 0 0 ? S Dec14 0:00 [khelper] root 25 0.0 0.0 0 0 ? S Dec14 0:00 [netns] root 26 0.0 0.0 0 0 ? S Dec14 0:00 [async/mgr] root 27 0.0 0.0 0 0 ? S Dec14 0:00 [pm] root 28 0.0 0.0 0 0 ? S Dec14 0:05 [sync_supers] root 29 0.0 0.0 0 0 ? S Dec14 0:06 [bdi-default] root 30 0.0 0.0 0 0 ? S Dec14 0:00 [kintegrityd/0] root 31 0.0 0.0 0 0 ? S Dec14 0:00 [kintegrityd/1] root 32 0.0 0.0 0 0 ? S Dec14 0:00 [kintegrityd/2] root 33 0.0 0.0 0 0 ? S Dec14 0:00 [kintegrityd/3] root 34 0.0 0.0 0 0 ? S Dec14 0:02 [kblockd/0] root 35 0.0 0.0 0 0 ? S Dec14 0:01 [kblockd/1] root 36 0.0 0.0 0 0 ? S Dec14 0:00 [kblockd/2] root 37 0.0 0.0 0 0 ? S Dec14 0:00 [kblockd/3] root 38 0.0 0.0 0 0 ? S Dec14 0:00 [kacpid] root 39 0.0 0.0 0 0 ? S Dec14 0:00 [kacpi_notify] root 40 0.0 0.0 0 0 ? S Dec14 0:00 [kacpi_hotplug] root 41 0.0 0.0 0 0 ? S Dec14 0:00 [ata_aux] root 42 0.0 0.0 0 0 ? S Dec14 0:00 [ata_sff/0] root 43 0.0 0.0 0 0 ? S Dec14 0:00 [ata_sff/1] root 44 0.0 0.0 0 0 ? S Dec14 0:00 [ata_sff/2] root 45 0.0 0.0 0 0 ? S Dec14 0:00 [ata_sff/3] root 46 0.0 0.0 0 0 ? S Dec14 0:00 [ksuspend_usbd] root 47 0.0 0.0 0 0 ? S Dec14 0:00 [khubd] root 48 0.0 0.0 0 0 ? S Dec14 0:00 [kseriod] root 49 0.0 0.0 0 0 ? S Dec14 0:00 [md/0] root 50 0.0 0.0 0 0 ? S Dec14 0:00 [md/1] root 51 0.0 0.0 0 0 ? S Dec14 0:00 [md/2] root 52 0.0 0.0 0 0 ? S Dec14 0:00 [md/3] root 53 0.0 0.0 0 0 ? S Dec14 0:00 [md_misc/0] root 54 0.0 0.0 0 0 ? S Dec14 0:00 [md_misc/1] root 55 0.0 0.0 0 0 ? S Dec14 0:00 [md_misc/2] root 56 0.0 0.0 0 0 ? S Dec14 0:00 [md_misc/3] root 57 0.0 0.0 0 0 ? S Dec14 0:00 [linkwatch] root 58 0.0 0.0 0 0 ? S Dec14 0:00 [khungtaskd] root 59 0.0 0.0 0 0 ? S Dec14 0:00 [kswapd0] root 60 0.0 0.0 0 0 ? SN Dec14 0:00 [ksmd] root 61 0.0 0.0 0 0 ? SN Dec14 0:00 [khugepaged] root 62 0.0 0.0 0 0 ? S Dec14 0:00 [aio/0] root 63 0.0 0.0 0 0 ? S Dec14 0:00 [aio/1] root 64 0.0 0.0 0 0 ? S Dec14 0:00 [aio/2] root 65 0.0 0.0 0 0 ? S Dec14 0:00 [aio/3] root 66 0.0 0.0 0 0 ? S Dec14 0:00 [crypto/0] root 67 0.0 0.0 0 0 ? S Dec14 0:00 [crypto/1] root 68 0.0 0.0 0 0 ? S Dec14 0:00 [crypto/2] root 69 0.0 0.0 0 0 ? S Dec14 0:00 [crypto/3] root 74 0.0 0.0 0 0 ? S Dec14 0:00 [kthrotld/0] root 75 0.0 0.0 0 0 ? S Dec14 0:00 [kthrotld/1] root 76 0.0 0.0 0 0 ? S Dec14 0:00 [kthrotld/2] root 77 0.0 0.0 0 0 ? S Dec14 0:00 [kthrotld/3] root 78 0.0 0.0 0 0 ? S Dec14 0:00 [pciehpd] root 80 0.0 0.0 0 0 ? S Dec14 0:00 [kpsmoused] root 81 0.0 0.0 0 0 ? S Dec14 0:00 [usbhid_resumer] root 110 0.0 0.0 0 0 ? S Dec14 0:00 [kstriped] root 194 0.0 0.0 0 0 ? S Dec14 0:00 [scsi_eh_0] root 195 0.0 0.0 0 0 ? S Dec14 0:00 [scsi_eh_1] root 202 0.0 0.0 0 0 ? S Dec14 0:43 [mpt_poll_0] root 203 0.0 0.0 0 0 ? S Dec14 0:00 [mpt/0] root 204 0.0 0.0 0 0 ? S Dec14 0:00 [scsi_eh_2] root 336 0.0 0.0 0 0 ? S Dec14 0:11 [jbd2/sda3-8] root 337 0.0 0.0 0 0 ? S Dec14 0:00 [ext4-dio-unwrit] root 347 0.0 0.0 0 0 ? S Dec14 0:07 [flush-8:0] root 427 0.0 0.1 11576 1648 ? S<s Dec14 0:00 /sbin/udevd -d root 639 0.0 0.0 0 0 ? S Dec14 1:20 [vmmemctl] root 762 0.0 0.0 0 0 ? S Dec14 0:00 [jbd2/sda1-8] root 763 0.0 0.0 0 0 ? S Dec14 0:00 [ext4-dio-unwrit] root 764 0.0 0.0 0 0 ? S Dec14 0:00 [jbd2/sdb5-8] root 765 0.0 0.0 0 0 ? S Dec14 0:00 [ext4-dio-unwrit] root 832 0.0 0.0 0 0 ? S Dec14 0:00 [kauditd] root 1036 0.0 0.0 27640 848 ? S<sl Dec14 0:01 auditd root 1061 0.0 0.1 255424 1776 ? Sl Dec14 0:00 /sbin/rsyslogd -i /var/run/ rpc 1079 0.0 0.0 18976 892 ? Ss Dec14 0:01 rpcbind rpcuser 1097 0.0 0.1 23348 1368 ? Ss Dec14 0:00 rpc.statd dbus 1123 0.0 0.1 31648 1132 ? Ssl Dec14 0:00 dbus-daemon --system root 1135 0.0 0.3 189332 3336 ? Ss Dec14 0:00 cupsd -C /etc/cups/cupsd.co 68 1160 0.0 0.5 38624 5108 ? Ssl Dec14 0:04 hald root 1161 0.0 0.1 20324 1352 ? S Dec14 0:00 hald-runner root 1191 0.0 0.1 22444 1280 ? S Dec14 0:00 hald-addon-input: Listening 68 1208 0.0 0.1 17932 1132 ? S Dec14 0:00 hald-addon-acpi: listening root 1225 0.0 0.1 66604 1240 ? Ss Dec14 0:00 /usr/sbin/sshd root 1301 0.0 0.3 81272 3400 ? Ss Dec14 0:05 /usr/libexec/postfix/master postfix 1308 0.0 0.3 81520 3420 ? S Dec14 0:01 qmgr -l -t fifo -u root 1311 0.0 0.1 117324 1416 ? Ss Dec14 0:03 crond root 1322 0.0 0.0 21540 480 ? Ss Dec14 0:00 /usr/sbin/atd root 1330 0.0 0.0 0 0 ? S Dec14 0:00 [jbd2/sdb1-8] root 1331 0.0 0.0 0 0 ? S Dec14 0:00 [ext4-dio-unwrit] root 1340 0.0 0.0 4064 576 tty2 Ss+ Dec14 0:00 /sbin/mingetty /dev/tty2 root 1342 0.0 0.0 4064 576 tty3 Ss+ Dec14 0:00 /sbin/mingetty /dev/tty3 root 1344 0.0 0.0 4064 576 tty4 Ss+ Dec14 0:00 /sbin/mingetty /dev/tty4 root 1347 0.0 0.0 4064 576 tty5 Ss+ Dec14 0:00 /sbin/mingetty /dev/tty5 root 1350 0.0 0.2 12496 2700 ? S< Dec14 0:00 /sbin/udevd -d root 1351 0.0 0.2 12496 2704 ? S< Dec14 0:00 /sbin/udevd -d root 1353 0.0 0.0 4064 576 tty6 Ss+ Dec14 0:00 /sbin/mingetty /dev/tty6 root 1418 0.0 0.0 4064 576 tty1 Ss+ Dec15 0:00 /sbin/mingetty /dev/tty1 postfix 4749 0.0 0.3 81352 3376 ? S 07:18 0:00 pickup -l -t fifo -u root 4762 0.0 0.4 100356 4328 ? Rs 08:22 0:00 sshd: root@pts/0 root 4766 0.0 0.1 108300 1948 pts/0 Ss 08:22 0:00 -bash root 4839 0.0 0.1 110224 1160 pts/0 R+ 08:49 0:00 ps aux [root@wang /]# ps aux |grep

 USER 运行用户  PID 进程 VSZ 虚拟内存大小 RSS 真实大小 TTY 那个位置启动

STAT进 程状态 S 休眠 s 主进程 < 优先级高 N低优先级 +前台运行命令 R正在运行的进程  L 被锁定 l 多线程 进程 Z 僵尸进程 X 死掉的进程 T 暂停进程 D 不能中断进程  

START 启动时间