ダウンロード
$ cd /usr/local/bin
$ curl -L -o pcstat https://github.com/tobert/pcstat/raw/2014-05-02-01/pcstat.x86_64
$ chmod 755 pcstat
使ってみる
$ dd if=/dev/urandom of=testfile bs=1M count=10
10+0 records in
10+0 records out
10485760 bytes (10 MB) copied, 1.09541 s, 9.6 MB/s
$ pcstat testfile
|----------+----------------+------------+-----------+---------|
| Name | Size | Pages | Cached | Percent |
|----------+----------------+------------+-----------+---------|
| testfile | 10485760 | 2560 | 2560 | 100.000 |
|----------+----------------+------------+-----------+---------|
$ echo 1 |sudo tee /proc/sys/vm/drop_caches
1
$ pcstat testfile
|----------+----------------+------------+-----------+---------|
| Name | Size | Pages | Cached | Percent |
|----------+----------------+------------+-----------+---------|
| testfile | 10485760 | 2560 | 0 | 000.000 |
|----------+----------------+------------+-----------+---------|