Document revision date: 30 March 2001

## OpenVMS System Manager's Manual

Previous | Contents | Index

## Chapter 21
Tracking Resource Use

This chapter describes how to find out how your system resources have been used. You can use this information to:

- Charge users for the resources they have used. You can produce reports of the resources used by individual users.
- Plan your future equipment requirements. You can monitor changing patterns of resource use and predict future demands.
- Troubleshoot the system. You can check the final exit status of processes.
- Improve system performance. You can find out the load that individual images and processes place on your system.
- Detect security breaches. You can identify unusual patterns of resource use.

Information Provided in This Chapter

This chapter describes the following tasks:

Task | Section
--- | ---
Determining which resources are being tracked | Section 21.2
Controlling which resources are tracked | Section 21.3
Starting up a new accounting file | Section 21.4
Moving the accounting file | Section 21.5
Producing reports of resource use | Section 21.6
Setting up accounting groups | Section 21.7
Monitoring disk space | Section 21.8

This chapter explains the following concept:

Concept | Section
--- | ---
Accounting files | Section 21.1

## 21.1 Understanding Accounting Files

The system gathers information about resource use. For example, the information can include the resources such as CPU time used by each print job. The system stores this information in accounting files.

The resources tracked by default depend on the model of computer you use. However, you can control which resources are tracked. If you do not want to track resource use, you can stop the accounting file tracking resource use altogether. (See Section 21.3.)

Each node in an OpenVMS Cluster has its own accounting file, known as its current accounting file. By default, this file is SYS$MANAGER:ACCOUNTNG.DAT, but you can control which file is used (see Section 21.5).

The information in the accounting files is in binary. You cannot display it with the TYPE command. To display the information, use the Accounting utility (ACCOUNTING). (See Section 21.6.)

## 21.2 Determining Which Resources Are Being Tracked

To determine which resources are currently being tracked, use the SHOW ACCOUNTING command:

    $ SHOW ACCOUNTING

This command produces a screen display (see the example) that contains keywords in the following two categories:

- Keywords that show which types of resource are being tracked:

  Keyword | Type of Resource
  --- | ---
  IMAGE | Resources used by an image
  LOGIN_FAILURE | Resources used by an unsuccessful attempt to log in
  MESSAGE | Unformatted resource 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

- Keywords that show which types of process are being tracked. When the resources for processes or images are tracked, these keywords show the process type:

  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, interactive, or network process)

Example

    $ SHOW ACCOUNTING
    Accounting is currently enabled to log the following activities:
          PROCESS        any process termination
          IMAGE          image execution
          INTERACTIVE    interactive job termination
          LOGIN_FAILURE  login failures
          NETWORK        network job termination
          PRINT          all print jobs

The keywords in this example show that the local node is tracking the resources used by each:

- Interactive and network process
- Image running in an interactive or network process
- Login failure
- Print job

## 21.3 Controlling Which Resources Are Tracked

You can control which resources the system tracks. To save disk space, you can stop the system tracking resources you are not interested in.

How to Perform This Task

1. Use the SET ACCOUNTING command with the /ENABLE and /DISABLE qualifiers in the following format to control which resources are tracked:

   `SET ACCOUNTING/DISABLE[=(keyword[,...])]/ENABLE[=(keyword[,...])]`

   The keywords are the same as those explained in Section 21.2.

2. To make this change permanent, edit the SET ACCOUNTING command in the SYS$MANAGER:SYSTART_VMS.COM startup file.

Example

This example prevents the tracking of all resources except those used by interactive and batch processes:

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

The /DISABLE qualifier is not followed by a keyword. Therefore, the qualifier disables the tracking of all resources. The /ENABLE qualifier then enables the tracking of the resources used by interactive and batch processes.

## 21.4 Starting Up a New Accounting File

To start up a new current accounting file, use the following command:

    $ SET ACCOUNTING/NEW_FILE

This closes the current accounting file and opens a new version of it.

If the system encounters an error when trying to write information to the current accounting file, it automatically closes the file and opens a new version of it.

Example

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. You can retain this file as a record of the resources used in that week.

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

## 21.5 Moving the Accounting File

When you first install your system, the current accounting file is SYS$MANAGER:ACCOUNTNG.DAT.

This file can become quite large. Moving it from your system disk can improve system performance.

How to Perform This Task

1. Define the logical name ACCOUNTNG in your system logical name table to point to the file you want to use. For example:

       $ DEFINE ACCOUNTNG MYDISK:[MYDIR]MYFILE.DAT/SYSTEM

   Give the full file specification, including the device and directory.

   Note Two nodes cannot log information in the same accounting file. If you define ACCOUNTNG on two nodes to point to the same file, each node will open and use its own version of the file.

2. To make the change permanent, add this definition to the file SYS$MANAGER:SYLOGICALS.COM.
3. Use the SET ACCOUNTING command with the /NEW_FILE qualifier to create and use the new file:

       $ SET ACCOUNTING/NEW_FILE

Example

This example changes the current accounting file to [MYDIR]MYDISK:MYFILE.DAT.

    $ DEFINE ACCOUNTNG MYDISK:[MYDIR]MYFILE.DAT/SYSTEM
    $ SET ACCOUNTING/NEW_FILE

## 21.6 Producing Reports of Resource Use

The three types of reports are:

Type of Report | Qualifier
--- | ---
Brief | /BRIEF (the default)
Full | /FULL
Summary | /SUMMARY

To produce a report, use the ACCOUNTING command with the appropriate qualifier in the following format:

`ACCOUNTING [filespec[,...]/qualifier[,...]]`

This runs the Accounting utility. The filespec parameter lists the accounting files you want to process. If you omit it, the Accounting utility processes the default current accounting file, SYS$MANAGER:ACCOUNTNG.DAT.

By default, the Accounting utility processes all the records in the accounting files you specify. You can use selection qualifiers to specify which records you want to process.

By default, brief and full reports present the records in the order in which they were logged in the accounting file. When you produce brief and full reports, you can use the /SORT qualifier to specify another order.

Example

This example produces a brief report of the information in the file that the logical name ACCOUNTNG points to. The /TYPE qualifier selects records for print jobs only. The /SORT qualifier displays them in reverse alphabetical order of user name.

    $ ACCOUNTING ACCOUNTNG/TYPE=PRINT/SORT=-USER
        Date / Time      Type  Subtype  Username      ID     Source Status
    ------------------------------------------------------------------------
    13-APR-2000 13:36:04 PRINT          SYSTEM     20A00442         00000001
    13-APR-2000 12:42:37 PRINT          JONES      20A00443         00000001
    13-APR-2000 14:43:56 PRINT          FISH       20A00456         00000001
    14-APR-2000 19:39:01 PRINT          FISH       20A00265         00000001
    14-APR-2000 20:09:03 PRINT          EDWARDS    20A00127         00000001
    14-APR-2000 20:34:45 PRINT          DARNELL    20A00121         00000001
    14-APR-2000 11:23:34 PRINT          CLARK      20A0032E         00040001
    14-APR-2000 16:43:16 PRINT          BIRD       20A00070         00040001
    14-APR-2000 09:30:21 PRINT          ANDERS     20A00530         00040001

## 21.7 Setting Up Accounting Groups

Users are already organized into UIC security groups. For accounting purposes, security groups are often inappropriate. You can put users into accounting groups with the Authorize utility using the /ACCOUNT qualifier. In this way, each user is in an accounting group and a security group.

Using the Accounting utility, you can:

- Summarize the resources used by all the users in a particular accounting or security group. To do this, use the ACCOUNT or UIC keyword with the /SUMMARY qualifier.
- Select records for all the users in a particular accounting or security group. To do this, use the /ACCOUNT or /UIC qualifier.

How to Perform This Task

1. Plan your accounting groups. Decide which users you want in each accounting group, and choose names for the groups.
   The name of an accounting group can be a maximum of eight characters.
2. Change the account field values in the UAF. Use the Authorize utility's MODIFY command in the following format to change the value in the account field to the name of the user's accounting group:

   `MODIFY username/ACCOUNT=account-name`

   where:

   username | is the name of the user
   account-name | is the name of the accounting group that you want that user to be in

The next time your users log in, they will be in their new accounting groups, and their resource use will be tagged with the appropriate accounting group names.

Example

This example modifies the accounting group name to SALES_W8 for the username FORD:

    $ RUN SYS$SYSTEM:AUTHORIZE
    UAF> MODIFY FORD/ACCOUNT=SALES_W8
    UAF> EXIT

## 21.8 Monitoring Disk Space

To find out how much disk space a user is using, use SYSMAN or, if you have not enabled disk quotas, the DIRECTORY command.

How to Perform This Task

Use either of the following methods:

- Use the SYSMAN command DISKQUOTA SHOW in the following format:

  `DISKQUOTA SHOW owner [/DEVICE=device-spec]`

  This shows the number of blocks used by all the files that are owned by the specified user on the specified disk.

- Use the DIRECTORY command with the /SIZE and /GRAND_TOTAL qualifiers in the following format:

  `DIRECTORY [filespec[,...]]/SIZE=ALLOCATION/GRAND_TOTAL`

  This shows the number of blocks used by all the files in the specified file location.
  Note that the DIRECTORY command does not include the blocks used by file headers or the user's root directory.

Examples

1. This example uses SYSMAN to find out the number of blocks used by all the files that are owned by each user.

       $ RUN SYS$SYSTEM:SYSMAN
       SYSMAN> DISKQUOTA SHOW *
       %SYSMAN-I-QUOTA, disk quota statistics on device SYS$SYSTEM:MYDISK
       Node UNION
            UIC                  Usage        Permanent Quota   Overdraft Limit
       [0,0]                     0            1000              100
       [DOC,EDWARDS]             115354       150000            5000
       [DOC,FISH]                177988       250000            5000
       [DOC,SMITH]               140051       175000            5000
       [DOC,JONES]               263056       300000            5000

2. This example uses the DIRECTORY command to show the number of blocks allocated by all the files in and under MYDISK:[PARSONS].

       $ DIRECTORY MYDISK:[PARSONS...]/SIZE=ALLOCATION/GRAND_TOTAL
       Grand total of 28 directories, 2546 files, 113565 blocks.

## Chapter 22
OpenVMS Cluster Considerations

This chapter describes concepts related to the OpenVMS Cluster environment; it also tells how the Show Cluster utility (SHOW CLUSTER) can display information about a cluster and how the System Management utility (SYSMAN) can help you manage an OpenVMS Cluster environment.

Information Provided in This Chapter

This chapter describes the following tasks:

Task | Section
--- | ---
Beginning to use SHOW CLUSTER commands | Section 22.3.2
Adding information to a report | Section 22.3.3
Controlling the display of data | Section 22.3.4
Formatting the display of data | Section 22.3.5
Creating a startup initialization file | Section 22.3.6
Using command procedures containing SHOW CLUSTER commands | Section 22.3.7
Using SYSMAN to manage security | Section 22.5
Using the SYSMAN DO command to manage an OpenVMS Cluster | Section 22.6

This chapter explains the following concepts:

Concept | Section
--- | ---
OpenVMS Cluster systems | Section 22.1
Setting up an OpenVMS Cluster environment | Section 22.1.1
Clusterwide system management | Section 22.1.2
The Show Cluster utility (SHOW CLUSTER) | Section 22.3.1
SYSMAN and OpenVMS Cluster management | Section 22.4

## 22.1 Understanding OpenVMS Cluster Systems

An OpenVMS Cluster system is a loosely coupled configuration of two or more computers and storage subsystems, including at least one Alpha computer. An OpenVMS Cluster system appears as a single system to the user even though it shares some or all of the system resources. When a group of computers shares resources clusterwide, the storage and computing resources of all of the computers are combined, which can increase the processing capability, communications, and availability of your computing system.

A shared resource is a resource (such as a disk) that can be accessed and used by any node in an OpenVMS Cluster system. Data files, application programs, and printers are just a few items that can be accessed by users on a cluster with shared resources, without regard to the particular node on which the files or program or printer might physically reside.

When disks are set up as shared resources in an OpenVMS Cluster environment, users have the same environment (password, privileges, access to default login disks, and so on) regardless of the node that is used for logging in. You can realize a more efficient use of mass storage with shared disks, because the information about any device can be used by more than one node---the information does not have to be rewritten in many places. You can use the OpenVMS MSCP, which is the mass storage control protocol, or TMSCP, which is the tape mass storage control protocol, server software to make tapes accessible to nodes that are not directly connected to the storage devices.

You can also set up print and batch queues as shared resources. In an OpenVMS Cluster configuration with shared print and batch queues, a single queue database manages the queues for all nodes. The queue database makes the queues available from any node. For example, suppose your cluster configuration has fully shared resources and includes nodes ALBANY, BASEL, and CAIRO. A user logged in to node ALBANY can send a file that physically resides on node BASEL to a printer that is physically connected to node CAIRO, and the user never has to specify (or even know) the nodes for either the file or the printer.

Planning an OpenVMS Cluster System

A number of types of OpenVMS Cluster configurations are possible. Refer to Guidelines for OpenVMS Cluster Configurations and the OpenVMS Cluster Software Product Description (SPD) for complete information about supported devices and configurations.

The following sections briefly describe OpenVMS Cluster systems. For complete information about setting up and using an OpenVMS Cluster environment, refer to OpenVMS Cluster Systems.

### 22.1.1 Setting Up an OpenVMS Cluster Environment

Once you have planned your configuration, installed the necessary hardware, and checked hardware devices for proper operation, you can set up an OpenVMS Cluster system using various system software facilities. Setup procedures to build your cluster follow.

Procedure | For More Information
--- | ---
Installing or upgrading the operating system on the first OpenVMS Cluster computer | Installation and operations guide for your computer
Installing required software licenses | OpenVMS License Management Utility Manual
Configuring and starting the DECnet for OpenVMS network | DECnet for OpenVMS Networking Manual
Configuring and starting TCP/IP Services | Compaq TCP/IP Services for OpenVMS Installation and Configuration
Preparing files that define the cluster operating environment and that control disk and queue operations | OpenVMS Cluster Systems
Adding computers to the cluster | OpenVMS Cluster Systems

Depending on various factors, the order in which these operations are performed can vary from site to site, as well as from cluster to cluster at the same site.

Previous | Next | Contents | Index

| privacy and legal statement |
6017PRO_089.HTML