I am working on a system monitoring project and am wondering how to get just the Device, r/s, and w/s columns returned when running iostat -x. Im sure Id have to use cut some how but my attempt at getting the 4th column (r/s) here: iostat -x | cut -f 4 is incorrect
Asked
Active
Viewed 112 times
1 Answers
1
Try this:
iostat -x | awk '{print $4}'
or
iostat -x | sed '1,/Device:/d' | awk '{print $4}'

Cyrus
- 84,225
- 14
- 89
- 153