While developing stress-ng I wanted to be able to see if the various memory stressors were touching memory in the way I had anticipated. While digging around in the Linux documentation I discovered the very useful soft/dirty bit on Page Table Entries (PTEs) that get set when a page is written to. The mechanism to check for the soft/dirty bit is described in Documentation/vm/soft-dirty.txt; one n
![pagemon: an ncurses based tool to monitor process memory](https://cdn-ak-scissors.b.st-hatena.com/image/square/6f0879461fd02cf48f6a8ce0a6bb4dd3e2114c01/height=288;version=1;width=512/http%3A%2F%2F3.bp.blogspot.com%2F-H4_SqFj6PyI%2FVoLtxMTI86I%2FAAAAAAAAHas%2FNIGPFJ8n_GA%2Fw1200-h630-p-k-no-nu%2Fpagemon-pageview.png)