Find the answer to your Linux question:
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 ...
  1. #1
    Just 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.

  2. #2
    Just 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.

  3. #3
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568
    how this top command getting USER information exactly.
    If 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.

    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
    -------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...