itsvacct Shell Script

Introduction

This shell script has to be run before a UNIX account binary file can be processed into IT Service Vision. Either binary pacct is passed to this shell script resulting in a file that can be directly processed by ITRM or, no pacct file is passed in and generated file is specified in CPACCHDR macro. This shell script can be found under /misc/cpe (UNIX), \cpe\sasmisc (NT,98,OS/2) sub-directories or in itsvacct pds member in sas.cpe.cpmisc data set on MVS (where sas represents prefix where sas is installed at your site).

result is that a header is placed on binary file that is used by processing to establish Clock Ticks, Page Size, Domain, System and (optionally) passwd and group information.

Synopsis

itsvacct -c clock_ticks -a page_size /
         [-i account_file] [-d domain_name] [-p passwd_file] /
         [-g group_file] [-s system] [-n node_name]          /
         [-m machine (hardware) type] [-r system_release]    /
         [-z time_zone] [-h] [-o[0-9] optional parm [0-9]]

Description

-c and -a switches must be specified as they have no default values. following lists describes each of shell script switches and their default behavior:

Switch Required/Optional Default Description
-c clock_ticks Required No default This value should represent number of clock ticks per second on machine on which binary UNIX accounting file (pacct) was collected. UNIX Accounting records time in clock ticks and there fore this value is required in order to convert time into seconds.
-a page_size Required No default This value should represent page size in Kbytes for machine on which binary UNIX accounting file (pacct) was collected.For example, if you machine has 8K pages, specify -a 8.
-i account_file Optional No pacct binary data included. This value should represents location of UNIX accounting binary file. If not specified pacct binary data is not included.
-p passwd_file Optional No passwd information included. If specified this value points to passwd file that contains passwd information that should be included. If not specified, then passwd information is NOT stored in output file.
-g group_file Optional No group information included. If specified this value points to group file that contains group information that should be included. If not specified, then group information is NOT stored in output file.
-s system Optional Default is obtained through uname -s command. This parameter allows user to override this command should uname command not work or return an incorrect value.
-n node_name Optional Default is obtained through uname -n command. This parameter allows user to override this command should uname command not work or return an incorrect value.
-m machine (hardware) type Optional Default is obtained through uname -m command. This parameter allows user to override this command should uname command not work or return an incorrect value.
-r system_release Optional Default is obtained through uname -r command. This parameter allows user to override this command should uname command not work or return an incorrect value.
-z time_zone Optional Default GMT offset is calculated by shell script. If you specify GMT offset using this switch format is hh:mm (prefixed with a minus sign if necessary). Hours can be from 00 to 14 and minutes can only be 00 or 30.
-h Optional Not applicable Displays help information.
-0[0-9] value Optional Not used These fields can be used to pass extra information into PDB. To ensure that data in these extra fields is populated to PDB you have to make some table and variable updates. See Enhanced UNIX Accounting Support User Guide for more information.

following is an example header for a binary file. This particular example shows that passwd and group file information is being included with raw data.

ITSVACCTON,HP-UX,B.10.20,node01,domain02,-5:00,8000,100,8,,,,,,,,,
ITSVPASSWD
root,0,3,Root
daemon,1,5,
bin,2,2,
josmith,158,20,John Smith
jasmith,161,204,Jan Smith
ITSVPASSWDEND
ITSVGROUP
nogroup,-2
aaa,110
bbb,111
ITSVGROUPEND
ITSVHEADEND

Examples

To create a file with no passwd and group information using defaults for other switches:

    itsvacct -i /var/adm/pacct -c 100 -a 8 > acct.header

To create a file with both passwd and group information:

    itsvacct -i /var/adm/pacct -c 100 -a 8 -p /etc/passwd -g /etc/group > acct.header