[PLUG] top > file scheduling

Kulkarni Shantanu linux at shantanukulkarni.org
Sun Feb 8 17:45:14 IST 2009


* Abhishek Nagar <nagar.ksp at gmail.com> [090208 17:27]:
> i need to store the output of "top" in a file five times a day, so i 
> planned to put it in cronjobs but it doesnot work what could be the problem

do you have problem with top or with cron? If with top, you might want
to try,
# top -b -n1

for cron, you can say like this in crontab,

00 09,11,13,15,17 * * * /usr/bin/top -b -n1 >> /tmp/top.log


substitute the hour field with your required value.


Shantanu
-- 
www.shantanukulkarni.org




More information about the Plug-mail mailing list