查看Linux服务进程

查看服务进程:ps aux
ps -ef
查看服务cpu利用:top
查看服务对应端口:netstat -nlp

[root@localhost ~]# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 15:20 ? 00:00:00 init [3]
root 2 1 0 15:20 ? 00:00:00 [migration/0]
root 3 1 0 15:20 ? 00:00:00 [ksoftirqd/0]
root 4 1 0 15:20 ? 00:00:00 [watchdog/0]
root 5 1 0 15:20 ? 00:00:00 [events/0]
root 6 1 0 15:20 ? 00:00:00 [khelper]
root 7 1 0 15:20 ? 00:00:00 [kthread]
root 10 7 0 15:20 ? 00:00:00 [kblockd/0]
root 11 7 0 15:20 ? 00:00:00 [kacpid]

root 65 7 0 15:20 ? 00:00:00 [cqueue/0]
root 68 7 0 15:20 ? 00:00:00 [khubd]
root 70 7 0 15:20 ? 00:00:00 [kseriod]
root 135 7 0 15:20 ? 00:00:00 [khungtaskd]
root 136 7 0 15:20 ? 00:00:00 [pdflush]
root 137 7 0 15:20 ? 00:00:00 [pdflush]
root 138 7 0 15:20 ? 00:00:00 [kswapd0]
root 139 7 0 15:20 ? 00:00:00 [aio/0]
root 292 7 0 15:20 ? 00:00:00 [kpsmoused]
root 315 7 0 15:20 ? 00:00:00 [ata/0]
root 316 7 0 15:20 ? 00:00:00 [ata_aux]
root 321 7 0 15:20 ? 00:00:00 [kstriped]
root 330 7 0 15:20 ? 00:00:00 [ksnapd]
root 341 7 0 15:20 ? 00:00:00 [vmbusQ/0]
root 342 7 0 15:20 ? 00:00:00 [control/0]
root 343 7 0 15:20 ? 00:00:00 [control/0]
root 344 7 0 15:20 ? 00:00:00 [control/0]
root 345 7 0 15:20 ? 00:00:00 [control/0]
root 348 7 0 15:20 ? 00:00:00 [control/0]
root 349 7 0 15:20 ? 00:00:00 [control/0]
root 350 7 0 15:20 ? 00:00:00 [control/0]
root 360 7 0 15:20 ? 00:00:00 [scsi_eh_0]
root 379 7 0 15:20 ? 00:00:00 [kjournald]
root 405 7 0 15:21 ? 00:00:00 [kauditd]
root 438 1 0 15:21 ? 00:00:00 /sbin/udevd -d
root 1153 7 0 15:21 ? 00:00:00 [kmpathd/0]
root 1154 7 0 15:21 ? 00:00:00 [kmpath_handlerd]
root 1213 7 0 15:21 ? 00:00:00 [kjournald]
root 1627 1 0 15:22 ? 00:00:00 auditd
root 1629 1627 0 15:22 ? 00:00:00 /sbin/audispd
root 1660 1 0 15:22 ? 00:00:00 syslogd -m 0
root 1664 1 0 15:22 ? 00:00:00 klogd -x
rpc 1730 1 0 15:22 ? 00:00:00 portmap
root 1761 7 0 15:22 ? 00:00:00 [rpciod/0]
root 1767 1 0 15:22 ? 00:00:00 rpc.statd
root 1801 1 0 15:22 ? 00:00:00 rpc.idmapd
dbus 1826 1 0 15:22 ? 00:00:00 dbus-daemon –system
root 1840 1 0 15:22 ? 00:00:00 /usr/sbin/hcid
root 1844 1 0 15:22 ? 00:00:00 /usr/sbin/sdpd
root 1869 1 0 15:22 ? 00:00:00 [krfcommd]
root 1914 1 0 15:22 ? 00:00:00 pcscd
root 1929 1 0 15:22 ? 00:00:00 /usr/sbin/acpid
68 1947 1 0 15:22 ? 00:00:00 hald
root 1948 1947 0 15:22 ? 00:00:00 hald-runner
68 1956 1948 0 15:22 ? 00:00:00 hald-addon-acpi: listening on ac
68 1962 1948 0 15:22 ? 00:00:00 hald-addon-keyboard: listening o
root 1970 1948 0 15:22 ? 00:00:07 hald-addon-storage: polling /dev
root 1989 1 0 15:22 ? 00:00:00 /usr/bin/hidd –server
root 2014 1 0 15:22 ? 00:00:00 automount
root 2056 1 0 15:22 ? 00:00:00 /usr/sbin/sshd
root 2083 1 0 15:22 ? 00:00:00 cupsd
root 2110 1 0 15:22 ? 00:00:00 sendmail: accepting connections
smmsp 2118 1 0 15:22 ? 00:00:00 sendmail: Queue runner@01:00:00
root 2133 1 0 15:22 ? 00:00:00 gpm -m /dev/input/mice -t exps2
root 2147 1 0 15:22 ? 00:00:00 crond
xfs 2185 1 0 15:22 ? 00:00:00 xfs -droppriv -daemon
root 2241 1 0 15:22 ? 00:00:00 Xvnc :1 -desktop localhost.local
root 2246 1 0 15:23 ? 00:00:00 /usr/bin/gnome-session
root 2263 1 0 15:23 ? 00:00:00 anacron -s
root 2277 1 0 15:23 ? 00:00:00 /usr/sbin/atd
avahi 2315 1 0 15:23 ? 00:00:00 avahi-daemon: running [localhost
avahi 2316 2315 0 15:23 ? 00:00:00 avahi-daemon: chroot helper
root 2351 1 0 15:23 ? 00:00:00 /usr/sbin/smartd -q never
root 2355 1 0 15:23 ? 00:00:00 login — root
root 2356 1 0 15:23 tty2 00:00:00 /sbin/mingetty tty2
root 2357 1 0 15:23 tty3 00:00:00 /sbin/mingetty tty3
root 2358 1 0 15:23 tty4 00:00:00 /sbin/mingetty tty4
root 2359 1 0 15:23 tty5 00:00:00 /sbin/mingetty tty5
root 2360 1 0 15:23 tty6 00:00:00 /sbin/mingetty tty6
root 2417 2246 0 15:23 ? 00:00:00 [xinitrc]
root 2420 2246 0 15:23 ? 00:00:00 /usr/bin/ssh-agent /usr/bin/dbus
root 2423 1 0 15:23 ? 00:00:00 /usr/bin/dbus-launch –exit-with
root 2424 1 0 15:23 ? 00:00:00 /bin/dbus-daemon –fork –print-
root 2432 1 0 15:23 ? 00:00:00 /usr/libexec/gconfd-2 5
root 2433 2355 0 15:23 tty1 00:00:00 -bash
root 2467 1 0 15:23 ? 00:00:00 /usr/bin/gnome-keyring-daemon
root 2469 1 0 15:23 ? 00:00:00 /usr/libexec/gnome-settings-daem
root 2470 1 0 15:23 ? 00:00:00 /usr/lib/scim-1.0/scim-launcher
root 2487 1 0 15:23 ? 00:00:00 /usr/libexec/bonobo-activation-s
root 2489 1 0 15:23 ? 00:00:00 /usr/bin/python -tt /usr/sbin/yu
root 2491 1 0 15:23 ? 00:00:00 /usr/libexec/gam_server
root 2494 1 0 15:23 ? 00:00:00 /usr/lib/scim-1.0/scim-helper-ma
root 2495 1 0 15:23 ? 00:00:00 /usr/lib/scim-1.0/scim-panel-gtk
root 2497 1 0 15:23 ? 00:00:00 /usr/lib/scim-1.0/scim-launcher
root 2501 1 0 15:23 ? 00:00:00 /usr/libexec/vino-server –oaf-a
root 2504 1 0 15:23 ? 00:00:00 metacity –sm-client-id=default1
root 2509 1 0 15:23 ? 00:00:00 gnome-panel –sm-client-id defau
root 2511 1 0 15:23 ? 00:00:00 nautilus –no-default-window –s
root 2522 1 0 15:23 ? 00:00:00 /usr/libexec/gnome-vfs-daemon
root 2524 1 0 15:23 ? 00:00:00 eggcups –sm-client-id default4
root 2532 1 0 15:23 ? 00:00:00 /usr/libexec/wnck-applet –oaf-a
root 2534 1 0 15:23 ? 00:00:00 /usr/libexec/trashapplet –oaf-a
root 2554 1 0 15:23 ? 00:00:00 bt-applet –sm-disable
root 2559 1 0 15:23 ? 00:00:00 nm-applet –sm-disable
root 2560 1 0 15:23 ? 00:00:00 ./escd –key_Inserted=”/usr/bin/
root 2562 1 0 15:23 ? 00:00:00 /usr/bin/python -tt /usr/bin/pup
root 2570 1 0 15:23 ? 00:00:00 pam-panel-icon –sm-client-id de
root 2575 1 0 15:23 ? 00:00:00 /usr/sbin/nm-system-settings –c
root 2576 1 0 15:23 ? 00:00:00 gnome-power-manager
root 2577 2570 0 15:23 ? 00:00:00 /sbin/pam_timestamp_check -d roo
root 2591 1 0 15:23 ? 00:00:00 /usr/libexec/mapping-daemon
root 2601 1 0 15:23 ? 00:00:00 gnome-screensaver
root 2612 1 0 15:23 ? 00:00:00 /usr/libexec/notification-area-a
root 2614 1 0 15:23 ? 00:00:00 /usr/libexec/clock-applet –oaf-
root 2616 1 0 15:23 ? 00:00:00 /usr/libexec/mixer_applet2 –oaf
root 2621 1 0 15:24 ? 00:00:00 /usr/libexec/notification-daemon
root 3057 2056 0 15:30 ? 00:00:00 sshd: root@pts/0
root 3059 3057 0 15:31 pts/0 00:00:00 -bash
root 3090 2056 0 15:32 ? 00:00:00 sshd: root@notty
root 3092 3090 0 15:32 ? 00:00:00 /usr/libexec/openssh/sftp-server
root 3127 2056 0 15:43 ? 00:00:00 sshd: root@pts/1
root 3129 3127 0 15:43 pts/1 00:00:00 -bash
root 3173 2056 0 15:51 ? 00:00:00 sshd: root@notty
root 3175 3173 0 15:51 ? 00:00:00 /usr/libexec/openssh/sftp-server
root 3194 2056 0 15:52 ? 00:00:00 sshd: root@pts/2
root 3196 3194 0 15:52 pts/2 00:00:00 -bash
root 3224 3196 0 15:52 pts/2 00:00:00 top
root 3231 3196 0 15:55 pts/2 00:00:00 ps -ef

Leave a Reply