I use NMON (Nigels Monitoring) in AIX. It creates a daily nmon log with the naming conventions of:
hostname_YYMMDD_0000.nmon
or
myserver_080902_0000.nmon
What I am interested in doing is creating a script that is executed on the first of each month to clean up last months *nmon files. . .what I mean by clean up is that it would create a directory in the format of yyyymm and move all of last months files in that newly created directory.
The problem is that each hostname is of different lengths (since I would be using this on different hosts). . .so it's difficult to use the "cut" command because the length of characters will differ from box to box.
I would appreciate any assistance you can lend.
outta.
Give a try on this:
And add it in the cron table to run on 1st of everymonth.
I have a script which would monitor a given directory and delete any files which are older than 10 days. I was going to set the 10 crob jobs to perform this operation for 10 different directories (some are actually sub-directories), but my boss doesn't like that idea, so I need to do that in one... (1 Reply)
HI,
I have downloaded nmon 3.3c nmon analyzer, and run the command on aix ./nmon -f
After that I have terminated the process and found .nmon file.
when i have tried to open that file in nmon analyzer i.e in excel I am getting the error "no valid input data nmon run may have failed"
... (8 Replies)
Hello guys,
this script partially works but it's still pretty ugly and, moreover, if the month is jan/feb/mar... it doesn't work at all.
Could anyone say me how to correct, cut and clean a little bit?
#!/usr/bin/ksh
egrep -v -e "^\s*#" /file/permission | awk '{ print $1 }' | sort | uniq... (3 Replies)
Hi All,
First of all, I am a DBA and not an AIX admin. I am new at using this NMON tool.
In interactive mode, I can start nmon, push 't' to have the list of process with their statistic (ie cpu% etc.).
I would like to know if there is a way to redirect that screen output into a log... (1 Reply)
Hello,
How can I know if ORACLE Database is running slow due to Memory or due to processing power ?
I have only Oracle Database running on a P4 with 4GB RAM.
Could anyone suggest any tools which can help me determine exactly if it is memory issue or processor issue. (43 Replies)
Hai All,
Iam new to AIX unix. Im just tryin to automate my monitoring work and hence i have writen a basic script in which i am running nmon on multiple nodes from a main node.
say for ex: From server a :
ssh server b nmon -MB -s1 -c1 > nmon_now.txt
gave the password and... (7 Replies)
Appreciate help for the below issue.
Im using below code.....I dont want to attach the logs when I ran the perl twice...I just want to take backup with today date and generate new logs...What I need to do for the below scirpt..............
1)if logs exist it should move the logs with extention... (1 Reply)
Discussion started by: Sanjeev G
1 Replies
LEARN ABOUT CENTOS
sa2
SA2(8) Linux User's Manual SA2(8)NAME
sa2 - Write a daily report in the /var/log/sa directory.
SYNOPSIS
/usr/lib64/sa/sa2
DESCRIPTION
The sa2 command is a shell procedure variant of the sar command which writes a daily report in the /var/log/sa/sardd file, where the dd
parameter indicates the current day. The sa2 command handles all of the flags and parameters of the sar command.
The sa2 command is designed to be started automatically by the cron command.
EXAMPLES
To run the sa2 command daily, place the following entry in your root or adm crontab file:
5 19 * * 1-5 /usr/lib64/sa/sa2 -A &
This will generate a daily report called /var/log/sa/sardd It will also remove reports more than one week old.
FILES
/var/log/sa/sardd
Indicate the daily report file, where the dd parameter is a number representing the day of the month.
AUTHOR
Sebastien Godard (sysstat <at> orange.fr)
SEE ALSO sar(1), sadc(8), sa1(8), sadf(1)
http://pagesperso-orange.fr/sebastien.godard/
Linux AUGUST 2010 SA2(8)