loadavg utility
General form:
loadavg [-a] delay samples
The loadavg utility displays a number of samples of the system load. It is similar to the Unix sar command and shows a subset of the information that is displayed by the Connection Manager's Current system load page.
Metrics that are displayed include:-
- User :- Percentage of CPU time spent executing user code.
- Sys :- Percentage of CPU time spent executing system calls.
- Wait :- Percentage of CPU time spent waiting for disk I/O.
- Idle :- Percentage of CPU time spent doing nothing.
- RunQ :- Real-time processor run queue.
- WaitQ :- Number of processes waiting on disk I/O.
- Phys Mem :- Amount of RAM installed in the system.
- Used Mem :- Amount of memory used by running processes.
- Free Mem :- Amount of memory available to execute processes, this does not include memory used for the operating system's file cache.
- Mem usage :- Percentage of memory used.
Some metrics are not available on all operating systems.
On Unix systems the process run queue for the last 1, 5 & 15 minutes will be shown.
Example: Show 5 samples taken 2 seconds apart:
$ loadavg 2 5
CentOS release 5.9 (Final) Linux 2.6.18-348.12.1.el5 (myserver.domain.com) 4 CPU
Time User Sys Wait Idle RunQ WaitQ Phys Mem Used Mem Free Mem Mem usage
15:26:17 0.13% 0.00% 0.00% 99.87% 1.00 0.00 7982Mb 3233Mb 4749Mb 40.50%
15:26:19 2.24% 2.61% 12.81% 82.34% 1.00 0.50 7982Mb 3240Mb 4742Mb 40.59%
15:26:21 5.38% 3.00% 16.62% 75.00% 2.00 0.50 7982Mb 3248Mb 4734Mb 40.69%
15:26:23 65.55% 23.13% 2.36% 8.96% 5.50 0.00 7982Mb 3405Mb 4577Mb 42.66%
15:26:25 37.37% 61.24% 0.00% 1.39% 9.00 0.00 7982Mb 3505Mb 4477Mb 43.91%
Average: User Sys Wait Idle RunQ WaitQ Phys Mem Used Mem Free Mem Mem usage
22.14% 17.91% 6.38% 53.57% 3.70 0.20 7982Mb 3327Mb 4655Mb 41.68%
Run queue lengths:
1 min = 1.180000
5 min = 0.300000
15 min = 0.090000
An optional -a flag can be used to display all available statistics. In addition to the above, these include:-
- Read :- Rate at which data is being read from disk.
- Write :- Rate at which data is being written to disk.
- Recv :- Amount of network traffic read since the start of the sample.
- RxRate :- Rate at which network traffic is being read.
- Trans :- Amount of network traffic sent since the start of the sample.
- TxRate :- Rate at which network traffic is being written.
- Swap :- Size of the swap file.
- SwUsed :- Amount of memory that has been paged out to the swap file.
- SwFree :- Amount of space left in the swap file.
- Swap usage :- Percentage of swap file in use.