| 默认情况下,time 命令只输出 real,usr,sys 三个内容,如果我们想要个性化一些,算定义它的输出格式,time 命令也是支持的。time  命令支持的格式有很多,如下所示: C - Name and command line arguments used D - Average size of the process's unshared data area in kilobytes E - Elapsed time in a clock format F - Number of page faults I - Number of file system inputs by the process K - Average total memory use of the process in kilobytes M - Maximum resident set the size of the process during the lifetime in Kilobytes O - Number of file system outputs by the process P - Percentage of CPU that the job received R - Number of minor or recoverable page faults S - Total number of CPU seconds used by the system in kernel mode U - Total number of CPU seconds used by user mode W - Number of times the process was swapped out of main memory X - Average amount of shared text in the process Z - System's page size in kilobytes c - Number of times the process was context-switched e - Elapsed real time used by the process in seconds k - Number of signals delivered to the process p - Average unshared stack size of the process in kilobytes r - Number of socket messages received by the process s - Number of socket messages sent by the process t - Average resident set size of the process in kilobytes w - Number of time the process was context-switched voluntarily x - Exit status of the command 
 如果我们想要输出以下这样的格式: Elapsed Time = 0:01:00, Inputs 2, Outputs 1 
 (编辑:源码网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |