Que tal algo como isto:
- inicie
vmstat
com sua saída direcionada para um arquivo de log e use o background&
- [opcional]
sleep
por alguns segundos (para obter uma linha de base)&&
[quandosleep
sai] - inicie
stress
por exemplo,
vmstat 1 20 > vmstat.log & sleep 5 && stress --cpu 8 --io 4 --vm 2 --vm-bytes 128M --timeout 10s
neste caso, dando
$ cat vmstat.log
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 0 780804 70184 855824 0 0 221 52 187 512 7 2 90 0 0
0 0 0 780804 70184 855824 0 0 0 0 110 312 2 0 98 0 0
0 0 0 780752 70184 855824 0 0 0 0 80 220 0 1 100 0 0
0 0 0 780752 70192 855824 0 0 0 28 103 222 3 0 97 1 0
0 0 0 780752 70192 855824 0 0 0 0 115 298 2 0 98 0 0
2 0 0 780176 70192 855824 0 0 0 0 93 250 0 1 99 0 0
12 0 0 657848 70200 855824 0 0 0 2144 986 2014 60 40 1 0 0
14 0 0 657608 70208 855824 0 0 0 20 1418 2194 61 40 0 0 0
15 0 0 686376 70216 855824 0 0 0 20 1465 3681 58 42 0 0 0
14 0 0 598072 70228 855824 0 0 0 24 1503 3507 59 41 0 0 0
16 0 0 632880 70252 855812 0 0 0 96 1514 3235 63 38 0 0 0
14 0 0 656944 70280 856112 0 0 0 416 1465 2710 64 37 0 0 0
15 0 0 722508 70428 855764 0 0 0 2012 1184 2991 74 27 0 0 0
14 1 0 673924 70456 855768 0 0 0 140 1003 2344 65 35 0 0 0
14 0 0 565940 70464 855776 0 0 0 20 850 1953 60 40 0 0 0
3 0 0 778332 70492 855760 0 0 0 140 906 1987 60 41 0 0 0
0 0 0 782516 70500 855752 0 0 0 16 126 342 1 0 99 1 0
0 0 0 782584 70500 855776 0 0 0 0 96 210 0 1 100 0 0
1 0 0 788496 70500 855776 0 0 0 0 204 430 10 0 90 0 0
0 0 0 788664 70500 855776 0 0 0 0 906 2988 16 2 82 0 0