top - See resource usage
The top command provides a dynamic, real-time view of a running system
and shows resource usage on a thread level. It can show, for example, CPU usage and detailed memory
usage.
Syntax
See the top man page for the complete syntax and all options.Parameters
- -b
- Writes the output for each interval into a file.
- -d
- Specifies the delay time interval in seconds.
- -n
- Indicates that the maximum number of iterations top should produce before it ends.
- -p
- Limits the output to the specified processes.
Example
To collect 180 measurements with a one second frequency into a file, issue:
[root@system]# top -b -d 1 -n 180 >top.log 2>&1