bsnmpd hrProcessorLoad results incorrect on FreeBSD 7 or 8?

Previous thread: [head tinderbox] failure on i386/pc98 by FreeBSD Tinderbox on Tuesday, May 6, 2008 - 8:54 pm. (1 message)

Next thread: [head tinderbox] failure on ia64/ia64 by FreeBSD Tinderbox on Tuesday, May 6, 2008 - 9:24 pm. (1 message)
To: <freebsd-current@...>
Date: Tuesday, May 6, 2008 - 8:55 pm

Is anyone seeing problems with bsnmpd reporting an incorrect
HOST-RESOURCES-MIB::hrProcessorLoad value under HEAD? I'm using the
default /etc/snmpd.config settings and am loading the
/usr/lib/snmp_hostres.so library just as I do in 6.3, but the value for
this MIB always reports CPU utilization at 100% regardless of the actual
load on the system. 6.3 and 6-STABLE both work correctly and report the
actual CPU utilization when queried.

I tested this on my 7-STABLE build system and see the same anomaly as I
do with HEAD. I last csuped CURRENT on 4/29 15:00 GMT. I'm thinking I'm
doing something wrong but wanted to see if anyone else was experiencing
this.

Thanks,
Proto
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"

To: Michael Proto <mike@...>, <freebsd-current@...>
Date: Tuesday, May 6, 2008 - 9:48 pm

IIRC, I noticed this when I changed to ULE from 4BSD_SCHED.

---Mike

_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"

To: Mike Tancsa <mike@...>
Cc: <freebsd-current@...>
Date: Tuesday, May 6, 2008 - 11:27 pm

Would match my environment as well, as I'm using ULE on all of the
affected systems. Just built a 4BSD kernel on my HEAD system and
HOST-RESOURCES-MIB::hrProcessorLoad reports a correct value again.

Anyone have an idea on a fix?

Thanks,
Proto
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"

To: Michael Proto <mike@...>
Cc: <freebsd-current@...>, Mike Tancsa <mike@...>
Date: Wednesday, May 7, 2008 - 2:51 am

On Tue, 6 May 2008, Michael Proto wrote:

MP>Mike Tancsa wrote:
MP>> At 08:55 PM 5/6/2008, Michael Proto wrote:
MP>> > Is anyone seeing problems with bsnmpd reporting an incorrect
MP>> > HOST-RESOURCES-MIB::hrProcessorLoad value under HEAD? I'm using the
MP>> > default /etc/snmpd.config settings and am loading the
MP>> > /usr/lib/snmp_hostres.so library just as I do in 6.3, but the value for
MP>> > this MIB always reports CPU utilization at 100% regardless of the actual
MP>> > load on the system. 6.3 and 6-STABLE both work correctly and report the
MP>> > actual CPU utilization when queried.
MP>>
MP>> IIRC, I noticed this when I changed to ULE from 4BSD_SCHED.
MP>>
MP>> ---Mike
MP>> _______________________________________________
MP>> freebsd-current@freebsd.org mailing list
MP>> http://lists.freebsd.org/mailman/listinfo/freebsd-current
MP>> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
MP>
MP>Would match my environment as well, as I'm using ULE on all of the
MP>affected systems. Just built a 4BSD kernel on my HEAD system and
MP>HOST-RESOURCES-MIB::hrProcessorLoad reports a correct value again.
MP>
MP>Anyone have an idea on a fix?

If anybody has a fix that works with both schedulers, I happily commit
this.

harti
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"

To: <freebsd-current@...>
Date: Wednesday, May 7, 2008 - 6:32 am

Here you are :)

--- hostres_processor_tbl.c.old 2008-05-07 17:23:47.000000000 +0700
+++ hostres_processor_tbl.c 2008-05-07 17:23:54.000000000 +0700
@@ -120,7 +120,7 @@ static double
processor_getpcpu(struct kinfo_proc *ki_p)
{

- if (ccpu == 0 || fscale == 0)
+ if (fscale == 0)
return (0.0);

#define fxtofl(fixpt) ((double)(fixpt) / fscale)

--
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"

To: Stanislav A Svirid <s.svirid@...>
Cc: <freebsd-current@...>
Date: Monday, May 19, 2008 - 8:55 pm

This worked (sorta). On my PCEngines ALIX platform CPU utilization on
HEAD dropped down to 0-2% from a constant 100%. It looks slightly
incorrect though, as there is 3-4% interrupt load at all times on that
system (as per top and vmstat). Still a much better representation than
before though.

So is this fix facetious and I'm not seeing it due to my lack of C prowess?

Thanks,
Proto
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"

To: <freebsd-current@...>
Date: Tuesday, May 20, 2008 - 10:11 pm

This patch just fix "Stolen from /usr/src/bin/ps/print.c" :)
In ULE ccpu is 0.

--
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"

To: Michael Proto <mike@...>
Cc: Jeff Roberson <jeff@...>, <freebsd-current@...>, Stanislav A Svirid <s.svirid@...>
Date: Tuesday, May 20, 2008 - 2:44 pm

On Mon, 19 May 2008, Michael Proto wrote:

there are further problems. I talked with Jeffr about this and
forwarded him the details.

As we all have been in transit the last days/... give him a few more
days.

/bz

--
Bjoern A. Zeeb Stop bit received. Insert coin for new game.
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"

To: Harti Brandt <harti@...>
Cc: Michael Proto <mike@...>, Shteryana Shopova <syrinx@...>, <freebsd-current@...>, Mike Tancsa <mike@...>
Date: Wednesday, May 7, 2008 - 10:25 am

The problem as dwhite told syrinx and I found out it that ccpu is 0
for ULE and there is a return 0.0 for that case.

The problem is that after removing that patch I see "something".

Pinning my a.out to the 2nd of my 2 single core opterons, top reports
CPU 1 100% a.out but snmp says 0 even if I leave that runnign for a
few minutes.

I am not sure if hostres is doing it all correct, nor am I sure
sched_ule.c/kern_proc.c are right. This needs more investigation.
Either syrinx or I will have a look. Worst I'll try to catch Jeff.

/bz

--
Bjoern A. Zeeb Stop bit received. Insert coin for new game.
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"

Previous thread: [head tinderbox] failure on i386/pc98 by FreeBSD Tinderbox on Tuesday, May 6, 2008 - 8:54 pm. (1 message)

Next thread: [head tinderbox] failure on ia64/ia64 by FreeBSD Tinderbox on Tuesday, May 6, 2008 - 9:24 pm. (1 message)