Tuesday, May 3, 2011

Monitoring uninterruptible system calls.

Here comes a "keep it simple and stupid" one-line script to watch for any process that could have trouble beeing blocked by an uninterruptible system call.

#$ while true; do ps -e fo stat,cmd | grep ^D && echo "-------"; sleep 0.1 ; done

D< \_ [scsi_eh_0]
D \_ hald-addon-storage: polling /dev/sr0 (every 2 sec)
-------
D \_ hald-addon-storage: polling /dev/sr0 (every 2 sec)
-------
D< \_ [md0_raid1]
D< \_ [kjournald]
-------
D< \_ [md0_raid1]
-------
D< \_ [md0_raid1]
-------
D< \_ [md0_raid1]
-------
D< \_ [md0_raid1]
-------
D< \_ [md0_raid1]
Ds /sbin/syslogd
-------
D< \_ [md0_raid1]


The output in this case is normal. [md0_raid1],kjournald and syslogd are making frequent disk writes.

1 comment:

darren sammy said...

A debt of gratitude is in order for this article exceptionally supportive. much obliged. aderezo vegano