SET ACCOUNTING

From VSI OpenVMS Wiki
Revision as of 04:11, 25 November 2021 by Junji (talk | contribs) (add Category:DCL Commands)
Jump to: navigation, search

SET ACCOUNTING is a DCL command that vontrols the current accounting file. It requires the OPER privilege.

Syntax

SET ACCOUNTING

Qualifiers

  • /ENABLE=keyword enables tracking of the resources specified by the keywords.
  • /DISABLE=keyword prevents tracking of the resources specified by the keywords.
  • /LOG writes information to the current SYS$OUTPUT device as the command executes.
  • /NEW_FILE closes the current accounting file, and starts up a new version of it. The name of the new file depends on whether the logical name ACCOUNTNG is defined in your system logical name table. If this logical name is not defined, the SET ACCOUNTING command opens the file SYS$MANAGER:ACCOUNTNG.DAT. If this logical name is defined, the command opens the file that this logical name points to. If you omit the directory, SYS$MANAGER is the default, and if you omit the file type, .DAT is the default. The /NEW_FILE qualifier writes a record to the end of the old file that contains a forward pointer to the new file, and a record to the beginning of the new file that contains a backward pointer to the old file. These records contain the names of the new and old files respectively.

Keywords

Keyword Description
IMAGE Resources used by an image
LOGIN_FAILURE Resources used by an unsuccessful attempt to log in
MESSAGE Unformatted record written to the accounting file by a call to the $SNDJBC system service
PRINT Resources used by a print job
PROCESS Resources used by a process. You do not need to stop the tracking of all processes and images. You can prevent resources being tracked for specific types of process and for images running in these types of process. The following table lists the keywords you can use to specify the type of process:
Keyword Type of process
BATCH Batch process
DETACHED Detached process
INTERACTIVE Interactive process
NETWORK Network process
SUBPROCESS Subprocess (the parent process can be a batch, detached, network, or interactive process)

Examples

$ SET ACCOUNTING /DISABLE /ENABLE=(PROCESS,BATCH,INTERACTIVE)
$ SET ACCOUNTING /ENABLE=IMAGE

This example tells the system to track the resources used only by batch and interactive processes, and by images running in batch and interactive processes. It illustrates the cumulative effect of /ENABLE and /DISABLE qualifiers, and of SET ACCOUNTING commands.

The /DISABLE qualifier prevents the tracking of all resources. The /ENABLE qualifier then tells the system to track the resources used by batch and interactive processes. The second SET ACCOUNTING command tells the system to track the resources used by images.

$ SET ACCOUNTING /NEW_FILE
$ RENAME SYS$MANAGER:ACCOUNTNG.DAT;-1 WEEK_24_RESOURCES.DAT

This example closes the current accounting file, opens a new version of it, and changes the name of the old file to WEEK_24_RESOURCES.DAT.