- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Polling intervals in 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
09-18-2002 06:29 AM
09-18-2002 06:29 AM
I am trying to figure out how to get the output of my data files to have 30 minute intervals instead of 5 minute intervals which are being written to each of the output files.
I have a script which is gathering a series of sar commands and putting them to seperate files. I am running this from cron and it is taking the information from the /var/adm/sa/sa## file each day. The output files are being listed in 5 minute intervals.
So what I am trying to figure out is where to write in the script that I want a 30 minute listing and not a 5 minute listing.
Attached is a sample output file, listed here are the cron entries and then the script itself.
TY in advance:
Cron entries:
00,15,30,45 * * * * /usr/lbin/sa/sa1 600 6 &
59 23 * * * /home/fgrosb01/sardump/sar.dump > /dev/null
Script: sar.dump
#!/usr/bin/ksh -v
#
# This script is being developed to provide a detailed report of the daily performance
# statistics regarding several different areas of the system.
# This script must be executed utlizing the root user account.
# Environmental section
set -u
BASEDIR=/home/fgrosb01/sardump
DATE=`date +%m/%d/%Y`
YDATE=`TZ=CST+24 date +%m/%d/%Y`
SCRIPT_EXECUTION_TIME=$(date +'%H:%M:%S')
SCRIPT_REVISION="HPUX-b.11.00.01"
SCRIPT_HPUX_VERSION=$(uname -r)
SCRIPT_SYSTEM=$(uname - n)
SCRIPT_USER=$(whoami)
SCRIPT_EXECUTION_TIME=$(date +'%Y/%m/%d/%H:%M:%S')
echo $SCRIPT_SYSTEM \(Version $SCRIPT_REVISION\) $SCRIPT_EXECUTION_TIME
echo _____________________________________________________________________
echo
if [ ${SCRIPT_USER} != "root" ] ; then
echo
echo "This program must be executed utilizing the root logon id only"
echo
return 501
fi
echo _______________________________________________________________________
# Remove old data files
cd $BASEDIR
rm *_act
# Collect CPU
sar -u >> $BASEDIR/cpu_act
#
# Collect Buffer activity
sar -b >> $BASEDIR/buff_act
#
# Collect TTY activity
sar -y >> $BASEDIR/tty_act
#
# Collect System calls
sar -c >> $BASEDIR/call_act
#
# Collect Swap activity
sar -w >> $BASEDIR/swap_act
#
# Collect File access activity
sar -a >> $BASEDIR/acc_act
#
# Collect average Q lenght
sar -q >> $BASEDIR/avq_act
#
# Collect Table activity
sar -v >> $BASEDIR/tab_act
#
# Collect Message and Semaphore activity
sar -m >> $BASEDIR/sem_act
#
# Collect Multi processor activity
sar -M >> $BASEDIR/proc_act
#
# Disk space
/usr/bin/bdf >> $BASEDIR/bdf_act
#
# Paging
vmstat -s| grep "pages swapped in" >> $BASEDIR/inpages_act
vmstat -s| grep "pages swapped out" >> $BASEDIR/outpages_act
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2002 07:01 AM
09-18-2002 07:01 AM
Re: Polling intervals in sar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2002 07:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2002 07:08 AM
09-18-2002 07:08 AM
Re: Polling intervals in sar.
According to the man page for sa1 (1M)the first parameter is the interval between samples in seconds, hence you will need to change this value to 1800. It's worth reading the man page for more info on setting up the cronjobs.
regards,
Darren.
---quote your cron entry---
00,15,30,45 * * * * /usr/lbin/sa/sa1 600 6 &
59 23 * * * /home/fgrosb01/sardump/sar.dump > /dev/null
---end quote---
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2002 07:33 AM
09-18-2002 07:33 AM
Re: Polling intervals in sar.
I have changed that parameter at the end of the sa command to reflect the following:
0 * * * * /usr/lbin/sa/sa1 1800 2 &
What i am seeing is that the output files are still being written in 5 minute intervals and that this process is still running. The ps is listed below:
ps -ef|grep sa1
root 11912 1 0 11:26:00 ? 0:00 /usr/lbin/sa/sadc 1800 2 /var/adm/sa/sa18
The question here is whether or not I have to alter any entries in my script where it does the individual sar's or is it the fact that I wont see any results until the end of the day, or at what point should I see results?
Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2002 07:38 AM
09-18-2002 07:38 AM