- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: iostat and sar output
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2004 07:58 PM
03-02-2004 07:58 PM
iostat and sar output
I need to collect iostat and sar output for every 15 minute.
iostat 900
sar -d 900 100
How can i save the output. I need to see it later for 24 hours.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2004 08:02 PM
03-02-2004 08:02 PM
Re: iostat and sar output
In the case of sar, you could direct the output to a file via sar -o filename. You would read the file via sar -f filename. I would suggest putting a suffix on the end of the filename so you can keep the readings separate: e.g. $$ would give you the current process id as a suffix. This will only cause problems if you keep the records a long time.
I'll leave it to someone else to advise you on iostat!
Mark Syder (like the drink but spelt different)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2004 08:04 PM
03-02-2004 08:04 PM
Re: iostat and sar output
"iostat 900 > iostat.file" and "sar -d 100 100 > sar.file"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2004 08:08 PM
03-02-2004 08:08 PM
Re: iostat and sar output
you can do it with crontab entry like it is described in sar manual pages. something like this
00,15,30,45 * * * * /usr/lbin/sa/sa1 900 100
or similar. After that you can find for every day files saXX and from there you can extract what you need. and for iostat you have to redirect the output to file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2004 08:08 PM
03-02-2004 08:08 PM
Re: iostat and sar output
myfile.sh
iostat 5 5 > /var/mydir/myfile.txt
sar -d 5 5 >>/var/mydir/myfile.txt
you can run myfile.sh in cron for the required period.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2004 08:09 PM
03-02-2004 08:09 PM
Re: iostat and sar output
/var/adm/sa
directory.
You need to create it if it doesn't exist.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2004 08:12 PM
03-02-2004 08:12 PM
Re: iostat and sar output
Or you can think about using Measureware product if you have some perks for this assignment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2004 08:17 PM
03-02-2004 08:17 PM
Re: iostat and sar output
At this time, you will get the output of them forevery 15minutes by cron that included iostat and sar commands.
Have a look at this manpages associated with cron
# man crontab
It will help you how to set the cron on time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2004 11:32 PM
03-03-2004 11:32 PM
Re: iostat and sar output
Example in Your case
#iostat 900 > /tmp/iostat.opuput &
#sar -d 900 100 > /tmp/sar.output
These are the text files in which your respective Outputs are stored for you further references.
Additional Info:
Now To Automate this Process create a script:
# cd /tmp
#vi script
while true
do
iostat > /tmp/iostat.output
sleep 900
iostat >> /tmp/iostat.output
sleep 900
done
#chmod 777 scr
#./scr ( This will execute the script )
Do the same for sar o/p.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2004 11:46 PM
03-03-2004 11:46 PM
Re: iostat and sar output
Just simply by directing the output to a file
iostat 900 >/tmp/iostat.out
sar -d 900 100 >/tmp/sar.out
Like many of our friends here have suggested, i would advise that you do the following
1.create a script and name it perform.sh
your script should contain the following
iostat 900 >/tmp/iostat.out &
sar -d 900 100 >/tmp/sar.out &
exit
2.Next while you are logged in your system edit crontab by issuing the command
$:/>crontab -e
3. Go to the last line of this file and
make the following entry
00,15,30,45 * * * * /tmp/perform.sh
regards
Mobeen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2004 02:17 AM
03-04-2004 02:17 AM
Re: iostat and sar output
call it sarperf.sh.
cron inits ot with this line
00 * * * * /root/SCRIPTS/performance.sh > /dev/null 2>&1
# sarperf.sh
Month=`/usr/bin/date +%m`
Day=`/usr/bin/date +%d`
Year=`/usr/bin/date +%y`
Hour=`/usr/bin/date +%H`
Minute=`/usr/bin/date +%M`
LOGFILE=/root/LOG/SAR/$Year$Month$Day-$Hour$Minute.sar
/usr/sbin/sar -A -o $LOGFILE 60 60 > /dev/nul &
Enjoy
Tim