Results 1 to 3 of 3
Hi all ,
when i type command top I got the message as follws
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 15 0 ...
- 07-01-2009 #1Just Joined!
- Join Date
- Jun 2009
- Posts
- 4
how TOP command gets USER information
Hi all ,
when i type command top I got the message as follws
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 15 0 2100 720 624 S 0.0 0.1 0:01.06 init
2 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
3 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
4 root 10 -5 0 0 0 S 0.0 0.0 0:00.04 events/0
5 root 18 -5 0 0 0 S 0.0 0.0 0:00.00 khelper
6 root 11 -5 0 0 0 S 0.0 0.0 0:00.00 kthread
9 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kblockd/0
I want to know how this top command getting USER information exactly.
- 07-02-2009 #2Just Joined!
- Join Date
- Jun 2009
- Posts
- 5
The top program provides a dynamic real-time view of a running system.
It can display system summary information as well as a list of tasks
currently being managed by the Linux kernel. The types of system sum-
mary information shown and the types, order and size of information
displayed for tasks are all user configurable and that configuration
can be made persistent across restarts.
- 07-02-2009 #3If i'm not wrong,all process related informations are obtain from /proc directory.Here you will have a directory for each and every running process will have thier information here.Check man proc.how this top command getting USER information exactly.
You can also explore source code top,to exactly track down how it ges the info.- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------


Reply With Quote