From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 27 Sep 1995 19:20:20 -0400 From: Steve Hemminger sch@postman.ncube.com Subject: PC not updating counters Topicbox-Message-UUID: 28ac6b58-eac8-11e9-9e20-41e7f4b1d025 Message-ID: <19950927232020.skezXV39eHIAfX42EsjJDAUXyvfXQCWTVclEy_7ASsY@z> The PC port is not updating the counters for syscalls and interrupts: /sys/src/9/pc/trap.c 242a243 > ++m->intr; 426a428 > m->syscall++; M cJ Here is a short script to dump stats (a.l.a vmstat) #!/bin/rc switch ($#*) { case 0 count=1 interval=1 case 1 count=-1 interval=$1 case 2 count=$2 interval=$1 case * echo "Usage: $0 [ interval [count]]" exit usage } echo 'procs memory swap' echo 'r b w used/avail used/avail csw int sys pg tlb pur ld' n=0 l=(0 0 0 0 0 0 0 0) while (test $n -ne $count) { ps | awk ' $6 == "Syscall" { ++r } $6 == "Ready" { ++r } $6 == "Scheding" { ++r } $6 == "Running" { ++r } $6 == "Queueing" { ++b } $6 == "Fault" { ++w } $6 == "Pageout" { ++w } END { printf "%d %d %d", r, b, w}' awk '{printf " %10s %10s", $1, $3}'