* PC not updating counters
@ 1995-09-27 23:20 Steve
0 siblings, 0 replies; only message in thread
From: Steve @ 1995-09-27 23:20 UTC (permalink / raw)
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}' </dev/swap
v=`{cat </dev/sysstat}
for (i in 2 3 4 5 6 7) {
echo $v($i) $l($i) $interval | awk '{ printf " %3d", ($1-$2)/$3 }'
}
echo $v(8) | awk '{printf " %.2f\n", $1/1000 }'
l=$v
n=`{echo $n | awk '{print $1+1}' }
if (test $n -ne $count)
sleep $interval
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1995-09-27 23:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-09-27 23:20 PC not updating counters Steve
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).