To list all the processes of a specific user, use ps and give the username to list as an argument to the `-u’ option. While you can’t snoop on the actual activities of other users, you can list the commands they are running at a given moment.

  • To list all the processes that user hst has running on the system, type:
    $ ps -u root
[root@pwas1 ~]# ps -u root
PID TTY TIME CMD
1 ? 00:00:03 init
2 ? 00:02:31 migration/0
3 ? 00:00:00 ksoftirqd/0
4 ? 00:00:44 migration/1
5 ? 00:00:00 ksoftirqd/1
6 ? 00:00:30 migration/2
7 ? 00:00:00 ksoftirqd/2
8 ? 00:00:26 migration/3
9 ? 00:00:00 ksoftirqd/3
10 ? 00:00:27 migration/4
11 ? 00:00:00 ksoftirqd/4
12 ? 00:00:25 migration/5
13 ? 00:00:00 ksoftirqd/5
14 ? 00:00:25 migration/6
15 ? 00:00:00 ksoftirqd/6
16 ? 00:00:23 migration/7
17 ? 00:00:00 ksoftirqd/7
18 ? 00:00:00 events/0
19 ? 00:00:00 events/1
20 ? 00:00:00 events/2
21 ? 00:00:00 events/3
22 ? 00:00:00 events/4
23 ? 00:00:00 events/5
24 ? 00:00:00 events/6
25 ? 00:00:00 events/7
26 ? 00:00:21 khelper
27 ? 00:00:00 kacpid
97 ? 00:00:00 kblockd/0
98 ? 00:00:00 kblockd/1
99 ? 00:00:00 kblockd/2
100 ? 00:00:00 kblockd/3
101 ? 00:00:00 kblockd/4
102 ? 00:00:00 kblockd/5
103 ? 00:00:00 kblockd/6
104 ? 00:00:00 kblockd/7
105 ? 00:00:00 khubd
122 ? 00:01:43 pdflush
123 ? 00:02:57 pdflush
124 ? 00:00:12 kswapd0
125 ? 00:00:00 aio/0
126 ? 00:00:00 aio/1
127 ? 00:00:00 aio/2
128 ? 00:00:00 aio/3
129 ? 00:00:00 aio/4
130 ? 00:00:00 aio/5
131 ? 00:00:00 aio/6
132 ? 00:00:00 aio/7
276 ? 00:00:00 kseriod
632 ? 00:00:00 scsi_eh_0
633 ? 00:00:00 qla2400_0_dpc
643 ? 00:00:00 scsi_eh_1
644 ? 00:00:00 qla2400_1_dpc
711 ? 00:13:26 kjournald

Post By Gishore J Kallarackal (2,121 Posts)

Gishore J Kallarackal is the founder of techgurulive. The purpose of this site is to share information about free resources that techies can use for reference. You can follow me on the social web, subscribe to the RSS Feed or sign up for the email newsletter for your daily dose of tech tips & tutorials. You can content me via @twitter or e-mail.

Website: → Techgurulive

Connect