Date: Fri, 10 Aug 2001 22:00:28 -0500 (CDT) From: Jay Nelson <jdn@bga.com> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/29616: ports/net/generic-nqs loaddaemon does not report correct load Message-ID: <20010811030028.B028E20379@localhost>
next in thread | raw e-mail | index | archive | help
>Number: 29616 >Category: ports >Synopsis: ports/net/generic-nqs loaddaemon does not report correct load >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Aug 10 20:10:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Jay Nelson >Release: FreeBSD 4.3-STABLE i386 >Organization: private >Environment: System: FreeBSD localhost 4.3-STABLE FreeBSD 4.3-STABLE #0: Sun Jul 22 10:16:32 CDT 2001 jdn@localhost:/usr/src/sys/compile/ACP i386 >Description: The defines in loaddaemon.c of the generic-nqs port do not select appropriate behavior and defaults to returning a load of 999.99. Consequently, dynamic load balancing will not function properly. >How-To-Repeat: Execute 'qmgr set debug 3' and observe logs. >Fix: --- Source-Tree/loaddaemon/all-systems/loaddaemon.c.orig Thu Aug 2 01:18:37 2001 +++ Source-Tree/loaddaemon/all-systems/loaddaemon.c Fri Aug 3 16:59:53 2001 @@ -539,6 +539,20 @@ } #endif /* HPUX */ #if IS_DECOSF | IS_BSD +#if BSD4_4 +static +void calcloadavg(double load[3]) +{ + double avenrun[3]; + int i; + if (getloadavg(avenrun, sizeof(avenrun) / sizeof(avenrun[0]))) { + printf("getloadavg goofed\n"); + } + for (i = 0; i < 3; i++) { + load[i] = avenrun[i]; + } +} +#else struct nlist nl[] = { #define unixpath "/vmunix" { "_avenrun" }, @@ -570,6 +584,7 @@ for (i = 0; i < 3; i++) load[i] = ((double) avenrun[i]) / (double) 1024.; } +#endif /* BSD4_4 */ #endif /* DECOSF or Sun (BSD43) */ #if IS_SOLARIS >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010811030028.B028E20379>