Re: Nmon scheduling question



David,



Thank you very much again, I got it to work. I didn't realize that the
command ran first then in the script is the ps and kill command so it
was going out and starting and then instantly killing itself. Thank you
very much this is very helpful.



Thanks

Larry





________________________________

From: IBM AIX Discussion List [mailto:aix-l@xxxxxxxxxxxxx] On Behalf Of
Davignon, Edward
Sent: Tuesday, October 03, 2006 10:29 PM
To: aix-l@xxxxxxxxxxxxx
Subject: Re: Nmon scheduling question



Is it running from root's crontab or another user?



Try:

25 15 * * * /usr/bin/ksh -xv /usr/local/bin/nmon_script
/usr/local/log/error 2>&1



or

25 15 * * * /usr/bin/ksh -xv /usr/local/bin/nmon_script

And then check root's email for the output.



or

25 15 * * * /usr/bin/ksh -xv /usr/local/bin/nmon_script 2>&1 | mail -s
'output from nmon_script' you@xxxxxxxxxxx

To redirect the output to you email



The only other thing I can think of off hand is CRLF end of lines, but
that would fail on the command line also.

To check this try:

od -c /usr/local/bin/nmon_script | /bin/grep '\\r'



Edward Davignon <mailto:Edward.Davignon@xxxxxxxxxxxxxx>
Lead Analyst - Distributed Systems
Utility Shared Services - IT
Energy East Corporation

________________________________

From: IBM AIX Discussion List [mailto:aix-l@xxxxxxxxxxxxx] On Behalf Of
Larry Scheetz
Sent: Tuesday, October 03, 2006 3:32 PM
To: aix-l@xxxxxxxxxxxxx
Subject: Re: Nmon scheduling question



Vince this is a great script. I run it manually and it runs great. I
added this into my crontab below and it just never runs

25 15 * * * /usr/local/bin/nmon_script >/usr/local/log/error 2>&1



I checked the /var/adm/cron/log and all it says is:

root : CMD ( /usr/local/bin/nmon_script >/usr/local/log/error 2>&1
) : PID ( 135238 ) : Tue Oct 3 15:25:00 2006

Cron Job with pid: 135238 Failed



Would have any insite or direction to trouble shoot why this is not
kicking off in the cron? I checked all file paths and permissions and
everything seems to be correct.



Thx

Larry





________________________________

From: IBM AIX Discussion List [mailto:aix-l@xxxxxxxxxxxxx] On Behalf Of
Vincent D'Antonio
Sent: Monday, October 02, 2006 12:06 PM
To: aix-l@xxxxxxxxxxxxx
Subject: Re: Nmon scheduling question



Here is a script I use hope it helps.

Vince



#####################################################
#
# This srcipt is used to gather system
# Information to use for Diagnostics or
# in capacity planning.
#
# Version History:
# 1.0 -- Vincent D'Antonio
# 2/10/05 1st Version
#
######################################################
#
#!/usr/bin/ksh
#
######################################################
#
# Variables
#
######################################################
#
LOG=/usr/local/log
DATE=`/usr/bin/date +%m%d%y`
HOST=`/usr/bin/hostname`
NMON=/usr/local/bin/nmon
FILE=${LOG}/${HOST}_${DATE}.nmon
#
######################################################
#
# Kill nmon if running
#
######################################################
#
for i in `ps -ef | grep "/usr/local/bin/nmon" | egrep -v grep | awk
'{print $2}'`
do
kill -9 $i
sleep 30
done
#
######################################################
#
# Nmon Command
#
######################################################
#
${NMON} -x -F ${FILE} -tA -s 900 -c 96
#
######################################################
#
######################################################
#
# Gzip files older than 3 days
# and remove files older than
# 30 days.
#
######################################################
#
cd ${LOG}
find . -name "*.nmon" -mtime +3 -exec gzip {} \;
find . -name "*.nmon.gz" -mtime +30 -exec rm {} \;
#





On 10/2/06, Larry Scheetz <LScheetz@xxxxxxxxxxx> wrote:

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