You can display formatted reports about the process time of active processes with the ps command or of finished processes with the acctcom command.
The acctcom command reads input in the total accounting record form (acct file format). This implies that you have process accounting turned on or that you have run process accounting in the past. See Setting Up an Accounting System for guidelines.
The ps command offers a number of flags to tailor the information displayed. To produce a full list of all active processes except kernel processes, type:
Another useful variation displays a list of all processes associated with terminals. Type:
Both of these usages display a number of columns for each process, including the current CPU time for the process in minutes and seconds.
The process accounting functions are turned on with the startup command, which is typically started at system initialization with a call in the /etc/rc file. When the process accounting functions are running, a record is written to /var/adm/pacct (a total accounting record file) for every finished process that includes the start and stop time for the process. You can display the process time information from a pacct file with the acctcom command. This command has a number of flags that allow flexibility in specifying which processes to display.
For example, to see all processes that ran for a minimum number of CPU seconds or longer, use the -O flag, type:
acctcom -O 2
This displays records for every process that ran for at least 2 seconds. If you do not specify an input file, the acctcom command reads input from the /var/adm/pacct directory.