Showing Accounting system activity while running a command

You can display formatted information about system activity while a particular command is running.

The -o and -p flags of the timex command require that system accounting be turned on.
You can use the time and timex commands to display formatted information about system activity while a particular command is running.
To display the elapsed time, user time, and system execution time for a particular command, type:
time CommandName
OR
timex CommandName
To display the total system activity (all the data items reported by the sar command) during the execution of a particular command, type:
timex -s CommandName
The timex command has two additional flags. The -o flag reports the total number of blocks read or written by the command and all of its children. The -p flag lists all of the process accounting records for a command and all of its children.