Re: Nmon scheduling question
- From: "Barnhart, Troy" <TBarnhart@xxxxxxxx>
- Date: Mon, 2 Oct 2006 10:19:44 -0600
Here's what I use...
I run two commands from "cron":
1) My daily run of "nmon" that catches snapshots every 15 minutes from Midnight until 11:45pm the following night.
2) My daily "nmon_maint.ksh" script that (at 11:55pm) does the daily output-file's analyzer processing and mails it to a mailbox.
My script does the following:
Runs "sort" against the raw datafile.
Runs "gzip" to compress it.
Runs "mv" to rename it w/ the nmon_date variable to save the daily file.
Runs "mutt" to mail the daily datafile as an attachment from inside a script/commmand-line.
("mutt" was the only product at the time that could do this...)
Then, from that mailbox, I simply run the nmon_analyzer against that date's file.
This runs our various AIX (4.3.x & 5.x) and Redhat Linux (2.1, 3.0, & 4.0) servers...
--------------------------------------------------------------------------------
# run the "nmon" command for daily reporting of system monitoring
55 23 * * * /usr/local/nmon/nmon_maint.ksh
0 0 * * * /usr/local/nmon/nmon -F /usr/local/nmon/lurch.nmon -td -c 900 -s 95
#
--------------------------------------------------------------------------------
#/bin/ksh
# nmon_maint.ksh
# Script to generate the spread***, compress, & email daily logfiles
# generated by the daily nmon command run by the cron.
#
NMON_DATE=$(date '+%m%d%y_%H%M')
# sort the default output of nmon -x to comma delimited spread***
sort -A /usr/local/nmon/<server>.nmon > /usr/local/nmon/<server>.csv
# compress the files for storage
gzip -q /usr/local/nmon/<server>.csv
# log storage per date
mv -f /usr/local/nmon/<server>.csv.gz /usr/local/nmon/<server>.csv.$NMON_DATE.gz
# mail the spread*** to admins
# mutt -s "Daily Spread*** Results of nmon for <server>" -a /usr/local/nmon/<server>.csv.$NMON_DATE.gz <mailbox> < /dev/null
rm /usr/local/nmon/<server>.nmon
#
# EOF
#
--------------------------------------------------------------------------------
Regards,
Troy Barnhart, Sr. Systems Programmer
tbarnhart@xxxxxxxx
Regional Health, Inc.
353 Fairmont Boulevard
Rapid City, South Dakota 57701
PH: 605-716-8352 / FAX: 605-716-8302
________________________________
From: Larry Scheetz [mailto:LScheetz@xxxxxxxxxxx]
Sent: Monday, October 02, 2006 9:45 AM
To: aix-l@xxxxxxxxxxxxx
Subject: Nmon scheduling question
Admins,
I know that nmon32 is not a supported tool by IBM
but was wondering how others had it setup. I have
it installed on all my AIX 5.2 boxes and it works great.
I have used the analyzer spread *** and all.
I really like this tool. I would like to add this as a
cron entry to run everyday and keep the files for maybe
a week at a time. I want to make sure because these look
like they can get sizeable. What I was going to put is
the following: 0 1 * * * /tmp/nmon_aix32 -s600 -c 144
Does anyone have a suggestion on a cron setting so that
I can capture daily snapshots throughout the day but
for the entire day?
Thx
Larry
***Note: The information contained in this message, including any attachments, may be privileged, confidential, and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the Sender immediately by a "reply to sender only" message and destroy all electronic or paper copies of the communication, including any attachments.
- Prev by Date: Re: Cabling to connect RS6000 to laptop as a console!
- Next by Date: Re: Nmon scheduling question
- Previous by thread: Re: Nmon scheduling question
- Next by thread: Re: Nmon scheduling question
- Index(es):