Linux/Unix Tutorial for Beginners - Top command

Publié le: 21 mai 2019
sur la chaîne: Coding GuruJi
177
4

This tutorial comprises of brief description with real time output of the top command

The top command is used for seeing currently running processes and the resources being consumes by them and other necessary/vital information about the processes.

PID: Shows task’s unique process id.
PR: Stands for priority of the task.
RES: Represents the amount of memory used by a process.
VIRT: Total virtual memory used by the task.
USER: User name of owner of task.
%CPU: Represents the CPU usage.
TIME+: CPU Time, the same as ‘TIME’, but reflecting more granularity through hundredths of a second.
SHR: Represents the Shared Memory size (kb) used by a task.
NI: Represents a Nice Value of task. A Negative nice value implies higher priority, and positive Nice value means lower priority.
%MEM: Shows the Memory usage of task..

The various options/combinations of top command are provided below:-
1. ) top
2. ) top then k for killing by process ID,
warning (Please be careful with CAPSLOCK as if k is provided with caps on then some unwanted process might get killed and may lead to undesired circumstances
3.) top -b -greater_than_sign FILENAME , for storing the output of top command to a file.
4.) Press 'H' while top is running to show threads instead of processes.

5.) Press 'c' while top is running to show full path of the processes.

6.) Press 'V' while top is running for forest view of the processes

7.) top -u username for listing process from a specific user.

8.) Press 'o' while top is running for adding filters.
Example of filters - COMMAND=top , %CPUgreater_than_sign2.5
9.) Pressing t for different CPU usage views of top command
10.) Pressing m for different Memory usage views of top command
11.) Saving top configuration by pressing 'W' while top is running
12.) press the following for sorting:-
M to sort by memory usage
P to sort by CPU usage
N to sort by process ID
T to sort by runnin time.
R to switch the sorting order(by default the order of sorting would be descending)
13.) top -n 10, the commadn will quit after refereshing for 10 repetitions


Sur cette page du site, vous pouvez voir la vidéo en ligne Linux/Unix Tutorial for Beginners - Top command durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Coding GuruJi 21 mai 2019, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 177 fois et il a aimé 4 téléspectateurs. Bon visionnage!