1:27 AM Time command in Linux to give resource usage |
TIME a simple command to give resource usage in Linux system FORMAT DESCRIPTION These statistics consist of real time and CPU time
The CPU time is divided into user time and system time User time :- time used by the program itself and any library subroutines it calls
Example:
In above example the "ll" command was executed and its time statistics is displayed. GNU Options -p, --portability real %e
Descriptions are as given below: %E Elapsed real time (in [hours:]minutes:seconds). %e (Not in tcsh.) Elapsed real time (in seconds). %S Total number of CPU-seconds that the process spent in kernel mode. %U Total number of CPU-seconds that the process spent in user mode. %P Percentage of the CPU that this job got, computed as (%U + %S) / %E. -o FILE, --output=FILE -a, --append
The TIME command is also used for resources like memory, I/O and IPC calls (where available). The output is formatted using a format string that can be specified using the -f option or the TIME environment variable.
Note: some shells (e.g., bash(1)) have a built-in time command that provides less functionality than the command described here. To access the real command, you may need to specify its pathname (something like /usr/bin/time). You may also like to see: |
|
Related blogs
You may also like to see:
[2014-03-12] | [Open System-Linux] |
uptime command in Linux |
[2014-11-25] | [Open System-Linux] |
DMESG command in Linux : to display or control kernel ring buffer |
[2014-09-21] | [Open System-Linux] |
How to define command prompt strings in Linux : what are $PS1, $PS2, $PS3 and $PS4? |
[2014-10-25] | [Open System-Linux] |
XMLWF command in Linux to check/validate/parse an XML file |
[2017-08-13] | [Open System-Linux] |
Perl trick to remove Ctrl - M charater from a file |
Total comments: 0 | |