I think the answer is yes, those are suitable commands to query, log the response and parse later. mpstat and every sar related command prints overall stats, like :
sar -u 2 5
Quote:
02:59:51 PM CPU %user %nice %system %iowait %steal %idle
02:59:53 PM all 3.00 0.00 1.50 0.00 0.00 95.50
02:59:55 PM all 2.51 0.00 1.01 0.00 0.00 96.48
02:59:57 PM all 12.87 0.00 2.97 0.00 0.00 84.16
02:59:59 PM all 3.54 0.00 1.52 0.00 0.00 94.95
03:00:01 PM all 3.98 0.00 2.49 0.00 0.00 93.53
Average: all 5.20 0.00 1.90 0.00 0.00 92.90
|