Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Nov 2004 10:00:53 GMT
From:      Thomas Novin <thnov@xyz.pp.se>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/60385: vmstat/iostat/top all fail to report CPU usage (still in 5.3R)
Message-ID:  <200411191000.iAJA0r4E047051@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/60385; it has been noted by GNATS.

From: Thomas Novin <thnov@xyz.pp.se>
To: Dima Dorfman <dd@freebsd.org>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: bin/60385: vmstat/iostat/top all fail to report CPU usage
  (still in 5.3R)
Date: Fri, 19 Nov 2004 10:56:52 +0100

 At 09:41 2004-11-19, you wrote:
 >Okay, so the timecounter is sane (no surprise there) but statclock
 >isn't firing (no surprise there either). bde just told me about PR
 >17800, which sports the same symptoms and includes a patch. Can you
 >try that? It might be slightly incomplete, but it definitely sounds
 
 /usr/src# patch -p0 < patch
 Hmm...  Looks like a unified diff to me...
 (Patch is indented 1 space.)
 The text leading up to this was:
 --------------------------
 | --- sys/i386/isa/clock.c.old    Thu Nov 18 11:18:59 2004
 | +++ sys/i386/isa/clock.c        Thu Nov 18 11:12:10 2004
 --------------------------
 Patching file sys/i386/isa/clock.c using Plan A...
 Hunk #1 failed at 946.
 1 out of 1 hunks failed--saving rejects to sys/i386/isa/clock.c.rej
 done
 
 Hmm...however I manually edited the file and added 'rtcin(RTC_INTR); /*=20
 clear any pending interrupt */' between 'writertc(RTC_STATUSB,=20
 RTCSB_24HR);' and '/* Don't bother enabling the statistics clock. */'
 
 Rebuilt kernel, rebooted and voila!
 # sysctl kern.clockrate
 kern.clockrate: { hz =3D 100, tick =3D 10000, profhz =3D 1024, stathz =3D=
  128 }
 # sysctl kern.timecounter
 kern.timecounter.stepwarnings: 0
 kern.timecounter.nbinuptime: 787111
 kern.timecounter.nnanouptime: 0
 kern.timecounter.nmicrouptime: 1207
 kern.timecounter.nbintime: 394785
 kern.timecounter.nnanotime: 85
 kern.timecounter.nmicrotime: 394700
 kern.timecounter.ngetbinuptime: 0
 kern.timecounter.ngetnanouptime: 102
 kern.timecounter.ngetmicrouptime: 160555
 kern.timecounter.ngetbintime: 0
 kern.timecounter.ngetnanotime: 0
 kern.timecounter.ngetmicrotime: 15508
 kern.timecounter.nsetclock: 4
 kern.timecounter.hardware: TSC
 kern.timecounter.choice: TSC(800) i8254(0) dummy(-1000000)
 kern.timecounter.tick: 1
 # sysctl vm.loadavg
 vm.loadavg: { 4.27 2.64 1.15 }
 #  while [ 1 ] ; do sysctl kern.cp_time && sleep 5 ; done
 kern.cp_time: 16199 206 4076 395 312
 kern.cp_time: 16766 206 4147 399 312
 kern.cp_time: 17364 206 4185 404 312
 kern.cp_time: 17961 206 4230 404 312
 kern.cp_time: 18514 206 4307 415 312
 
 # vmstat 1
   procs      memory      page                   disk   faults      cpu
   r b w     avm    fre  flt  re  pi  po  fr  sr tw0   in   sy  cs us sy id
   1 0 0  963436 154208 5045   1   2   1 1161   0 2613  734 6931 1447 72 19 =
  9
   0 0 0  963444 154284 2723   0   0   0 273   0  13  603 3355 990 20 11 69
   0 0 0  963640 153924 2792   0   0   0 218   0  15  510 3259 874 22  8 71
   1 0 0  963640 154228  195   0   0  17  84   0 170  759 1336 1220  2 12 87
   0 0 0  964024 153776 5830   0   0   0 641   0  18  524 4363 981 39 12 49
 
 # top
 
 last pid:  1581;  load=20
 averages:  2.34,  2.74,  1.47=20
                    up 0+00:06:08  10:46:57
 140 processes: 2 running, 138 sleeping
 CPU states: 28.6% user,  0.0% nice, 11.8% system,  0.0% interrupt, 59.5%=
  idle
 Mem: 393M Active, 318M Inact, 141M Wired, 111M Buf, 145M Free
 Swap: 1000M Total, 1000M Free
 
 Cool... It's working again! Thanks for the help.
 
 Thomas
 
 
 
 --
 Thomas Novin =B7 thnov@xyz.pp.se =B7 http://xyz.pp.se/~thnov/
 V: +46 (0)431 445400 =B7 F: +46 (0)431 445410 =B7 GSM: +46 (0)730 667425=20
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411191000.iAJA0r4E047051>