/proc/loadavg for seeing if the CPU is the bottleneck
Another way for looking at CPU usage is to take a look at /proc/loadvg. This file provides a look at the load average in regard to both the CPU and IO over time, as well as additional data used by uptime and other commands. A sample /proc/loadavg file looks similar to the following:
[root@soaserver ~]# cd /proc
[root@soaserver proc]# cat loadavg
0.00 0.00 0.00 1/146 21886
The format is as follows:
avg1 avg2 avg3 running_threads/total_threads last_running_pid
Values of /proc/loadavg
- avg1, avg2, avg3. These are number of threads in running state, averaged over the last minute, last 5 minutes, and last 15 minutes, respectively.
- running_threads. Number of threads currently in state "running".
- total_threads. Total number of threads currently existing in the system.
- last_running_pid. PID of the last process observed in state "running".