I am writing a shell script to check the vmstat si
and so
data at various time intervals
vmstat 1
sample output:
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
0 0 45820 899252 86700 468520 0 0 0 60 127 5821 20 7 34 0
0 0 45820 899252 86704 468504 0 0 0 32 44 104 0 0 100 0
I want to use awk, sed to extract si
and so
into different variables for further usage. I Am new to awk, sed and am still struggling to find my way through. Can you show me how I can do this ?