Operating System - HP-UX
1834010 Members
1817 Online
110063 Solutions
New Discussion

Extract command parameter

 
SOLVED
Go to solution
Joseph Bague
Frequent Advisor

Extract command parameter

Hi to all,

I am trying to get a per day average within one month in mw data, I am using extract command but I dont know the parameter to come out this data.

Tnxs in advance
Joseph ??
Expect nothing but ready for everything
6 REPLIES 6
malay boy
Trusted Contributor

Re: Extract command parameter

#extract -xp -C all -G -v -b -e -r /var/opt/perf/ -f

Here try this.

hope this help

regards
mB
There are three person in my team-Me ,myself and I.
Con O'Kelly
Honored Contributor

Re: Extract command parameter

Hi
This will extract global summary information for the month of May(5) for all the metrics specified in /var/opt/perf/reptfile and output the data to /tmp/mwa_output.
You can customise what metrics you what to extract by using a customised file in place of reptfile and just use the metrics you are interested in.

extract -G -r /var/opt/perf/reptfile -xp m 5 -f /tmp/mwa_output

I don't know of a way to get mwa to average the figures. However you could easily write a script that parses the data and averages all the relevant metrics.

What I have done in the past is to extract on a weekly basis all the metrics I'm interested in, then run a script using the data in the output file and generate a weekly report displaying average, highest figures etc for the week.

Cheers
Con
Joseph Bague
Frequent Advisor

Re: Extract command parameter

Hi Con,

Can give a sample of your script

Joseph
Expect nothing but ready for everything
Con O'Kelly
Honored Contributor

Re: Extract command parameter

Hi Joseph

I have attached a copy of my script. However it is fairly customised for the last company I worked for & relies on you already having generated mwa data file using the extract command. Hopefully it will give you some ideas on using awk to get average, highest figures etc. If you need any explanations, let me know.

Cheers
Con
Joseph Bague
Frequent Advisor

Re: Extract command parameter

Con,

Thanks for the script, can you also post the collectperf.sh script.

Many tnxs
Joseph
Expect nothing but ready for everything
Con O'Kelly
Honored Contributor
Solution

Re: Extract command parameter

Hi Joseph

I've attached the mwa_extract.sh script which is the script used to extract all the data from the measureware log files. It is the data that this script generates that is used by the perfsummary.sh script to generate performance reports. The collectperf.sh script is just a wrapper script specific to my company that calls mwa_extract.sh.
Hope this is of some help to you. If you need further explanations let me know.

Cheers
Con