Top Command in Linux

What is Top Command in Linux

Definition: Top command is use for to monitor the processes in Linux operating system, actually top is a task manager similar to windows operating system. Top is most useful system administrative command to monitor the process. The top command is use to view the real time process of the system. Their are different version of top in different operating system.Top in Unix version was written by William LeFebvre since 1984, in Linux top is procps-ng group of tools that was written by Roger Binns, in solaris top is prstat program and in windows top is a task manager.

By the use of top command in Linux Operating System user's can view the real time process PID, USER, PR, NI, VIRT, RES, SHR, %CPU, %MEM, TIME and Command, detail information of each are mention below.

PID: PID is a process id of each running task. The task may be audit, snmp and etc.

USER: User is shows the all users that is owner or custodian of the running process.

PR: PR is the priority of the task means process.

NI: NI is shows the Nice Value of task. The negative nice value means the higher priority, and the positive nice value means the lower priority of the process (task).

VIRT: VIRT is shows the total virtual memory of the machine that is used by the process (task).

RES: RES is shows the resident size of actual physical memory that each process is consume.

SHR: SHR is shows the amount of shared memory size (kb) that is used by the process (task).

%CPU: The %CPU is shows the CPU usage of the running process (task).

%MEM: %MEM is shows the Shows the Memory usage of the process (task).

TIME+: Time+ is shows the consumption of CPU time (+ mean hundredths),It shows the total time that has been consumed till, when the process was started by specific user.

Command: Command is shows the command of each process (task). In top command, press c to give the detail path of command.

Most useful administrative command of "top" are as follows.

- To view the specific user process (task), type the below mention command.

top -u owais

- To save the result of top command, type the below mention command. Here top.txt is the file name that will save on provide path.

top -n 1 -b > top.txt

- To monitor the processes by use of top command for certain seconds, type the below mention command.

top -n 5

Note: 5 is a seconds.

- To check the version of top command in Linux base operating system, type the below mention command.

top -h

- To view the top command from last close state, type the below mention command.

top -c

- To monitor the processes by use of top command in secure mode, type the below mention command.

top -s

- Change the top command process refresh interval, press key "d" during the running top command. By-default during the running top command process refresh interval is 3 seconds.

- To view the running process (task) in color, press key "z" during the running top command.

- To view the complete path of the running process, press key "c" during the running top command. The complete path will shows in the column of "command".

- To kill the running process by use of PID (Process ID), press key "k" during the running top command and provide the process id.

- To view the high value of CPU consumption first, press keys "shift+P" during the running top command.

- To change the priority of the process means renice (negative nice to positive nice or positive nice to negative nice) the process, press key "r" during the running top command and provide the process id.

Thanks to read this Article

Comments

  1. Thanks for this blog. I have found some interesting blogs on google. You can check these blogs also which are related to technologies….

    Job Oriented Linux Training Institute in Delhi, NCR
    Job Oriented AWS Training Institute in Delhi, NCR

    ReplyDelete
  2. I have read all the comments and suggestions posted by the visitors for this article are very fine, We will wait for your next article so only. Thanks!

    Best Institute for AutoCAD Training Course in Delhi, NCR
    Certified JAVA Training Institute in Delhi with Placement

    ReplyDelete
  3. The article was up to the point and described the information very effectively. Thanks to blog author for wonderful and informative post.

    Online Base-Advanced Python Training Institute in Delhi, NCR
    Online & Classroom Advanced Excel Training Course in Delhi, NCR

    ReplyDelete
  4. THANK YOU for this amazing and for sharing this blog with us, it is very helpful.
    please keep updated us more about like this type of blog.
    If someone is looking for the best java training institute for software training in Ghaziabad, java training institute
    It is the best place from where you get the practical knowledge of java training institute here. You will be an expert in this field after doing the java training.

    ReplyDelete
  5. You are providing good knowledge. It is really helpful and factual information for us and everyone to increase knowledge. about job oriented vlsi training institute in bangalore .Continue sharing your data. Thank you.

    ReplyDelete

Post a Comment