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 bread/s lread/s %rcache bwrit/s lwrit/s %wcache pread/s pwrit/s
07:48:31       0       0     100       0       0     100       0       0

Average        0       0     100       0       0     100       0       0

07:48:30   device        %busy   avque   r+w/s  blks/s  avwait  avserv

07:48:31   fd0               0     0.0       0       0     0.0     0.0
           nfs1              0     0.0       0       0     0.0     0.0
           nfs219            0     0.0       0       0     0.0     0.0
           sd1               0     0.0       0       0     0.0     0.0
           sd1,a             0     0.0       0       0     0.0     0.0
           sd1,b             0     0.0       0       0     0.0     0.0
           sd1,c             0     0.0       0       0     0.0     0.0
           sd1,g             0     0.0       0       0     0.0     0.0
           sd3               0     0.0       0       0     0.0     0.0
           sd3,a             0     0.0       0       0     0.0     0.0
           sd3,b             0     0.0       0       0     0.0     0.0
           sd3,c             0     0.0       0       0     0.0     0.0
           sd6               0     0.0       0       0     0.0     0.0


Average    fd0               0     0.0       0       0     0.0     0.0
           nfs1              0     0.0       0       0     0.0     0.0
           nfs219            0     0.0       0       0     0.0     0.0
           sd1               0     0.0       0       0     0.0     0.0
           sd1,a             0     0.0       0       0     0.0     0.0
           sd1,b             0     0.0       0       0     0.0     0.0
           sd1,c             0     0.0       0       0     0.0     0.0
           sd1,g             0     0.0       0       0     0.0     0.0
           sd3               0     0.0       0       0     0.0     0.0
           sd3,a             0     0.0       0       0     0.0     0.0
           sd3,b             0     0.0       0       0     0.0     0.0
           sd3,c             0     0.0       0       0     0.0     0.0
           sd6               0     0.0       0       0     0.0     0.0

07:48:30 rawch/s canch/s outch/s rcvin/s xmtin/s mdmin/s
07:48:31       0       0     147       0       0       0

Average        0       0     147       0       0       0

07:48:30 scall/s sread/s swrit/s  fork/s  exec/s rchar/s wchar/s
07:48:31    2637       0      95   15.79   15.79       0   19216

Average     2637       0      95   15.79   15.79       0   19216

07:48:30 swpin/s bswin/s swpot/s bswot/s pswch/s
07:48:31    0.00     0.0    0.00     0.0     116

Average     0.00     0.0    0.00     0.0     116

07:48:30  iget/s namei/s dirbk/s
07:48:31       0     195     121

Average        0     195     121

07:48:30 runq-sz %runocc swpq-sz %swpocc
07:48:31     2.0     526

Average      2.0     526

07:48:30  proc-sz    ov  inod-sz    ov  file-sz    ov   lock-sz
07:48:31   45/986     0  973/4508    0  357/357     0    0/0


07:48:30   msg/s  sema/s
07:48:31    0.00    0.00

Average     0.00    0.00

07:48:30  atch/s  pgin/s ppgin/s  pflt/s  vflt/s slock/s
07:48:31    0.00    0.00    0.00  505.26 1036.84    0.00

Average     0.00    0.00    0.00  505.26 1036.84    0.00

07:48:30  pgout/s ppgout/s pgfree/s pgscan/s %ufs_ipf
07:48:31     0.00     0.00     0.00     0.00     0.00

Average      0.00     0.00     0.00     0.00     0.00

07:48:30 freemem freeswap
07:48:31   15084  1224421

Average    15084  1224421

07:48:30 sml_mem   alloc  fail  lg_mem   alloc  fail  ovsz_alloc  fail
07:48:31 2617344 1874368     0 17190912 10945416     0     3067904     0

Average   186953  133883     0 1227922  781815     0      219136     0

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.68.49