GNULinux tips

From Karnataka Open Educational Resources
Revision as of 06:56, 27 June 2014 by Gurumurthy (talk | contribs) (Created page with "command: top purpose: display Linux tasks.It can display system summary information as well as a list of tasks currently being managed by the ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

command: top purpose: display Linux tasks.It can display system summary information

              as  well  as  a list  of  tasks  currently being managed by the
              Linux kernel

syntax: top -hv | -bcHisS -d -n -p

           -b batchmode
           -c command line/program name
           -d delay time interval
           -h help
           -H threads toggle
           -i idle processes
           -n number of iterations
           -u monitor by user
           -U monitor by user with UID
           -p monitor PID
           -s secure mode operation
           -S cumulative time mode
           -v version

examples:

1. $top

   display information like tasks, memory, cpu, and swap press q to quit

2. to display specific user process

   $top -u username

3. when top is running Press (Shift+O) to Sort field via field letter, for

   example press ‘a‘ letter to sort process with PID (Process ID)

4. Press ‘z‘ option in running top command will display running process

   in color which may help you to identified running process easily

5. Top output keep refreshing until we press ‘q‘. With below command top

   command will automatically exit after 10 number of repetition.
   $top -n 10

6. top -h to obtain top command help

   $top -h

7. to save top command results

   $top  shift+w