LinuxCommandLibrary

ec.1s

Evaluate expressions and perform arithmetic

SYNOPSIS

ec -s [options]

PARAMETERS

-s
    Summarize connect time by user and date.

-d file
    Use file as accounting file.

-p
    Print connect time for each user for each day, sorted by time.

-w file
    Use file as wtmp file.

-y
    Print connect time for each user for each year.

DESCRIPTION

The ac command, invoked via ec with the -s option, provides a summary of connect time (in hours) based on process accounting records. It reads process accounting data (typically from `/var/account/acct` or a similar file) and generates reports on user connect time. The -s option summarizes connect time by user and date, showing the cumulative connect time for each day and user.

ec -s helps administrators monitor system usage, identify resource-intensive users, and analyze historical trends in system activity. This is especially useful in multi-user environments for resource management and auditing purposes. The output can be redirected and processed further for billing purposes or custom reporting.
It's important to note that the accuracy depends on the proper configuration and functioning of the process accounting system.

CAVEATS

The accuracy of connect time depends on the integrity and proper configuration of the underlying process accounting system. Gaps or errors in the accounting data can lead to inaccurate results. The location of accounting files may vary between distributions.

ACCOUNTING FILES

The default accounting file is often located at `/var/account/acct` or `/var/log/account/pacct`. The location can vary, so consult your system's documentation. The -d parameter allow to define another file

PROCESS ACCOUNTING SETUP

To enable process accounting, you typically need to run the accton command as root. Ensure that your system has a process accounting daemon enabled and configured to collect the necessary data. Process accounting may impact system performance.

HISTORY

Process accounting has been a part of Unix-like systems for many years. The ac command, along with the broader process accounting suite, provides a mechanism for tracking system usage and resource consumption. Early versions of Unix included basic accounting tools, and these have evolved over time to provide more sophisticated reporting and analysis capabilities. The 'ec' command likely represents an evolution or specific implementation of process accounting reporting, potentially tailored to a particular environment or set of needs.

SEE ALSO

ac(1), last(1), sa(8), accton(8)

Copied to clipboard