[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 5


timex Command

Purpose

Reports, in seconds, the elapsed time, user time, and system execution time for a command.

Syntax

timex-o ] [  -p ] [  -s ] Command

Description

The timex command reports, in seconds, the elapsed time, user time, and system execution time for a command. With specified flags, the timex command lists or summarizes process accounting data for a command and all of its children. Command is the name of any executable file on the system. It also reports total system activity during the execution interval. Output is written to standard error. The system uses the /var/adm/pacct file to select process records associated with the command and includes background processes with the same user ID, workstation ID, and execution time window.

Flags


-o Reports the total number of blocks read or written and total characters transferred by a command and all its children.
-p Lists process accounting records for a command and all its children. The number of blocks read or written and the number of characters transferred are reported. The -p flag takes the f, h, k, m, r, and t arguments defined in the acctcom command to modify other data items.

-f
Print the fork/ exec flag and system exit status columns in the output.

-h
Instead of mean memory size, shows the fraction of total available CPU time consumed by the process (hogfactor).

-k
Instead of memory size, shows total kcore minutes (memory measurement in kilobyte segments used per minute of run time).

-m
Shows mean main-memory size. This is the default. The -h flag or -k flag turn off the -m flag.

-r
Shows CPU factor.

-t
Shows separate system and user CPU times.
-s Reports total system activity during the execution of the command. All the data items listed in the sar command are reported.

Note: Accounting must be turned on to use the -o or -p flags.

Examples

  1. To report the total number of blocks read and total characters transferred by the ls command, enter:

    timex -o ls
    
  2. To list the process accounting records for the ps command, enter:

    timex -p ps -fe
    
  3. To report total system activity for the execution of the ls command, enter:

    timex -s ls
    

Files


/var/adm/pacct Used to select record associated with the command.

Related Information

The acctcom command, sar command, time command.

Setting Up an Accounting System in AIX 5L Version 5.1 System Management Guide: Operating System and Devices describes the steps you must take to establish an accounting system.

See the Accounting Commands in AIX 5L Version 5.1 System Management Concepts: Operating System and Devices for a list of accounting commands that can be run automatically or entered from the keyboard.

For more information about the Accounting System, the preparation of daily and monthly reports, and the accounting files, see the Accounting Overview in AIX 5L Version 5.1 System Management Concepts: Operating System and Devices.

Monitoring and Tuning Commands and Subroutines in AIX 5L Version 5.1 Performance Management Guide.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]