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-12-28] | [Open System-Linux] |
Shift command with examples |
[2017-01-21] | [Open System-Linux] |
Useful tips and tricks while working in Linux. |
[2014-03-17] | [Open System-Linux] |
AWK command for scanning and analysing a large file in Linux |
[2014-10-12] | [Open System-Linux] |
GETENT command in linux to get entries from administrative database |
[2014-04-22] | [Open System-Linux] |
xmllint : a command line xml tool to view and find errors in XML file |
Total comments: 0 | |