Use o próximo script para visualização - quem lê / executa no disco:
#!/bin/sh
dmesg -c >/dev/null 2>&1
echo 1 > /proc/sys/vm/block_dump
# Timeout
sleep 60
# Disable block dumping
echo 0 > /proc/sys/vm/block_dump
# Header
printf "%10s %15s %10s %10s %10s\n" CONUT COMMAND PID ACTION DEVICE
# Hide the eyes child! It gets ugly from here on
IFS="
"
for line in $(dmesg | awk '{if ( $3 ~ "READ" || $3 ~ "WRITE" ) { print $2 " " $3 " " $7}}'| sort |uniq -c |sort -nr );
do
num=$(echo $line | awk '{print $1}')
command=$(echo $line | awk '{ print $2 }' | sed -re 's/\([[:digit:]]+\)://')
pid=$(echo $line| awk -F'[()]' '{ print $2 }')
action=$(echo $line | awk '{ print $3 }')
device=$(echo $line | awk '{ print $4 }')
printf "%10s %15s %10s %10s %10s\n" "$num" "$command" "$pid" "$action" "$device"
done
# EOF
Nota: Dependendo do sistema operacional e da saída dmesg, você pode ter que alterar os campos na linha "para entrada de linha" "