Table of Contents

NAME

bacct - report accounting statistics on completed batch jobs in the lsbatch system

SYNOPSIS

bacct [ -h ] [ -V ] [ -b ] [ -l ] [ -d ] [ -e ] [ -f logfile ] [ -N host_spec ]
[ -C time0, time1 ] [ -S time0, time1 ] [ -D time0, time1 ] [ -q queuelist ] [ -m hostlist ] [ -u userlist | -u all ] [ jobId ... ]

DESCRIPTION

This command generates and displays statistics on completed batch jobs in an lsbatch system. On job completion (as a job enters either the EXIT or DONE state), job statistics are logged in the job log file (see lsb.acct(5) ). bacct generates reports from these logs; it does not report on jobs that are still in progress.

Using this command, you can produce statistics on sets of jobs. There are two sets of command options: one is for selecting the statistics fields to be displayed, namely the fields in the sections SUMMARY, FIELDS1 and FIELDS2; the other is for specifying the jobs that you are interested in, such as jobs submitted by certain users, jobs submitted to certain queues, jobs executed on certain hosts, jobs with specific job IDs, or jobs whose times of submission to the system, dispatch to a host, or completion fall within specified time intervals.

Only those jobs that satisfy all the optional specifications are considered. When no option is used, the default display fields are only those performance statistics in SUMMARY and only those jobs submitted by the user invoking bacct are considered.

If you are interested in not only the performance statistics, but also a detailed listing of all the qualified jobs, then use the -b (brief format) or -l (long format) option. If both -b and -l options are used, the latter overrides the former.

Statistics not reported here but of interest to individual system administrator can be generated by directly employing awk(1) or perl(1) to process the lsb.acct file.

All times are in seconds.

OPTIONS

-h Print command usage to stderr and exit.

-V Print LSF release version to stderr and exit.

-b Display in brief format, that is, display the fields in the sections SUMMARY and FIELDS1. The default is to display only the fields in section SUMMARY.

-l Display in long format, that is, display all the fields in the sections SUMMARY, FIELDS1, and FIELDS2. The default is to display only the fields in section SUMMARY.

-d Consider only successfully completed jobs (that is, those with a DONE status). The default is to consider all finished jobs (those with a DONE or EXIT status).

-e Consider only exited jobs (that is, those with an EXIT status). The default is to consider all finished jobs (those with a DONE or EXIT status).

-f logfile
Specify the path/filename of the job log file to be analyzed. The default is to use the job log file currently used by the lsbatch system: LSB_SHAREDIR/<clustername>/logdir/lsb.acct (see lsb.acct(5) ). Option -f is useful for off-line analysis.

-N host_spec
Convert the displayed CPU time to normalized CPU time. That is, multiplies the CPU time used in the (first, for parallel job) execution host by the ratio of the CPU factor of the execution host to the one of user specified host_spec if host_spec is a host or host model, or by the ratio of the CPU factor of the execution host to the host_spec itself if host_spec is a factor. If bacct is used off line, i.e., without LIM, the only legal usage for host_spec is a factor.

-C time0, time1
Consider only those jobs whose completion or exit times were within the time interval time0, time1 (see TIME FORMAT). The default is to consider all logged jobs.

-S time0, time1
Consider only those jobs whose submission times were within the time interval time0, time1 (see TIME FORMAT). The default is to consider all logged jobs.

-D time0, time1
Consider only those jobs whose dispatch times were within the time interval time0, time1 (see TIME FORMAT). The default is to consider all logged jobs.

-q queuelist
Consider only those jobs submitted to the queues whose names are given in queuelist. If two or more queue names are given, they must be separated by spaces and enclosed by (") or ('). The default is to consider all queues.

-m hostlist
Consider only those jobs executed on the hosts whose names are given in hostlist. If two or more host names are given, then they must be separated by spaces and enclosed by (") or ('). The default is to consider all hosts.

-u userlist | -u all
Consider only those jobs submitted by the users whose login names and/or user IDs are given in userlist, or by all users (if the reserved user name all is specified). If two or more user names and/or IDs are given, then they must be separated by spaces and enclosed by (") or ('). A mixture of user names and IDs can be used in the list. The default is to consider only the jobs submitted by the user invoking this command.

jobId ...
Consider only those jobs specified by jobId .... This option overrides all other options except -h, -V, -b, -l and -f. If the lsbatch system reserved job ID 0 is used, it will be ignored. The default is to consider all the jobs satisfying other options.

SUMMARY

This set of fields on lsbatch job statistics is always displayed. The total, average, minimum, and maximum statistics are on all specified jobs. The «wait time» is the elapsed time from job submission to job dispatch. The «turnaround time» is the elapsed time from job submission to job completion. The «hog factor» is the amount of CPU time consumed by a job divided by its turnaround time. The `throughput' is the number of completed jobs divided by the time period to finish these jobs. The SUMMARY set includes the following statistics fields:

Total number of jobs completed successfully Total number of exited jobs (for example, failed or killed) Total CPU time consumed by all jobs
Average CPU time consumed
Maximum CPU time of a job
Minimum CPU time of a job
Total wait time by all jobs
Average wait time
Maximum wait time
Minimum wait time
Average turnaround time
Maximum turnaround time
Minimum turnaround time
Average hog factor
Maximum hog factor
Minimum hog factor
Total throughput (see THROUGHPUT below)
Beginning time: the completion or exit time of the first job selected Ending time: the completion or exit time of the last job selected

FIELDS1

The following detailed information on individual jobs is displayed only if the -b or -l option is given.

U/UID
the name of the user who submitted the job; if fail to get the user name by getpwuid(3) , the user ID is displayed
QUEUE
the job queue to which the job was sent

SUBMIT_TIME the time when the job was submitted

CPU_T
the CPU time consumed by the job
WAIT
the wait time of the job
TURN
the turnaround time of the job
FROM
the host from which the job was submitted

EXEC_ON the host or hosts to which the job was dispatched to run

JOB_NAME the name of the job (see bsub(1) )

FIELDS2

The following detailed information on individual jobs is displayed only if the -l option is given.

JOBID
the identifier that the lsbatch system assigned to the job
STATUS
the status of either done or exit that indicates the job was either successfully completed or exited

DISPAT_TIME the time when the job was dispatched to run on the EXEC_ON host(s)

COMPL_TIME the time when the job exited or completed

HOG_F
the «hog factor"; equal to «CPU time» / «turnaround time"
CWD
the current work directory of the job

INPUT_FILE the file from which the job reads its standard input (see bsub(1) )

OUTPUT_FILE the file to which the job writes its standard output (see bsub(1) )

ERR_FILE the file in which the job stores its standard error output (see bsub(1) )

THROUGHPUT

The throughput T of the whole system, or of certain hosts, or of certain queues is calculated by the formula: T = N/(ET-BT), where N is the total number of jobs considered, BT is the «Beginning time» when the first job was logged, and ET is the «Ending time» when the last job was logged.

You can use the option «-C time0, time1» to specify the «Beginning time» as time0 and the «Ending time» as time1. In this way, you can examine the throughput during a specific time period.

The jobs involved in the throughput calculation are only those being logged (that is, completed or exited). Jobs that are running, suspended, or never dispatched after their submission are not considered, because they are still in the lsbatch system and not logged in the lsb.acct file.

The total throughput of the whole system can be calculated when -u all is specified but -m, -q, -S, -D and jobId options are not. The throughput of certain hosts can be calculated when -u all is specified but -q, -S, -D and jobId options are not. Similarly, the throughput of certain queues can be calculated when -u all is specified but -m, -S, -D and jobId options are not.

TIME FORMAT

The format of time in the options -C, -S and -D is the same as in bhist(1) .

See bhist(1) for details.

SEE ALSO

bhist(1) , bsub(1) , bjobs(1) , lsb.acct(5)


Table of Contents