![]() ![]() Tasks: 242 total, 4 running, 238 sleeping, 0 stopped, 0 zombie ![]() Redirect or Save ‘top’ Output to File in run the same command on my Centos 6.3 and it worked perfectly, here are the result of command. Therefore, in the example above, we displayed the first 22 lines of top command output in batch mode. Note that head utility, by default displays the first ten lines of a file, that is when you do not specify the number of lines to be displayed. the -n option is used to specify the number of lines to be displayed.head utility displays the first few lines of a file and.-o : used to specify fields for sorting processes.To display the top 15 processes sorted by memory use in descending order, do: # top -b -o +%MEM | head -n 22Īs opposed to the previous tip, here you have to use +%MEM (note the plus sign) to sort the output in descending order: List Top 15 Processes By Memory Usage Perhaps there’s an extra advantage of this approach when compared to the previous one: the “header” of top provides extra information about the current status and usage of the system: the uptime, load average, and total number of processes, to name a few examples. ![]() Similarly to the previous tip about find out top processes by RAM and CPU usage, you can also use top command to view the same information. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |