top: Difference between revisions
From Leechfinger
Jump to navigationJump to search
No edit summary |
No edit summary |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=== | === Show all cpu cores === | ||
Press 1. | Press 1. | ||
=== | === Show absolute path of the processes === | ||
Press c. | Press c. | ||
=== Show swap === | === Show swap === | ||
Line 23: | Line 23: | ||
=== Change priority of a process (renice) === | === Change priority of a process (renice) === | ||
Press r <pid>, type range -20 to 19, where -20 is the highest priority. | Press r <pid>, type range -20 to 19, where -20 is the highest priority. | ||
=== Kill Pid === | |||
Press k <pid>. | |||
=== Display full username === | |||
Press X and then type 10. | |||
=== Change refresh rate === | |||
Press d <num>. The number is in seconds. | |||
=== Display in crazy color === | |||
Press z. | |||
=== Save top command results in file === | |||
<syntaxhighlight lang="bash">$ top -n 1 -b > top-output.txt</syntaxhighlight> | |||
=== Getting top command help === | |||
Press h. | |||
=== Exit top command after specific repetition === | |||
<syntaxhighlight lang="bash">$ top -n 10</syntaxhighlight> | |||
[[Category:Commands]] | [[Category:Commands]] |
Latest revision as of 19:03, 4 May 2025
Show all cpu cores
Press 1.
Show absolute path of the processes
Press c.
Show swap
Press f, use arrow keys to move to SWAP, press space bar to select, press esc. Swap will show on the right hand side.
Sort by something
Press f, move to the field you want to sort by, press s to sort then esc.
View number of threads and sort by it
Press f, move to nTH, press speacebar to choose, press s to sort, press esc.
Sort by memory
Press M.
Sort by CPU
Press P.
Sort by Pid
Press N.
Time running
Press T for highest time. Press M for highest mem used and time.
Display only for one user
$ top -u <user>
All idle processes
Press i.
Change priority of a process (renice)
Press r <pid>, type range -20 to 19, where -20 is the highest priority.
Kill Pid
Press k <pid>.
Display full username
Press X and then type 10.
Change refresh rate
Press d <num>. The number is in seconds.
Display in crazy color
Press z.
Save top command results in file
$ top -n 1 -b > top-output.txt
Getting top command help
Press h.
Exit top command after specific repetition
$ top -n 10