1829545 Members
1991 Online
109992 Solutions
New Discussion

Extract command

 
zsujith
Frequent Advisor

Extract command

Hello,

We have sar data run through cron in /usr/adm/sa directory. Now we need to create report of disk utilization using extract command.
Please let us know what option to use with extract command to generate disk utilization report etc.

Regards
"The most wasted day is that in which we have not laughed."
7 REPLIES 7
Kapil Jha
Honored Contributor

Re: Extract command

Hello,
you will have to use
erxtract -b -e -xt -l

Read man extract for more info.
------------
extract -xt [d|w|m|y -offset] [-v][-gapkdzcntuy]
[-l ] [-f ]
[-b
I am in this small bowl, I wane see the real world......
zsujith
Frequent Advisor

Re: Extract command

Dear Kapil,

Do i need to provide beginning and end date as i already have the sar data.

Regards
"The most wasted day is that in which we have not laughed."
Rasheed Tamton
Honored Contributor

Re: Extract command

Hi,

extract reads the contents of OV Performance Agent (OVPA) scopeux log files. You can use the sar command as below to get the disk (or tape) output:

sar -d -f /var/adm/sa/sa06

or
just grep for Average

sar -d -f /var/adm/sa/sa06|grep Average

-f is the filename

Regards.
zsujith
Frequent Advisor

Re: Extract command

Hello Rasheed,

Thanks for your reply.

I need to create a graphical report from that sar disk utilization data. Any idea how to go forward or just create a Statiscal report to show it to end customer.

Regards
"The most wasted day is that in which we have not laughed."
Emil Velez
Honored Contributor

Re: Extract command



the extract command is part of the measureware product not sar. Measurware now called the performance agent collects data separately from sar

extract -xp -d -f /tmp/rxlog_disks.txt

This is how you would extract disk data. Extract has many other clases of data: Global, process, application (group of processes you define), disk, logical volumen, netif, cpu and configuration.

look into it. Measureware is collecting over 400 metrics constantly and is on most of the HPUX systems given the way people purchase their OE bundle.

Rasheed Tamton
Honored Contributor

Re: Extract command

Hello Sujith,

You have to export to excel (csv) format and do the reporting from there.

Otherwise, if scopeux is on the system, you can use the extract command and send to output file, move to PC, and use excel.

This is the template (you can modify the items as per your needs) file for extract:

cat /home/sujith/disktemplate
REPORT "MWA Export on !SYSTEM_ID"
FORMAT ASCII
HEADINGS ON
SEPARATOR="|"
SUMMARY=60
MISSING=0
DATA TYPE GLOBAL
YEAR
DATE
TIME
GBL_DISK_UTIL_PEAK
GBL_DISK_SUBSYSTEM_QUEUE

use the below command to extract today's data using the above template file and output to a file called extractfile

/opt/perf/bin/extract -xp -r /home/sujith/disktemplate -g -b today 00:00 -e today 16:59 -f extractfile

(from 05th Aug to 06th Aug below; -d for disk - man extract for details)

/opt/perf/bin/extract -xp -d -g -b 08/05/08 -e 08/06/08 -f extract.out

send the output file as attachment by mail or you can sftp to pc

uuencode extractfile extractfile |mailx -m -s "extract as attach" sujith@domain.com

and put it to excel.

May be someone would come with a better idea.

Regards.
zsujith
Frequent Advisor

Re: Extract command

Thank U
"The most wasted day is that in which we have not laughed."