Skip to content

Instantly share code, notes, and snippets.

@alex2006hw
Created October 8, 2014 22:34
Show Gist options
  • Save alex2006hw/6fbee6f6bc23485fb53c to your computer and use it in GitHub Desktop.
Save alex2006hw/6fbee6f6bc23485fb53c to your computer and use it in GitHub Desktop.
how to read /proc/diskstats
```
wget http://aspersa.googlecode.com/svn/trunk/rel
wget http://aspersa.googlecode.com/svn/trunk/align
chmod +x rel align
while sleep 1; do grep sdb1 /proc/diskstats; done > stats
```
# CTRL-C after a while
```
echo m m dev reads rd_mrg rd_sectors ms_reading \
writes wr_mrg wr_sectors ms_writing cur_ios \
ms_doing_io ms_weighted | cat - stats | ./rel | ./align
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment