system freezes

Xen list at xenhideout.nl
Wed Nov 8 15:06:20 UTC 2017


Xen schreef op 08-11-2017 15:54:

> With a bit of luck I will at least have queue stats when next my system 
> freezes.

Script now also lists all processes in uninterruptable sleep when there 
is any queue item in vmstat :p.

#!/bin/bash

devs="msata-root msata-root_cache_cdata"

declare -A dms

for f in $devs; do
         dms[$f]="dm-$(dmsetup info $f -c -o major,minor --noheadings | 
cut -d: -f2)"
done

grepar=$(echo ${dms[@]} | sed "s/\s/\\\\|/g")

i=0
while true; do
         {
                 [ $(( i % 7)) -eq 0 ] && { date; echo; }
                 a=$(vmstat -d | grep "$grepar")

                 echo "$a"

                 [ "$(echo "$a" | tr -s ' '  | cut -d' ' -f10)" != 0 ] && 
{
                         ps aux | grep " D" | grep -v grep
                         echo
                 }

         } | tee -a /var/log/vmstat.log
         i=$(( i++ ))
         sleep 8s
done






But enough for now.




More information about the ubuntu-users mailing list