Linux Filemon

It is possible to achieve similar functionality to filemon with a linux 2.6.1 or newer kernel.
what you need to do is the following:
1. Make sure that syslog doesn’t log kern.debug to a file(check /etc/syslog.conf). if it does, disable it temporarily (better), or stop syslog altogether (worse, because you will eliminate one possible cause of the disk activity)
2. type:
echo 1 > /proc/sys/vm/block_dump
3. in bash, type (modify to fit your favourite shell):
while true; do dmesg -c; sleep 1; done;

This effectively gives you a realtime live view of all disk activity
note that if you didn’t dmesg -c since you booted, dmesg might contain a lot of info in the buffer, so let it barf everything onto the screen before attempting to actually read it.

remember to restore things back to the way they were when you are done:
1. echo 0 > /proc/sys/vm/block_dump
2. restore syslog activity and/or kern.debug logging


Author: Thomas Faddegon

Do you like my posts and want to do something back? You can buy me a beer :)