Linux查看系统中的每个进程

[email protected]:~$ ps -A
  PID TTY          TIME CMD
    1 ?        00:00:01 init
    2 ?        00:00:00 kthreadd
    3 ?        00:00:00 ksoftirqd/0
    4 ?        00:00:00 kworker/0:0
    5 ?        00:00:00 kworker/0:0H
    6 ?        00:00:00 kworker/u8:0
    7 ?        00:00:02 rcu_sched
    8 ?        00:00:00 rcuos/0
    9 ?        00:00:00 rcuos/1
   10 ?        00:00:01 rcuos/2
   11 ?        00:00:00 rcuos/3
   12 ?        00:00:00 rcu_bh
   13 ?        00:00:00 rcuob/0
   14 ?        00:00:00 rcuob/1
   15 ?        00:00:00 rcuob/2
   16 ?        00:00:00 rcuob/3
   17 ?        00:00:01 migration/0
   18 ?        00:00:00 watchdog/0
   19 ?        00:00:00 watchdog/1
   20 ?        00:00:00 migration/1
   21 ?        00:00:00 ksoftirqd/1
   22 ?        00:00:02 kworker/1:0
   23 ?        00:00:00 kworker/1:0H
   24 ?        00:00:00 watchdog/2
   25 ?        00:00:01 migration/2
   26 ?        00:00:00 ksoftirqd/2
   27 ?        00:00:00 kworker/2:0
   28 ?        00:00:00 kworker/2:0H
   29 ?        00:00:00 watchdog/3
   30 ?        00:00:00 migration/3
   31 ?        00:00:00 ksoftirqd/3
   33 ?        00:00:00 kworker/3:0H
   34 ?        00:00:00 khelper
   35 ?        00:00:00 kdevtmpfs
   36 ?        00:00:00 netns
   37 ?        00:00:00 writeback
   38 ?        00:00:00 kintegrityd
   39 ?        00:00:00 bioset
   40 ?        00:00:00 kworker/u9:0
   41 ?        00:00:00 kblockd
   42 ?        00:00:00 ata_sff
   43 ?        00:00:00 khubd
   44 ?        00:00:00 md
   45 ?        00:00:00 devfreq_wq
   46 ?        00:00:01 kworker/0:1
   48 ?        00:00:00 khungtaskd
   49 ?        00:00:00 kswapd0
   50 ?        00:00:00 ksmd
   51 ?        00:00:00 khugepaged
   52 ?        00:00:00 fsnotify_mark
   53 ?        00:00:00 ecryptfs-kthrea
   54 ?        00:00:00 crypto
   66 ?        00:00:00 kthrotld
   69 ?        00:00:01 kworker/2:1
   90 ?        00:00:00 deferwq
   91 ?        00:00:00 charger_manager
   92 ?        00:00:03 kworker/3:2
  143 ?        00:00:00 kpsmoused
  144 ?        00:00:00 scsi_eh_0
  145 ?        00:00:00 scsi_eh_1
  146 ?        00:00:00 kworker/u8:3
  151 ?        00:00:00 kworker/3:3
  160 ?        00:00:00 jbd2/sda8-8
  161 ?        00:00:00 ext4-rsv-conver
  285 ?        00:00:00 upstart-udev-br
  291 ?        00:00:00 systemd-udevd
  343 ?        00:00:00 ktpacpid
  352 ?        00:00:00 cfg80211
  354 ?        00:00:00 hd-audio0
  361 ?        00:00:00 kworker/u9:1
  362 ?        00:00:00 ttm_swap
  364 ?        00:00:00 kmemstick
  365 ?        00:00:00 wl_event_handle
  501 ?        00:00:00 upstart-socket-
  517 ?        00:00:00 hci0
  518 ?        00:00:00 hci0
  521 ?        00:00:00 hd-audio1
  576 ?        00:00:00 jbd2/sda9-8
  577 ?        00:00:00 ext4-rsv-conver
  585 ?        00:00:00 jbd2/sda10-8
  586 ?        00:00:00 ext4-rsv-conver
  620 ?        00:00:00 smbd
  663 ?        00:00:00 dbus-daemon
  685 ?        00:00:00 ModemManager
  702 ?        00:00:00 upstart-file-br
  713 ?        00:00:00 rsyslogd
  718 ?        00:00:00 bluetoothd
  727 ?        00:00:00 krfcommd
  730 ?        00:00:00 avahi-daemon
  736 ?        00:00:00 avahi-daemon
  746 ?        00:00:00 systemd-logind
  748 ?        00:00:00 NetworkManager
  754 ?        00:00:00 polkitd
  763 ?        00:00:00 wpa_supplicant
  769 ?        00:00:00 smbd
  905 tty4     00:00:00 getty
  909 tty5     00:00:00 getty
  916 tty2     00:00:00 getty
  917 tty3     00:00:00 getty
  920 tty6     00:00:00 getty
  961 ?        00:00:00 anacron
  967 ?        00:00:00 cron
  987 ?        00:00:00 kerneloops
 1006 ?        00:00:00 cups-browsed
 1033 ?        00:00:00 irqbalance
 1043 ?        00:00:00 whoopsie
 1066 ?        00:00:00 acpid
 1069 ?        00:00:00 dhclient
 1077 ?        00:00:00 apache2
 1080 ?        00:00:00 apache2
 1081 ?        00:00:00 apache2
 1161 ?        00:00:00 dnsmasq
 1164 tty1     00:00:00 getty
 1299 ?        00:00:00 nmbd
 1302 ?        00:00:00 kworker/1:2
 1328 ?        00:00:00 lightdm
 1341 tty7     00:01:17 Xorg
 1344 ?        00:00:00 accounts-daemon
 1375 ?        00:00:00 kauditd
 1425 ?        00:00:00 lightdm
 1470 ?        00:00:00 upowerd
 1515 ?        00:00:00 rtkit-daemon
 1778 ?        00:00:00 cupsd
 1801 ?        00:00:00 gnome-keyring-d
 1806 ?        00:00:00 init
 1872 ?        00:00:00 dbus-daemon
 1881 ?        00:00:00 upstart-event-b
 1885 ?        00:00:00 window-stack-br
 1901 ?        00:00:00 upstart-file-br
 1903 ?        00:00:00 upstart-dbus-br
 1909 ?        00:00:00 upstart-dbus-br
 1911 ?        00:00:05 ibus-daemon
 1926 ?        00:00:00 unity-settings-
 1930 ?        00:00:00 hud-service
 1933 ?        00:00:00 at-spi-bus-laun
 1934 ?        00:00:00 gnome-session
 1938 ?        00:00:04 unity-panel-ser
 1940 ?        00:00:00 dbus-daemon
 1944 ?        00:00:00 gvfsd
 1949 ?        00:00:00 gvfsd-fuse
 1951 ?        00:00:00 ibus-dconf
 1952 ?        00:00:06 ibus-ui-gtk3
 1955 ?        00:00:00 ibus-x11
 1961 ?        00:00:00 at-spi2-registr
 1979 ?        00:00:00 bamfdaemon
 2001 ?        00:00:01 ibus-engine-pin
 2004 ?        00:00:01 indicator-keybo
 2007 ?        00:00:00 indicator-messa
 2008 ?        00:00:00 indicator-bluet
 2013 ?        00:00:00 indicator-power
 2015 ?        00:00:00 indicator-datet
 2022 ?        00:00:00 indicator-sound
 2025 ?        00:00:00 indicator-print
 2026 ?        00:00:00 indicator-sessi
 2039 ?        00:00:00 indicator-appli
 2050 ?        00:00:00 pulseaudio
 2059 ?        00:00:00 evolution-sourc
 2069 ?        00:00:00 colord
 2076 ?        00:00:00 syndaemon
 2083 ?        00:00:00 ibus-engine-sim
 2085 ?        00:00:00 dconf-service
 2113 ?        00:00:00 notify-osd
 2127 ?        00:00:00 evolution-calen
 2148 ?        00:00:31 compiz
 2209 ?        00:00:00 polkit-gnome-au
 2212 ?        00:00:00 nm-applet
 2214 ?        00:00:00 unity-fallback-
 2217 ?        00:00:00 nautilus
 2235 ?        00:00:00 gvfs-udisks2-vo
 2239 ?        00:00:00 udisksd
 2249 ?        00:00:00 gvfs-mtp-volume
 2253 ?        00:00:00 gvfs-gphoto2-vo
 2257 ?        00:00:00 gvfs-afc-volume
 2264 ?        00:00:00 gconfd-2
 2283 ?        00:00:00 gvfsd-trash
 2293 ?        00:00:00 gvfsd-burn
 2298 ?        00:00:00 gvfsd-metadata
 2318 ?        00:03:29 firefox
 2345 ?        00:00:00 unity-webapps-s
 2370 ?        00:00:00 telepathy-indic
 2377 ?        00:00:00 mission-control
 2412 ?        00:00:24 plugin-containe
 2419 ?        00:00:00 zeitgeist-datah
 2424 ?        00:00:00 zeitgeist-daemo
 2437 ?        00:00:00 zeitgeist-fts
 2454 ?        00:00:00 cat
 2495 ?        00:00:00 update-notifier
 2517 ?        00:00:08 update-manager
 2545 ?        00:00:00 deja-dup-monito
 2565 ?        00:00:03 gnome-terminal
 2575 ?        00:00:00 gnome-pty-helpe
 2576 pts/0    00:00:00 bash
 2635 ?        00:00:00 sh
 2636 ?        00:00:00 run-parts
 2644 ?        00:00:00 apt
 2680 ?        00:00:00 sleep
 2741 ?        00:00:00 kworker/u8:1
 2761 pts/0    00:00:00 ps
[email protected]:~$ ps -e
  PID TTY          TIME CMD
    1 ?        00:00:01 init
    2 ?        00:00:00 kthreadd
    3 ?        00:00:00 ksoftirqd/0
    4 ?        00:00:00 kworker/0:0
    5 ?        00:00:00 kworker/0:0H
    6 ?        00:00:00 kworker/u8:0
    7 ?        00:00:02 rcu_sched
    8 ?        00:00:00 rcuos/0
    9 ?        00:00:00 rcuos/1
   10 ?        00:00:01 rcuos/2
   11 ?        00:00:00 rcuos/3
   12 ?        00:00:00 rcu_bh
   13 ?        00:00:00 rcuob/0
   14 ?        00:00:00 rcuob/1
   15 ?        00:00:00 rcuob/2
   16 ?        00:00:00 rcuob/3
   17 ?        00:00:01 migration/0
   18 ?        00:00:00 watchdog/0
   19 ?        00:00:00 watchdog/1
   20 ?        00:00:00 migration/1
   21 ?        00:00:00 ksoftirqd/1
   22 ?        00:00:02 kworker/1:0
   23 ?        00:00:00 kworker/1:0H
   24 ?        00:00:00 watchdog/2
   25 ?        00:00:01 migration/2
   26 ?        00:00:00 ksoftirqd/2
   27 ?        00:00:00 kworker/2:0
   28 ?        00:00:00 kworker/2:0H
   29 ?        00:00:00 watchdog/3
   30 ?        00:00:00 migration/3
   31 ?        00:00:00 ksoftirqd/3
   33 ?        00:00:00 kworker/3:0H
   34 ?        00:00:00 khelper
   35 ?        00:00:00 kdevtmpfs
   36 ?        00:00:00 netns
   37 ?        00:00:00 writeback
   38 ?        00:00:00 kintegrityd
   39 ?        00:00:00 bioset
   40 ?        00:00:00 kworker/u9:0
   41 ?        00:00:00 kblockd
   42 ?        00:00:00 ata_sff
   43 ?        00:00:00 khubd
   44 ?        00:00:00 md
   45 ?        00:00:00 devfreq_wq
   46 ?        00:00:01 kworker/0:1
   48 ?        00:00:00 khungtaskd
   49 ?        00:00:00 kswapd0
   50 ?        00:00:00 ksmd
   51 ?        00:00:00 khugepaged
   52 ?        00:00:00 fsnotify_mark
   53 ?        00:00:00 ecryptfs-kthrea
   54 ?        00:00:00 crypto
   66 ?        00:00:00 kthrotld
   69 ?        00:00:01 kworker/2:1
   90 ?        00:00:00 deferwq
   91 ?        00:00:00 charger_manager
   92 ?        00:00:03 kworker/3:2
  143 ?        00:00:00 kpsmoused
  144 ?        00:00:00 scsi_eh_0
  145 ?        00:00:00 scsi_eh_1
  151 ?        00:00:00 kworker/3:3
  160 ?        00:00:00 jbd2/sda8-8
  161 ?        00:00:00 ext4-rsv-conver
  285 ?        00:00:00 upstart-udev-br
  291 ?        00:00:00 systemd-udevd
  343 ?        00:00:00 ktpacpid
  352 ?        00:00:00 cfg80211
  354 ?        00:00:00 hd-audio0
  361 ?        00:00:00 kworker/u9:1
  362 ?        00:00:00 ttm_swap
  364 ?        00:00:00 kmemstick
  365 ?        00:00:00 wl_event_handle
  501 ?        00:00:00 upstart-socket-
  517 ?        00:00:00 hci0
  518 ?        00:00:00 hci0
  521 ?        00:00:00 hd-audio1
  576 ?        00:00:00 jbd2/sda9-8
  577 ?        00:00:00 ext4-rsv-conver
  585 ?        00:00:00 jbd2/sda10-8
  586 ?        00:00:00 ext4-rsv-conver
  620 ?        00:00:00 smbd
  663 ?        00:00:00 dbus-daemon
  685 ?        00:00:00 ModemManager
  702 ?        00:00:00 upstart-file-br
  713 ?        00:00:00 rsyslogd
  718 ?        00:00:00 bluetoothd
  727 ?        00:00:00 krfcommd
  730 ?        00:00:00 avahi-daemon
  736 ?        00:00:00 avahi-daemon
  746 ?        00:00:00 systemd-logind
  748 ?        00:00:00 NetworkManager
  754 ?        00:00:00 polkitd
  763 ?        00:00:00 wpa_supplicant
  769 ?        00:00:00 smbd
  905 tty4     00:00:00 getty
  909 tty5     00:00:00 getty
  916 tty2     00:00:00 getty
  917 tty3     00:00:00 getty
  920 tty6     00:00:00 getty
  961 ?        00:00:00 anacron
  967 ?        00:00:00 cron
  987 ?        00:00:00 kerneloops
 1006 ?        00:00:00 cups-browsed
 1033 ?        00:00:00 irqbalance
 1043 ?        00:00:00 whoopsie
 1066 ?        00:00:00 acpid
 1069 ?        00:00:00 dhclient
 1077 ?        00:00:00 apache2
 1080 ?        00:00:00 apache2
 1081 ?        00:00:00 apache2
 1161 ?        00:00:00 dnsmasq
 1164 tty1     00:00:00 getty
 1299 ?        00:00:00 nmbd
 1302 ?        00:00:00 kworker/1:2
 1328 ?        00:00:00 lightdm
 1341 tty7     00:01:26 Xorg
 1344 ?        00:00:00 accounts-daemon
 1375 ?        00:00:00 kauditd
 1425 ?        00:00:00 lightdm
 1470 ?        00:00:00 upowerd
 1515 ?        00:00:00 rtkit-daemon
 1778 ?        00:00:00 cupsd
 1801 ?        00:00:00 gnome-keyring-d
 1806 ?        00:00:00 init
 1872 ?        00:00:00 dbus-daemon
 1881 ?        00:00:00 upstart-event-b
 1885 ?        00:00:00 window-stack-br
 1901 ?        00:00:00 upstart-file-br
 1903 ?        00:00:00 upstart-dbus-br
 1909 ?        00:00:00 upstart-dbus-br
 1911 ?        00:00:05 ibus-daemon
 1926 ?        00:00:00 unity-settings-
 1930 ?        00:00:00 hud-service
 1933 ?        00:00:00 at-spi-bus-laun
 1934 ?        00:00:00 gnome-session
 1938 ?        00:00:05 unity-panel-ser
 1940 ?        00:00:00 dbus-daemon
 1944 ?        00:00:00 gvfsd
 1949 ?        00:00:00 gvfsd-fuse
 1951 ?        00:00:00 ibus-dconf
 1952 ?        00:00:07 ibus-ui-gtk3
 1955 ?        00:00:00 ibus-x11
 1961 ?        00:00:00 at-spi2-registr
 1979 ?        00:00:00 bamfdaemon
 2001 ?        00:00:02 ibus-engine-pin
 2004 ?        00:00:01 indicator-keybo
 2007 ?        00:00:00 indicator-messa
 2008 ?        00:00:00 indicator-bluet
 2013 ?        00:00:00 indicator-power
 2015 ?        00:00:00 indicator-datet
 2022 ?        00:00:00 indicator-sound
 2025 ?        00:00:00 indicator-print
 2026 ?        00:00:00 indicator-sessi
 2039 ?        00:00:00 indicator-appli
 2050 ?        00:00:00 pulseaudio
 2059 ?        00:00:00 evolution-sourc
 2069 ?        00:00:00 colord
 2076 ?        00:00:00 syndaemon
 2083 ?        00:00:00 ibus-engine-sim
 2085 ?        00:00:00 dconf-service
 2113 ?        00:00:00 notify-osd
 2127 ?        00:00:00 evolution-calen
 2148 ?        00:00:35 compiz
 2209 ?        00:00:00 polkit-gnome-au
 2212 ?        00:00:00 nm-applet
 2214 ?        00:00:00 unity-fallback-
 2217 ?        00:00:00 nautilus
 2235 ?        00:00:00 gvfs-udisks2-vo
 2239 ?        00:00:00 udisksd
 2249 ?        00:00:00 gvfs-mtp-volume
 2253 ?        00:00:00 gvfs-gphoto2-vo
 2257 ?        00:00:00 gvfs-afc-volume
 2264 ?        00:00:00 gconfd-2
 2283 ?        00:00:00 gvfsd-trash
 2293 ?        00:00:00 gvfsd-burn
 2298 ?        00:00:00 gvfsd-metadata
 2318 ?        00:03:51 firefox
 2345 ?        00:00:00 unity-webapps-s
 2370 ?        00:00:00 telepathy-indic
 2377 ?        00:00:00 mission-control
 2412 ?        00:00:25 plugin-containe
 2419 ?        00:00:00 zeitgeist-datah
 2424 ?        00:00:00 zeitgeist-daemo
 2437 ?        00:00:00 zeitgeist-fts
 2454 ?        00:00:00 cat
 2495 ?        00:00:00 update-notifier
 2517 ?        00:00:08 update-manager
 2545 ?        00:00:00 deja-dup-monito
 2565 ?        00:00:04 gnome-terminal
 2575 ?        00:00:00 gnome-pty-helpe
 2576 pts/0    00:00:00 bash
 2635 ?        00:00:00 sh
 2636 ?        00:00:00 run-parts
 2644 ?        00:00:00 apt
 2680 ?        00:00:00 sleep
 2741 ?        00:00:00 kworker/u8:1
 2769 pts/0    00:00:00 ps
时间: 2024-11-03 21:52:05

Linux查看系统中的每个进程的相关文章

一起聊聊 Linux 系统中的僵尸进程

Linux 系统中僵尸进程和现实中僵尸(虽然我也没见过)类似,虽然已经死了,但是由于没人给它们收尸,还能四处走动.僵尸进程指的是那些虽然已经终止的进程,但仍然保留一些信息,等待其父进程为其收尸.僵尸进程如何产生的?如果一个进程在其终止的时候,自己就回收所有分配给它的资源,系统就不会产生所谓的僵尸进程了.那么我们说一个进程终止之后,还保留哪些信息?为什么终止之后还需要保留这些信息呢?一个进程终止的方法很多,进程终止后有些信息对于父进程和内核还是很有用的,例如进程的ID号.进程的退出状态.进程运行的

Linux查看系统状态命令

Linux查看系统状态命令     iostat iostat 命令详细地显示了存储子系统方面的情况.你通常用iostat来监控存储子系统总体上运行状况如何,并且在用户注意到服务器运行缓慢之前提早发现输入/输出缓慢的问题.相信我,你应该在用户发现这些问题之前先发现这些问题! meminfo和free meminfo为你详细显示了内存方面的情况.你通常可以使用另一个程序,比如cat和grep,来访问meminfo的信息.比如说,cat /proc/meminfo为你详细显示了服务器的内存在任何一个

修改 /var/lib/locales/supported.d/local 文件(使用 locale -a 命令查看系统中所有已配置的 locale)

转自:http://zyxhome.org/wp/cc-prog-lang/c-stdlib-setlocale-usage-note/ http://www.west263.com/info/html/caozuoxitong/FreeBSD/20090513/126191.html C 和 C++ 的标准库分别有自己的 locale 操作方法,C 标准库的 locale 设定函数是 setlocale(),而 C++ 标准库有 locale 类和流对象的 imbue() 方法.这篇是我自己的

Linux查看系统硬件信息命令

一.查看服务器硬件信息 (1)查看服务器型号.序列号 [[email protected] ~]# dmidecode|grep "System Information" -A9|egrep  "Manufacturer|Product|Serial"  (2)查看主板型号[[email protected] ~]# dmidecode |grep -A16 "System Information$"  (3)查看BIOS信息 [[email p

实现同一个脚本多次运行,系统中只有一个进程

编写脚本,实现同一个脚本多次运行,系统中只有一个进程 [email protected] scripts]#cat pid.sh #!/bin/sh pidpath=/tmp/a.pid if [ -f "$pidpath" ]   then     kill `cat $pidpath` >/dev/null 2>&1     rm -f $pidpath fi echo $$ >$pidpath sleep 300 测试如下 [email protecte

Linux 查看系统硬件信息(实例详解)

cpu lscpu命令,查看的是cpu的统计信息. [email protected]:~$ lscpu Architecture: i686 #cpu架构 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian #小尾序 CPU(s): 4 #总共有4核 On-line CPU(s) list: 0-3 Thread(s) per core: 1 #每个cpu核,只能支持一个线程,即不支持超线程 Core(s) per socket:

Linux查看系统开机时间

Linux查看系统开机时间 有时候需要查看Linux系统运行了多久时间,此时需要知道上次开机启动时间: 有时候由于断电或供电故障突然停机,需要查看Linux开机时间/重启时间:  下面总结一些查看Linux开机关机时间的方法(非常全面) 1: who 命令查看 who -b 查看最后一次系统启动的时间. who -r 查看当前系统运行时间 [[email protected] ~]# who -b system boot May 11 09:27 2: last  reboot 如下所示last

Linux查看系统block size的多种方法

Linux查看系统block size大小的方法: 1.tune2fs命令查看block size大小: [[email protected] tmp]# tune2fs -l /dev/sda1|grep "Block size" Block size:               1024 /dev/sda1 为/boot 分区的挂载点: 2.stat命令查看block size大小: [[email protected] tmp]# stat /boot/|grep "

Linux查看系统cpu个数、核心书、线程数

Linux查看系统cpu个数.核心书.线程数 现在cpu核心数.线程数越来越高,本文将带你了解如何确定一台服务器有多少个cpu.每个cpu有几个核心.每个核心有几个线程. 查看物理cpu个数 grep 'physical id' /proc/cpuinfo | sort -u 查看核心数量 grep 'core id' /proc/cpuinfo | sort -u | wc -l 查看线程数 grep 'processor' /proc/cpuinfo | sort -u | wc -l 实例