timex
rose1 发表于 2020-07-19 05:32浏览次数:
在Solaris操作系统上,timex命令对命令进行计时并报告过程数据和系统活动。
On the Solaris operating system, the timex command times a command and reports process data and system activity.
目录:
1 timex 运行系统环境
2 timex 语法
3 timex 例子
timex 运行系统环境
timex 语法
timex [-o] [-p [-f] [-h] [-k] [-m] [-r] [-t]] [-s] command
选件
-o
|
报告命令及其所有子级读取或写入的块总数以及传输的字符总数。仅当安装了过程记帐软件时,此选项才有效。
|
-p
|
列出命令及其所有子级的进程记帐记录。仅当安装了过程记帐软件时,此选项才有效。子选项f,h,k,m,r和t修改报告的数据项。选项如下:
-f
|
在输出中打印fork / exec标志和系统出口状态列。
|
-h
|
而不是平均内存大小,请显示进程在执行过程中消耗的总可用CPU时间的一部分。该“占用因子”计算为(总CPU时间)/(经过的时间)。
|
-k
|
显示总的内核分钟数,而不是内存大小。
|
-m
|
显示平均磁芯尺寸(默认)。
|
-r
|
显示CPU系数(用户时间/(系统时间+用户时间))。
|
-t
|
显示单独的系统和用户CPU时间。始终报告读取或写入的块数以及传输的字符数。
|
|
-s
|
报告在命令执行间隔期间发生的系统总活动(而不仅仅是由于command引起的活动)。报告sar中列出的所有数据项。
|
要执行的命令的名称
|
|
timex [-o] [-p [-f] [-h] [-k] [-m] [-r] [-t]] [-s] command
Options
-o
|
Report the total number of blocks read or written and total characters transferred by command and all its children. This option works only if the process accounting software is installed.
|
-p
|
List process accounting records for command and all its children. This option works only if the process accounting software is installed. Sub options f, h, k, m, r, and t modify the data items reported. The options are as follows:
-f
|
Print the fork/exec flag and system exit status columns in the output.
|
-h
|
Instead of mean memory size, show the fraction of total available CPU time consumed by the process during its execution. This "hog factor" is computed as (total CPU time)/(elapsed time).
|
-k
|
Instead of memory size, show total kcore-minutes.
|
-m
|
Show mean core size (the default).
|
-r
|
Show CPU factor (user time/(system-time + user-time)).
|
-t
|
Show separate system and user CPU times. The number of blocks read or written and the number of characters transferred are always reported.
|
|
-s
|
Report total system activity (not just that due to command ) that occurred during the execution interval of command. All the data items listed in sar are reported.
|
command
|
Name of the command to execute
|
timex 例子
timex -ops sleep 60
睡眠 60秒钟,并报告系统实际“睡眠”了多长时间。
timex -ops sleep 60
sleep for 60 seconds, and reports how long the system actually "slept".