The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
capturing output from top and format output new2ss Shell Programming and Scripting 4 02-24-2009 09:26 PM
vmstat output with date & timestamp luft UNIX for Dummies Questions & Answers 9 11-16-2006 10:49 AM
output of vmstat gfhgfnhhn UNIX for Advanced & Expert Users 1 09-22-2006 09:54 AM
Capturing output from C++ program GMMike UNIX for Dummies Questions & Answers 3 03-08-2005 09:04 AM
capturing output in script MizzGail Shell Programming and Scripting 6 06-02-2004 07:44 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-25-2009
yuvanash yuvanash is offline
Registered User
  
 

Join Date: Feb 2009
Location: india
Posts: 3
Exclamation Capturing and sending of vmstat output everyday

I need to capture the vmstat output of a server every 5 minutes, in a text filename with the name in the format vmoutput. yesterday's date.txt. I need to get the vmstat o/p for the whole day with 5 minutes interval and send it (preferably ftp) to my local desktop folder.

eg: vmstat 300 >vmoutput.$yesterdaydate.txt
ftp <local desktop ip>/<folder>

any ideas ??
  #2 (permalink)  
Old 02-25-2009
Yogesh Sawant's Avatar
Yogesh Sawant Yogesh Sawant is offline Forum Staff  
Part Time Moderator and Full Time Dad
  
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 1,086
one idea:

1. write a shell script to run vmstat command and append its output to a text file
2. run this script every 5 minutes using cron
3. write another script that copies the output file (using ftp) to your desktop folder and then clean the output file - cp /dev/null output_file
4. run this script using cron everyday at midnight
Closed Thread

Bookmarks

Tags
capturing o/p, script, vmstat

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:23 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0