• How to dump top Command Output to a File?

     The top is one of the most frequently used command by system administrative. It provides a dynamic real-time display of all running tasks. It display full system summary with a list of processes and threads which are controled by the Linux kernel.

    You can save real time viewing of the running system by using '-n' and '-b' option.
    '-n' - option specifies the maximim number of iteration i.e. if you want to save the output one time then type '1' as shown in the command.
    'b' - option is used when you wnat to save the 'top' output to other program or file.
    and to see the saved output from the file use cat command. As shown below:
    1. To save 'top' output with single iteration
    Below command will save the top command output with '1' iteration i.e. output will be save one time.

    <p>&nbsp;# top -n 1 -b &gt; output.txt</p>
    <div># cat top.txt</div>

Most Liked Posts

Post A Comment

Your email address will not be published. Required fields are marked*



No Record found
demo content

The Total Economic Impactâ„¢ of ServiceNow

United States Tue Jun 06 2017

Join us for a webinar where we will reveal the quantified value of the Lightspeed Enterprise for customers that are modernizing IT, eliminating service outages, and optimizing performance with real-time analytics.

Guest speakers Liz Witherspoon of Forrester, and study participant Brad Paubel, VP of Internal Technologies at Maritz, will discuss

  • The value drivers for IT and key quantified economic benefits
  • Key challenges that study customers faced and overcame
  • Focus areas and best practices you can use to drive business impact with ServiceNow


Webinar Registration

Enter the characters visible in the box below



Share using

Advertise With Us