Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

schedule vmstat command and store output in a text file

user13376823Feb 21 2012 — edited Feb 22 2012
Dear Experts,

i want to ask you some question while sharing what i did to achieve that.

i want to know memory and cpu usage for my linux RedHat enterprise linux server.

can i get all this information with command cc ( running vmstat command after every 60 seconds 100 times ).

i want to store this file output in a text file like

vmstat -n 60 100 >> cpu_and_memory.txt ( i have seen and it works fine).

to schedule all above work through crontab i wrote a shell script

*/usr/bin/vmstat -n 3 6 >> /opt/cpu_and_memory_usage.txt ( contents of a shell script*

and i scheduled in crontab ( 00 18 * * /opt/process_usage.sh )*

but no out put is generated.

how do i proceed.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 21 2012
Added on Feb 21 2012
4 comments
1,236 views