VMSTAT script / command help


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting VMSTAT script / command help
# 1  
Old 09-08-2008
VMSTAT script / command help

Hello all, I know it can be done but don't know the command.

I would like to run vmstat via cron, I don't know a good interval and don't want huge logs but want stats pretty often.

Please someone who uses vmstat via cron let me know what your script looks like.

Thank you
# 2  
Old 09-08-2008
We run this everymorning at 12:02 am:

vmstat 60 1440 > /path/to/vmstat.`date +%d`

This will write to a file every minute for 24 hours then create a new file and start over.

We then have another script that summarizes the data and builds graphs and emails them everyday.
# 3  
Old 09-08-2008
Can you post or IM the other script too, a graph would be a cool visual feature. I am not sure what is required for it to run and display right but if I can I think id like to use it.

Thanks.
# 4  
Old 09-08-2008
Its acutally a collection of several scripts. I import all the vmstat datainto a sql database and then have a whole website that builds the graphs (images) as requested using Perl GD:Graph Link:GD::Graph - Graph Plotting Module for Perl 5 - search.cpan.org

Here is a sample of the graph that is built:

Image

GD:Graph is not a difficult module to use.
# 5  
Old 09-08-2008
Quote:
Originally Posted by Ikon
We run this everymorning at 12:02 am:
02 0 * * * (path to script)

Is that correct?

Quote:
Originally Posted by Ikon
vmstat 60 1440 > /path/to/vmstat.`date +%d`
For this to be a script it would be...

#/bin/bash
vmstat 60 1440 > /path/to/vmstat.`date +%d`

Is that right?

Sorry I am somewhat new to scripts and cron...

Thank you for your help.
# 6  
Old 09-08-2008
Yes that looks correct.
# 7  
Old 09-09-2008
Quote:
Originally Posted by Ikon
We run this everymorning at 12:02 am:

vmstat 60 1440 > /path/to/vmstat.`date +%d`

This will write to a file every minute for 24 hours then create a new file and start over.
Where would this create the file? In the /path/to/vmstat? If so can I path it to another dir?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

Vmstat

I m checking idle time using vmstat, below are the results var=$(ssh wmtmgr@$hostname vmstat | tail -1 | awk '{print $15}') 89 and now im subtracting 89 with 100 & im getting expected results expr 100 - $var 11 Now How can I get the result 11 in one line code? (4 Replies)
Discussion started by: sam@sam
4 Replies

2. Shell Programming and Scripting

One script for Linux Monitoring-free, sar, vmstat, mpstat

HI , I am wrirting a script for checking the performance monitoring on Linux System when my application is running. I have to run a test for 30 minutes on some server and while the test is running i have to capture the perfromance metrics of Linux through vmstat , sar, mpstat, free. here is the... (3 Replies)
Discussion started by: Anamica
3 Replies

3. UNIX for Advanced & Expert Users

Shell script to monitor cpu and VMstat, iostat

Hi , I am new to scripting. please help me out how to write a script to monitor cpu , vmstat, iostat in Redhat linux. we are doing the load test. Thanks in advance !!!! (1 Reply)
Discussion started by: saanvi
1 Replies

4. Shell Programming and Scripting

Help Reading from Command Like vmstat

I wanna to read the output of various commands like mpstat, vmstat, etc... but want to output this to a file with each line preceeded by a time stamp. I've played around with various loops, shell redirection, custom descriptors and etc.. but can't seem to get something to work. I did this years... (2 Replies)
Discussion started by: rhugga
2 Replies

5. Linux

vmstat help

Hi everyone, I need to see some VM manager performance/behavior information on some Linux boxes regarding pages scanned/activation of the paging algorithm in order to get an idea if a given server needs more memory and is actually paging. In Aix servers, by using the vmstat cmd you... (1 Reply)
Discussion started by: jcpetela
1 Replies

6. UNIX for Dummies Questions & Answers

vmstat

Hi I wanted to collect data by using vmstat -I 60 >xxxx.txt & using my own account It was stopped by it self after 2 hours try again same result We want to collect day date by succession how to collect data using vmstat for day Thank you (2 Replies)
Discussion started by: Syed_45
2 Replies

7. UNIX for Advanced & Expert Users

vmstat

Hi, what does mean the free colomne in out put of vmstat ? is it free espace of physical memory or of swap space on hard disk ? Thank you (4 Replies)
Discussion started by: big123456
4 Replies

8. UNIX for Dummies Questions & Answers

vmstat

When I exeute vmstat (e.g. vmstat 30 2), in some machines I get some wierd result as the first line. like: -117% or 208% for CPU idle percentage. But the second line is alright. Could someone explain this please. Thanks ! Chaadana (4 Replies)
Discussion started by: chaandana
4 Replies

9. UNIX for Dummies Questions & Answers

vmstat

Hi, In the unix command, "vmstat" we get information on Page memory. what does the "mf" - "minor fault" is? Regards, Anent (3 Replies)
Discussion started by: anent
3 Replies

10. UNIX for Dummies Questions & Answers

Vmstat

I have MATLAB INSTALLED IN MY SUN MACHINE >> WHENEVER I USE IT THE CPU USAGE SHOWS ABT 90% Seeing the vmstat shows that system calls and context switch counters reach a very high value . What are these counters ( Man pages do not give much info on that) .... The only thing i can make out that... (1 Reply)
Discussion started by: DPAI
1 Replies
Login or Register to Ask a Question