[sf-lug] logging top

Sameer Verma sverma at sfsu.edu
Fri Jul 9 13:20:36 PDT 2010


On Thu, Jul 8, 2010 at 7:04 PM, Ken Shaffer <kenshaffer80 at gmail.com> wrote:
> The man page documents -d5.0 as the switch for a 5 sec delay between pages
> on my Ubuntu system. Redirect stdout to a file, and you have it (but in
> looking at the file, don't use cat, you will only see the last page in a
> standard gnome terminal).
> Ken
> :
>>
>> On 07/08/2010 03:13 PM, Sameer Verma wrote:
>>>
>>> Is there a way to log output from top to a log file at a preset time
>>> interval (say, every 5 seconds)? The system in question is running
>>> Fedora 9.
>>>
>>> cheers,
>>> Sameer
>>
>> Run "top -b -n 1 >> SomeLogFile.log" in a cron job?
>>
>> BTW, that's going to be a *very* big log file if you do that every 5
>> seconds.
>>
>> DR
>>
>> _______________________________________________
>> sf-lug mailing list
>> sf-lug at linuxmafia.com
>> http://linuxmafia.com/mailman/listinfo/sf-lug
>> Information about SF-LUG is at http://www.sf-lug.org/
>
>
> _______________________________________________
> sf-lug mailing list
> sf-lug at linuxmafia.com
> http://linuxmafia.com/mailman/listinfo/sf-lug
> Information about SF-LUG is at http://www.sf-lug.org/
>

Thanks for the tips. I found nmon instead, which does exactly what I
want. CPU, Memory, Disk, etc. out to csv or to rrdtool for graphing.
http://nmon.sourceforge.net/pmwiki.php

cheers,
Sameer
-- 
Dr. Sameer Verma, Ph.D.
Associate Professor, Information Systems
Director, Campus Business Solutions
San Francisco State University
http://verma.sfsu.edu/
http://opensource.sfsu.edu/
http://cbs.sfsu.edu/
http://is.sfsu.edu/




More information about the sf-lug mailing list