From owner-cvs-src-old@FreeBSD.ORG Thu Oct 28 20:18:39 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B818F10656A3 for ; Thu, 28 Oct 2010 20:18:39 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A4B5D8FC23 for ; Thu, 28 Oct 2010 20:18:39 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id o9SKIdWD006890 for ; Thu, 28 Oct 2010 20:18:39 GMT (envelope-from uqs@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id o9SKIdXM006889 for cvs-src-old@freebsd.org; Thu, 28 Oct 2010 20:18:39 GMT (envelope-from uqs@repoman.freebsd.org) Message-Id: <201010282018.o9SKIdXM006889@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to uqs@repoman.freebsd.org using -f From: Ulrich Spoerlein Date: Thu, 28 Oct 2010 20:18:26 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/usr.sbin/bsnmpd/modules/snmp_hostres hostres_processor_tbl.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Oct 2010 20:18:39 -0000 uqs 2010-10-28 20:18:26 UTC FreeBSD src repository Modified files: usr.sbin/bsnmpd/modules/snmp_hostres hostres_processor_tbl.c Log: SVN rev 214489 on 2010-10-28 20:18:26Z by uqs Fix CPU load reporting independent of scheduler used. - Sample CPU usage data from kern.cp_times, this makes for a far more accurate and scheduler independent algorithm. - Rip out the process list scraping that is no longer required. - Don't update CPU usage sampling on every request, but every 15s instead. This makes it impossible for an attacker to hide the CPU load by triggering 4 samplings in short succession when the system is idle. - After reaching the steady-state, the system will always report the average CPU load of the last 60 sampled seconds. - Untangling of call graph. PR: kern/130222 Tested by: Julian Dunn Gustau Pérez Jürgen Weiß MFC after: 2 weeks I'm unsure if some MIB standard states this must be the load average for, eg. 300s, it looks like net-snmp isn't even bothering to implement the CPU load reporting at all. Revision Changes Path 1.7 +129 -205 src/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_processor_tbl.c