dump_hist()

Return the PATROL Agent history data for an application, instance, or parameter.

Syntax

dump_hist([outfile],[start],[end],[format],[application],
[instance],[parameter],[flags])

Parameters

Parameter

Definition

outfile

name and path of the dump_hist() function output file If an outfile is not specified, dump_hist() returns the output as a PSL list. The last member of the list has the following format:dump_hist: Total matched parameters: n

Note: This function cannot return a PSL list greater than 99500 bytes. If the list exceeds the size limit, the last line contains the following message: dump_hist: return data size exceed buffer size, shrinked

start

start of the history interval in the format MMddhhmmyyyy

  • MM=month
  • dd=day
  • hh=hours
  • mm=minutes
  • yyyy=year (optional)

If the start time is not specified, the dump_hist() function starts with the oldest available history.|

end

end of the history interval in the format MMddhhmmyyyy

  • MM=month
  • dd=day
  • hh=hours
  • mm=minutes
  • yyyy=year (optional)

If the end time is not specified, the dump_hist() function ends with the most recent history available.|

format

control characters that specify the content and format of the output for each data point. 
The format parameter permits the following output control options: 
%H print the agent name 
%A print the application name 
%I print the instance name 
%P print the parameter name 
%t print the timestamp in elapsed seconds since midnight 01/01/1970 
%v print the value of history point 
%g convert the output time values to Greenwich Mean Time (GMT) 
%c print the date and time in the format 
Wed Jul 1 21:45:56 1998 
%d print the day of month (1-31) 
%m print the month of year (1-12) 
%y print the 4-digit year 
%h print the hour (0-23) 
%M print the minutes(0-59) 
%s print the seconds (0-61) 
\n add a newline 
\r add a carriage return 
\t add a tab 

print a backslash 
If the format is not specified, the default format of "\t%c%v\n" is used with a heading for each parameter containing the agent name, application name, instance name, and parameter name.

application

character string indicating the application If the application is not specified, the history for every application is returned.

instance

character string indicating the instance If the instance is not specified, the history for each instance of the application is returned.

parameter

character string indicating the parameter If the parameter is not specified, the history for each parameter of the instance is returned.

flags

flags to indicate whether application, instance, and parameter are to be interpreted asliteral stings or as regular expressions. By default, they are all interpreted as regular expressions. 
Value:

  • 0--application, instance, and parameter are all regular expressions
  • 1--application is a literal string
  • 2--instance is a literal string
  • 4--parameter is a literal string

These may be combined with bit-wise OR operator ( "|" ). For example if flags is set to 1|4, the application and the parameter will be interpreted as literal strings, but the instance will be interpreted as a regular expression.

Description

The dump_hist() function returns the PATROL Agent history data for the specified applications, instances, and parameters. Since it may take a long time to dump the history data, the dump_hist() function dumps five parameters and then gives control back to the CPU for other processes, and after 300 milliseconds, the dump_hist() function returns to the run queue. This function saves the output to the file specified by the outfile parameter. If outfile is not specified,dump_hist() returns the output as a PSL list. 

If the dump_hist() function cannot open the outfile, the process terminates and returns the following message:

Cannot open output file to write

Example

The following PSL statement dumps the history for the CACcachCopyReadHitsPercent parameter to C:\out\dump.txt using the default output format:

outfile="c:\\out\\dump.txt";
start="052000001998";
end="052008301998";
format="";
application="NT_CACHE";
instance="NT_CACHE";
parameter="CACcachCopyReadHitsPercent";
dump_hist(outfile,start,end,format,application,instance,parameter);



The example produces the following output in the file C:\out\dump.txt:

pfarrel2/NT_CACHE.NT_CACHE/CACcachCopyReadHitsPercent
Wed May 20 00:00:27 1998 100
Wed May 20 00:01:27 1998 100
Wed May 20 00:02:27 1998 100
Wed May 20 00:03:27 1998 98.0211
Wed May 20 00:04:27 1998 100
Wed May 20 00:05:27 1998 100
Wed May 20 00:06:27 1998 100
Wed May 20 00:07:27 1998 100
Wed May 20 00:08:27 1998 100
Was this page helpful? Yes No Submitting... Thank you

Comments