Professional Documents
Culture Documents
Stratus Technologies
R281M-00
Notice
Contents
1-1
1-1
1-2
1-2
1-5
1-5
1-7
1-7
1-8
1-8
1-9
1-9
Contents
iii
Contents
iv
Chapter 1
VOS System Administration:
The Accounting Facility
1-
1-1
s$add_key
s$keyed_position_rewrite
s$keyed_rewrite
s$keyed_write
s$rel_position_rewrite
s$rel_rewrite
s$rel_write
s$seq_position_rewrite
s$seq_rewrite
s$seq_write
s$seq_write_partial
s$write_raw
s$keyed_position_read
s$keyed_read
s$read_raw
s$rel_position_read
s$rel_read
s$seq_position_read
s$seq_read
1-2
proc start
proc term
proc cleanup
proc stats
file close
command start
command term
file log
proc log
transaction
date_time
The standard date/time this record was logged.
module_name
The name of the module on which the record was logged.
user_name
group_name
terminal_port_path
process_name
process_priority
client_name
The client name given for process statistics records.
client_group
For process statistics records, the group portion of
the client name, if the split_client_name parameter in
the s$acct_processing_init is specified as true.
file_type
For file close records and file log records, the file
type, as returned by s$get_port_attachment.
file_path
For file close records and file log records, the file
path.
command_level
For command start and stop records, the command level.
This indicates how many commands are nested. For
example, if a macro calls a command, the level of the
1-3
1-4
relevant.
s$acct_processing_init
declare s$acct_processing_init entry( char(256) varying,
fixed bin(31), fixed bin(31), char(66) varying,
fixed bin(15), fixed bin(15), fixed bin(15),
char(32) varying, char(32) varying, char(32) varying,
char(256) varying, char(256) varying,
char(256) varying, char(65) varying, char(32) varying,
fixed bin(15), char(256) varying, char(32) varying );
The s$acct_processing_init subroutine initializes the accounting
package to read records from the accounting log(s) of one or more
modules. You should call this subroutine first. All parameters
are input.
s$acct_processing_init( accounting_dir, start_time, end_time,
modules, port_accounting_required,
port_accounting_relevant, split_client_name,
match_process, match_user, match_group, match_terminal,
match_file, match_command, match_client,
match_client_group, num_summaries, user_record_path,
command_name )
accounting_dir
Either the null string () or a directory name. If
you specify a directory name, the operating system
looks for the accounting files in the specified
directory rather than in the standard accounting
directories for the desired modules. If you specify a
directory name for this parameter, you must specify the
null string for the modules parameter.
start_time
end_time
The time interval over which the log(s) are to be
scanned.
modules
A module star name that defines the module(s) whose
log(s) are to be scanned. If you specify a directory
name for the accounting_dir parameter, you must specify
the null string () for the modules parameter.
port_accounting_required
1-5
port_accounting_relevant
These flags indicate
should consider port
relevant. Specify a
should be considered
1-6
s$acct_init_summary
declare s$acct_init_summary entry( fixed bin(15), fixed bin(15) );
The s$acct_init_summary subroutine is used to initialize one
summary. You must call it num_summaries times after the
call to s$acct_processing_init, and before any calls to
s$acct_next_record. (The value num_summaries is specified
as a parameter in the call to s$acct_processing_init.) It
must be immediately followed by num_components calls to
s$acct_init_summary_key. All parameters are input.
s$acct_init_summary( which_summary, num_keys )
which_summary
A number that identifies the summary to initialize.
num_keys
The number of keys used to identify a unique entry in
this summary. In ensuing calls, the keys are
identified by a number between 1 and num_keys.
s$acct_init_summary_key
declare s$acct_init_summary_key entry( fixed bin(15),
fixed bin(15), char(*) varying );
The s$acct_init_summary_key subroutine adds one key to the
summary indicated in the preceding s$acct_init_summary call. You
must call it before any calls to s$acct_next_record, and must
call it once for each of the keys in the summary. These calls
must occur in key number order. All parameters are input;
however, you must pass the key parameter by reference.
1-7
s$acct_next_record
declare s$acct_next_record entry( fixed bin(15) );
s$acct_get_longest_key
declare s$acct_get_longest_key entry( fixed bin(15),
fixed bin(15), fixed bin(15) );
The s$acct_get_longest_key subroutine returns the longest
value that has been seen for a given key in a given summary.
You can call it any time after the last call to
s$acct_next_record. The parameters which_summary and
which_key are input, and the parameter longest_key is
output. This subroutine is useful for deciding on the
format for columnar output without actually making a pass
1-8
s$acct_init_summary_output
declare s$acct_init_summary_output entry( fixed bin(15),
fixed bin(15), fixed bin(15) );
The s$acct_init_summary_output subroutine sorts a given
summary and initializes it for output. A call to this
subroutine should be followed by calls to
s$acct_next_summary_output. The parameters which_summary
and delete_after are input.
s$acct_init_summary_output( which_summary, delete_after, code )
which_summary
The summary to be prepared.
delete_after
If this parameter value is nonzero, all data structures
for the summary will be freed at some convenient time
after the last call to s$acct_next_summary_output. If
you want to use a summary more than once, specify zero
as the value of this parameter all but the last time.
code
The value returned will be either zero or the operating
system error code e$too_many_entries. If there are
more than 32767 entries in the summary, code will be
nonzero and the extra entries will be arbitrarily
discarded. A message will already have been printed.
s$acct_next_summary_output
declare s$acct_next_summary_output entry( fixed bin(15),
fixed bin(15), fixed bin(15), (*) char(300) varying,
fixed bin(15) );
The subroutine s$acct_next_summary_output is used to
retrieve the next entry from a summary. After calling
s$acct_init_summary_output, call s$acct_next_summary_output
repeatedly until receiving the operating system error code
e$end_of_file. All parameters except max_num_keys are
output parameters. Each entry in the summary is put into
the external variable s$acct_record.
Each entry in the summary is a combination of all records
selected by the combination of keys for that entry that also
match the records selected by the call to
s$acct_processing_init. Records are combined into one entry
according to the following rules:
1-9
1.
Fields that are counts contain the sum for all the
records.
2.
3.
1-10