EXTRACT(1)EXTRACT(1)NAMEextract - (export functionality) reads the contents of Performance
Agent scopeux log files or previously extracted log files. The data
can be reorganized or filtered as desired, and the results are exported
into class specific data files in a user defined format such as ASCII,
BINARY, DATAFILES or WK1 (spreadsheet). The ASCII format is primarily
for human consumption, while the other formats are primarily for use by
other programs and applications.
extract - (extract functionality) reads the contents of HP Performance
Agent scopeux log files or previously extracted log files. The data
can be reorganized or filtered as desired, and the results are combined
into a single, easy to manage extracted log file or appended to a pre-
existing extracted log file. The format of the resulting extracted
logfile has been optimized for archiving or use by other systems/appli‐
cations for analysis.
SYNOPSIS
To create extracted files:
extract-xt [d|w|m|y -offset] [-v][-gapkdzcntuy]
[-l <logfile>] [-f <outputfilename>]
[-b <date> <time>] [-e <date> <time>]
[-s <time1> - <time2> noweekends]
extract-xw [<weekno> ][-v][-gapkdzcntuy] [-l <logfile>]
[-s <time1> - <time2> noweekends]
extract-xm [<monthno>][-v][-gapkdzcntuy] [-l <logfile>]
[-s <time1> - <time2> noweekends]
extract-xy [<yearno> ][-v][-gapkdzcntuy] [-l <logfile>]
[-s <time1> - <time2> noweekends]
To check the license:
extract-licheck
To create exported files:
extract-xp [d|w|m|y] [-v][-gapkdzcntuyGADZNTUY] [-l <logfile>]
[-f <outputfilename>] [-r <filename>]
[-b <date> <time>] [-e <date> <time>]
[-s <time1> - <time2> noweekends]
To run interactively:
extract [verbose]
[global|appl|proc|disk|lvol|netif|tran|CPU|
filesystem detail|summ]
[log <logfile>]
[output <outputfilename>] [report <filename>]
[start <date> <time>] [stop <date> <time>]
[shift <time1> - <time2> noweekends]
NOTE: Transaction data types are not supported in Tru64 UNIX.
To select DSI data to export:
-C classname [DETAIL|SUMMARY|BOTH]
(NOTE: The SUMMARY and BOTH options are only functional
when performing a data export. The extract functionality
does not support data summarization.)
To display more details about the extract program parameters:
man extract
or
extract ?
DESCRIPTION
The extract program reads performance measurement data from HP Perfor‐
mance Agent software files and extracts data according to specifica‐
tions set by the user. The default files to be extracted from are the
raw log files in the following directories:
/var/opt/perf/datafiles/ (logglob, logappl, logproc, logdev, logtran,
logls)
Options-b <date> <time> Sets starting date and time
-B <date> <time> Sets starting date and time in UNIX format
-e <date> <time> Sets ending date and time
-E <date> <time> Sets ending date and time in UNIX format
-s <time>-<time> <noweekends>
Sets shift (starttime, endtime, weekends)
-l <logfile> Specifies input log file
-r <reportfile> Specifies export template file for export formats
-f <file> <fopt> Sends extracted data to a specific output file. If
not specified, extract data goes to rxlog; export
data goes to default files xfr*logfilename.ext
-C <classname><opt>
Selects DSI (data source integration) data to export
or scopeux data to extract or export.
<opt> = DETAIL, SUMMARY, BOTH
(NOTE: The SUMMARY and BOTH options are only func‐
tional when performing a data export. The extract
functionality does not support data summarization.)
-k Exports killed processes only.
(NOTE: Extract will not work as expected if the
PROC_INTEREST metric is not included in the reptfile
-we <1|2|....7> Sets days of the week to exclude when exporting data;
1=Sunday
-gapkdzcntuyGADZNTUY
Selects types of data to extract/export
g = global detail
a = application detail
p = process detail
k = process (killed records only)
d = disk device detail
z = logical volume detail
c = configuration detail
n = netif detail
t = transaction detail (Not in Tru64 UNIX)
u = CPU detail
y = filesystem detail
i = logical system detail
G = global summary (Export only)
A = application summary (Export only)
D = disk device summary (Export only)
Z = logical volume summary (Export only)
N = netif summary (Export only)
I = logical system summary
T = transaction summary (Export only)
(Not in Tru64 UNIX)
U = CPU summary (Export only)
Y = filesystem summary (Export only)
-ut Shows data and time in UNIX format in exported
DSI log file data.
-v Selects verbose output
-xp <xopt> Exports data
-xt <xopt> Extracts data
-xw <weekno> Extracts a calendar week's data
-xm <monthno> Extracts a calendar month's data
-xy <yearno> Extracts a calendar year's data
-licheck Checks if the license is Permanent, Trail or Expired
? Displays command line syntax
where:
<date> Specifies a date in native language syntax. (The default
format is MM/DD/YY, as in 12/31/03.)
Or specifies one of the special keywords "TODAY", "FIRST",
or "LAST" to select the current date, the first date in
the log file, or the last date in the log file, respec‐
tively.
Or specifies keyword "TODAY-nnn" where nnn is a number
specifying the number of days before today
Or specifies keyword "FIRST+nnn" where nnn is a number
specifying the number of days after the first date in the
log file.
Or specifies keyword "LAST-nnn" where nnn is a number
specifying the number of days before the last date in the
log file.
<time> Specifies a time in native language syntax. (The default
format is hh:mm AM or hh:mm PM, where hh is 12-hour hours,
mm is minutes)
noweekends A literal keyword specifying that weekends, Saturday and
Sunday, are not to be included in the output data
<logfile> Names a raw or extracted log file; can be fully qualified
with a path name. The default log file is
/var/opt/perf/datafiles/logglob.
<reportfile> Names an ASCII template file that defines output data
fields and format for the EXPORT command. The default
template file is /var/opt/perf/reptfile.
<file> Specifies an output file name for EXTRACT and EXPORT.
(See the OUTPUT command for default values.)
<fopt> Selects program action if output file already exists.
,New Command fails; file must not exist
,Purge Removes existing file and creates a new one
,Append Appends data to the existing file
<xopt> Optionally specifies a begin and end date in one of
the following formats:
D = today's data from midnight to midnight
D-n = one day's data, "n" days before today
D n = the "n"th day of this year
D yynnn = the "n"th day of year "yy"
W = this week's data from Monday AM to Sunday PM
W-n = one week's data, "n" weeks before today
W n = one week's data, the "n"th week of this year
Wyynn = one week's data, the "n"th week of year "yy"
M = this calendar month's data
M-n = one month's data, "n" months before today
M n = the "n"th month of this year
M yynn = the "n"th month of year "yy"
Y = this calendar year's data so far
Y-n = one year's data, "n" years before this one
Y n = year "n" data
Specifying an xopt will override any -b or -e options
<weekno> Optionally specifies the week of the year to extract
(1-53) or a year and the week of the year (such as 0252
for 52nd week of 2002)
<monthno> Optionaly specifies the month of the year to extract.
(1-12) or a year and the month of the year (such as 0212
for 12th month of 2002).
<yearno> Optionally specifies the year to be extracted (1971-2027)
or (71-27)
EXAMPLE
The normal input and output redirection is allowed (<,>,2>). If input
is redirected, or if a command line input is being processed, then the
program is running in "batch mode", and any nonrecoverable error
results in a program abort. Interactive input allows the user to cor‐
rect any problem and reexecute the command.
Example: To export global summary data from the log file "barkley"
starting on December 31, 2003 and ending at 5:00 PM yester‐
day, taking the default export template file, enter:
extract-G -l barkley -b 31/12/03 -e today-1 5:00 PM -xp
Example: To export yesterday's global detail data from the default log
file using the "repthist" report file, enter:
extract-g-r repthist -xp d-1
Reasons to use extract:
1. Extracted log files can be reduced to a manageable size by select‐
ing specific time periods and filtering out irrelevant data during
the extraction process.
2. Extracted log files can be transferred to a PC disk for local
analysis.
3. The extract program can append data to previously existing
extracted files. In this way, you only need the most recent data
in the raw log files and can periodically extract it, building a
long-term extracted file.
Data can be extracted from raw HP Performance Agent log files or
from previously created PC format files.
The extract program creates a report that can be redirected to a
file by redirecting stdout.
extract > extract.report
DEPENDENCIES
Raw log files must be named logglob, logappl, logproc, logdev, logtran,
and logindx and must be stored together under the same directory for
extract to identify them correctly. Sets of raw log files can be
stored under different directories. Extract assumes a file by any
other name is a PC format file.
AUTHOR
Developed by Hewlett-Packard.
FILES
rxlog
- PC format file.
logglob, logappl, logproc, logdev, logtran, logindx, logls
- raw log files (logtran is not supported on Tru64 UNIX, logls
is supported only on VMware and HPVM).
extract.help
- help catalog
reptfile, repthist, reptall
- export template files
SEE ALSOscopeux(1), utility(1), midaemon(1).
EXTRACT(1)