csaedit(1M) csaedit(1M) NAME csaedit - displays and edits the accounting information SYNOPSIS /usr/lib/acct/csaedit [-P pacctfile] -b offsetfile -o outfile [-v] /usr/lib/acct/csaedit [-P pacctfile] [-o outfile] -A [-m] [-t] [-v] /usr/lib/acct/csaedit [-P pacctfile] -r reclist -o outfile [-v] /usr/lib/acct/csaedit [-P pacctfile] -r reclist [-o outfile] -A | -x [-m] [-t] [-v] DESCRIPTION The csaedit command edits the accounting file. The accounting file (pacctfile) can be a pacct or sorted pacct file. You must use the csaverify(1M) command to verify records in the accounting file prior to using this command. If the csaverify command indicates that the accounting file contains invalid data, you must first delete the invalid data. You can do this by passing the file that contains information about invalid records produced by the csaverify command to the csaedit command. The csaedit command uses the byte offset and length information from this file to delete the invalid data. To ensure that all of the bad records were removed, use the csaverify command to reverify the accounting file after deleting any records. After deleting bad records, you can use the csaedit command to view the remaining records and delete any of these remaining records. Use the record numbers display by the -A option to delete records. The csaedit command outputs the data to stdout or to a file. The output data can be in binary or ASCII form. Binary data can only be written out to a file. Only accounting records can be output. No data can be output until bad data has been removed. Displaying the data in ASCII form allows you to view the valid records and decide which ones to delete. The csaedit command accepts three types of options: input, output, and record selection options. Input Options The csaedit command accepts the following input option: -P pacctfile Specifies a pacct file or sorted pacct file. The default filename is /var/adm/acct/work/Wpacct. Output Options The csaedit command accepts the following output options: -A Specifies ASCII output for all data. The default is to output binary data. You cannot use this option with the -x option. -m Outputs memory values. This option may only be used with the -A option or the -x option. -o outfile Specifies the output file. The default for ASCII output is stdout. This option is required with the -b and -r options. Records cannot be written back to the input pacct file as in the following example: csaedit -P pacct0 -r 18 -o pacct0. You cannot edit the file; you have to create a new file. -t Outputs CPU times. Also displays queue wait time for consolidated NQS and workload management records. This option may only be used with the -A option or the -x option. -v Specifies verbose mode. Output is written to stderr. -x Specifies no execute mode. Only the records to be deleted are displayed. The selected records are not actually deleted. The records are displayed in ASCII form. This option must be used with the -r option. This option cannot be used with the -A option. Record Selection Options The csaedit command accepts the following record selection options: -b offsetfile Specifies the file that contains the information about invalid records that are to be deleted. The offsetfile is produced by the csaverify command. You must use this option with the -o option since the data will be written out in binary form only. You can only use this option with the -P and -v options. -r reclist Specifies the record numbers of the records to be deleted. reclist is a comma-separated list. EXAMPLES Example 1: The following example deletes invalid records from the Wpacct1 file. The file invalid contains information about invalid records. The output is written to file Wpacct1.NEW. csaedit -P Wpacct1 -b invalid -o Wpacct1.NEW Example 2: The following example outputs the Wpacct1 file in ASCII. CPU times and memory values are reported. csaedit -P Wpacct1 -Amt Example 3: The following example displays records that are deleted in Example 4. csaedit -P Wpacct1 -xr 2, 10, 15 Example 4: The following example deletes records 2, 10, and 15 from the Wpacct1 file. The output is written to file Wpacct1.NEW, and verbose output is written to file err. csaedit -P Wpacct1 -r 2,10,15 -o Wpacct1.NEW -v 2> err FILES /usr/include/sys/acct.h Accounting records hearder file /usr/include/csaacct.h Daemon accounting header file SEE ALSO csaverify(1M). Page 3