<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Top utility in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/top-utility/m-p/3390959#M14231</link>
    <description>Rahul,&lt;BR /&gt;&lt;BR /&gt;Have you reviewed the man pages for top?&lt;BR /&gt;$ man top&lt;BR /&gt;&lt;BR /&gt;Depending on the version of top you're using, you might have -b and -n options.&lt;BR /&gt;My version of top...&lt;BR /&gt;$ top -v&lt;BR /&gt;top (procps version 2.0.7)&lt;BR /&gt;&lt;BR /&gt;..has these options:&lt;BR /&gt;&lt;BR /&gt;       n    Number  of iterations. Update the display this number&lt;BR /&gt;            of times and then exit.&lt;BR /&gt;&lt;BR /&gt;       b    Batch mode. Useful for sending  output  from  top  to&lt;BR /&gt;            other  programs or to a file.  In this mode, top will&lt;BR /&gt;            not accept command line input. It runs until it  pro-&lt;BR /&gt;            duces  the  number of iterations requested with the n&lt;BR /&gt;            option or until killed. Output is plain text suitable&lt;BR /&gt;            for display on a dumb terminal.&lt;BR /&gt;&lt;BR /&gt;By default top refreshes every 5 seconds, so if you have the above options, you might simply run:&lt;BR /&gt;$ top -b -n 720 &amp;gt; filename &amp;amp;&lt;BR /&gt;&lt;BR /&gt;-Jared</description>
    <pubDate>Fri, 01 Oct 2004 00:40:08 GMT</pubDate>
    <dc:creator>Jared Middleton</dc:creator>
    <dc:date>2004-10-01T00:40:08Z</dc:date>
    <item>
      <title>Top utility</title>
      <link>https://community.hpe.com/t5/operating-system-linux/top-utility/m-p/3390958#M14230</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I want to write a script that would execute 'top' in the background for 1 hour time and collect the reports in a file.&lt;BR /&gt;&lt;BR /&gt;Can anyone please help me.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Rahul</description>
      <pubDate>Thu, 30 Sep 2004 13:37:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/top-utility/m-p/3390958#M14230</guid>
      <dc:creator>Rahul_13</dc:creator>
      <dc:date>2004-09-30T13:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: Top utility</title>
      <link>https://community.hpe.com/t5/operating-system-linux/top-utility/m-p/3390959#M14231</link>
      <description>Rahul,&lt;BR /&gt;&lt;BR /&gt;Have you reviewed the man pages for top?&lt;BR /&gt;$ man top&lt;BR /&gt;&lt;BR /&gt;Depending on the version of top you're using, you might have -b and -n options.&lt;BR /&gt;My version of top...&lt;BR /&gt;$ top -v&lt;BR /&gt;top (procps version 2.0.7)&lt;BR /&gt;&lt;BR /&gt;..has these options:&lt;BR /&gt;&lt;BR /&gt;       n    Number  of iterations. Update the display this number&lt;BR /&gt;            of times and then exit.&lt;BR /&gt;&lt;BR /&gt;       b    Batch mode. Useful for sending  output  from  top  to&lt;BR /&gt;            other  programs or to a file.  In this mode, top will&lt;BR /&gt;            not accept command line input. It runs until it  pro-&lt;BR /&gt;            duces  the  number of iterations requested with the n&lt;BR /&gt;            option or until killed. Output is plain text suitable&lt;BR /&gt;            for display on a dumb terminal.&lt;BR /&gt;&lt;BR /&gt;By default top refreshes every 5 seconds, so if you have the above options, you might simply run:&lt;BR /&gt;$ top -b -n 720 &amp;gt; filename &amp;amp;&lt;BR /&gt;&lt;BR /&gt;-Jared</description>
      <pubDate>Fri, 01 Oct 2004 00:40:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/top-utility/m-p/3390959#M14231</guid>
      <dc:creator>Jared Middleton</dc:creator>
      <dc:date>2004-10-01T00:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Top utility</title>
      <link>https://community.hpe.com/t5/operating-system-linux/top-utility/m-p/3390960#M14232</link>
      <description>hi &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# nohup top -d 30 -n 200 -s &amp;gt;/tmp/temptop.out&lt;BR /&gt;&lt;BR /&gt;where -d indicates time interval betwwen each top command&lt;BR /&gt;-n indicates number of top outputs &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;good luck&lt;BR /&gt;&lt;BR /&gt;ram</description>
      <pubDate>Fri, 01 Oct 2004 02:51:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/top-utility/m-p/3390960#M14232</guid>
      <dc:creator>ramkumar</dc:creator>
      <dc:date>2004-10-01T02:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: Top utility</title>
      <link>https://community.hpe.com/t5/operating-system-linux/top-utility/m-p/3390961#M14233</link>
      <description>We can run top based on time delay and count. If you run continuously, there might not be more changes. You can use delay of five secs there.&lt;BR /&gt;&lt;BR /&gt; So that,&lt;BR /&gt;------------------------------ &lt;BR /&gt;#!/bin/sh&lt;BR /&gt;# top script&lt;BR /&gt;# top.sh &lt;HOUR&gt; &lt;SECOND delay=""&gt;&lt;BR /&gt;time=0&lt;BR /&gt;count=1&lt;BR /&gt;hour=${1:-1}&lt;BR /&gt;sleep=${2:-5}&lt;BR /&gt;&lt;BR /&gt;while [[ $time -le $(($hour*3600)) ]]&lt;BR /&gt;do &lt;BR /&gt;  &lt;BR /&gt;  # Secure mode and run 1 count&lt;BR /&gt;  top -s -n 1 &amp;gt;&amp;gt; /tmp/topinfo.$count&lt;BR /&gt;  sleep 5 &lt;BR /&gt;  let count=count+1&lt;BR /&gt;  let time=time+5&lt;BR /&gt;  &lt;BR /&gt;done &lt;BR /&gt;&lt;BR /&gt;# exit&lt;BR /&gt;exit 0&lt;BR /&gt;--------------------&lt;BR /&gt;Run this script as,&lt;BR /&gt;&lt;BR /&gt; sh top.sh 1 5 &amp;amp;&lt;BR /&gt; so that it will run in background&lt;BR /&gt;&lt;BR /&gt;and exit after 1 hour&lt;BR /&gt;&lt;BR /&gt;You can collect data informations there at /tmp/topinfo.* files there.&lt;BR /&gt; &lt;BR /&gt;&lt;/SECOND&gt;&lt;/HOUR&gt;</description>
      <pubDate>Fri, 01 Oct 2004 08:38:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/top-utility/m-p/3390961#M14233</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2004-10-01T08:38:17Z</dc:date>
    </item>
  </channel>
</rss>

