Tuesday 7 March 2017

Using "sar" to check the CPU utilization, even historical data


For example, to get the CPU for day #6 of the month, only top 30 CPU entries:

>sar -f /var/log/sa/sa06|awk -F" " '{print $4}'|sort -n|tail -30



15.84
19.12
19.64
22.70
23.79
24.06
31.20
32.69
35.55
36.79
37.41
39.59
40.39
43.41
44.62
45.28
46.34
47.20
47.63
60.93
63.28
64.77
64.80
65.31
67.07
67.64
68.44
69.44
69.67

71.79