#!/bin/ksh # This appends a space delimited record to a file # with all of the output from vmstat # for the 15 minute period starting at $TIME # You end up with a file for each day to parse # and load into a database or spreadsheet date "+%H:%M" | read TIME date "+%m_%d_%Y" | read DATE HOST=`hostname` INTERVAL=$1 vmstat $INTERVAL 1 | tail -1 | read STATS echo $TIME $STATS >> ~/$HOST.vmstat2.$DATE.txt #$ crontab -l | grep vmstat #0,15,30,45 * * * * /home/buxs/vmstat.mon 900