- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- problem with sar
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
02-28-2002 03:00 AM
02-28-2002 03:00 AM
problem with sar
I have written 2 simple scripts to run 24X7 and collect CPU and disk usage data using sar on my L2000, 2CPU 64Bit HP-UX 11.00 server.
What I expected was I will be having CPU's usage in cpu_log.... and disk usage stats in disk_log...
But, sar had written same data in both the files. I wonder where the mistake is.
Please help me out.
bye,
Raghu.
PS: Here is the code :
1. mon_cpu.sh
while true
do
sar -u -M -o /opt/admin/REPORTS/CPUREP/cpu_log.`date +%d%m%y%X` 600 144
done
2. mon_disk.sh
while true
do
sar -d -o /opt/admin/REPORTS/DISKREP/disk_log.`date +%d%m%y%X` 600 144
done
I launched the scripts as :
./mon_cpu.sh 1>>/dev/null 2>&1 &
./mon_disk.sh 1>>/dev/null 2>&1 &
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2002 03:08 AM
02-28-2002 03:08 AM
Re: problem with sar
Try not to run these scripts at the same time.
And verify the results.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2002 03:18 AM
02-28-2002 03:18 AM
Re: problem with sar
Dear Raghu
There is a simple script of os itself called sadc
You have to run the below command in background it will create files everyday with different name sa01, sa02 the numeric number is date of that particular day.
#/usr/lbin/sa/sadc 300 290 /var/adm/sa/sa`date +%d` &
This will create cpu, disk, swap buffer etc etc in one file under /var/adm/sa directory.
Afterwards you will have to do
#sar -A -f
To report all data.
More info you see #man sar and #man sadc
Regards
Manoj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2002 03:23 AM
02-28-2002 03:23 AM
Re: problem with sar
Cron this to start at 05:00 and then all sar data will be writted to /var/adm/saXX file - XX being the day number of month.
---------------cut here-----------
#!/bin/sh
# 1 minute
period=${1:-"60"}
iterations=${2:-"`expr 86400 / $period`"}
echo "sar: $iterations iterations at $period second intervals"
/usr/sbin/sar -A \
-o /var/adm/sa/sa`date +%d` \
$period \
$iterations > /dev/null
---------------cut here------------
to look at yesterdays buffer data from sar then
sar -b -f /var/adm/sa/sa27
I have a script that will do a full month month extract of date from all the saXX files if you require it.
HTH
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2002 03:45 AM
02-28-2002 03:45 AM
Re: problem with sar
I shall try these options
bye,
Raghu.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2002 04:08 AM
02-28-2002 04:08 AM
Re: problem with sar
With glance/measureware and perfview, you can capture the information you desire at a granularity unavailable with sar. sar, top, vmstat, iostat, will only collect data at the end of a processes timeslice, missing the hundreds of commands being executed (remember we are using risc technology - meaning in one tick you can have many commands being executed), whereas measureware has the hooks to capture this information. Plus with perfview, you can graph your performance.
sorry if I sound like an HP salesperson, it's just that I sometimes don't understand why people aren't willing to spend a few thousand dollars to make their jobs a lot easier, and in the long run saving themselves ten times or more the cost of the software.
live free or die
harry