Link to home
Start Free TrialLog in
Avatar of MichaelBalack
MichaelBalackFlag for Singapore

asked on

How to print out the results of specific linux top commands?

This is using a physical SuSE Enterprise Linux 11 SP3 server, with 64 GB RAM installed. However, recently we found that the system is always used up to 50 GB of RAM. In order to find what processes are occupied this memory, I ran top command, shift+F, and then select o (to sorting with VIRT). I am quite satisfy with top results. From the top, quite a number of "java" processes in display. btw, how can i print out this result. I ever tried "top -b > /root/top_results.txt", I have to ctrl+c and i can see that the results are the results of the top command.

Thanks in advance.
Avatar of shanejeremy james
shanejeremy james

The top command allows users to monitor processes and system resource usage on Linux. It is one of the most useful tools in a sysadmin’s toolbox, and it comes per-installed on every distribution. Unlike other commands such as ps, it is interactive, and you can browse through the list of processes, kill a process, and so on.
Avatar of Alan
You can pipe it into a txt file - is that what you mean?

Top > filename.txt


Alan.
Avatar of MichaelBalack

ASKER

Hi Alan,

Yes, however the results I want is top results sorted by VIRT.
ASKER CERTIFIED SOLUTION
Avatar of simon3270
simon3270
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for expert Simon3270 in suggesting using the correct parameter. It works