timex to Analyze a Command

If you have a specific command you want to find out more about, you can use timex, which reports the elapsed time, user time, and system time spent in the execution of any command you specify.

timex is a good command for users because it gives you an idea of the system resources you are consuming when issuing a command. The following two examples show issuing timex with no options to get a short output of the amount of cpu consumed; the second example shows issuing timex -s to report “total” system activity on a Solaris system:

martyp $ timex listing

real        0.02
user        0.00
sys         0.02


martyp $ timex -s listing real 0.02 user 0.00 sys 0.01 SunOS 5.7 Generic sun4m 08/21 07:48:30 %usr %sys %wio %idle 07:48:31 32 68 0 0 07:48:30 ...

Get HP-UX 11i System Administration Handbook and Toolkit, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.