head 1.5; access; symbols pkgsrc-2013Q2:1.4.0.34 pkgsrc-2013Q2-base:1.4 pkgsrc-2013Q1:1.4.0.32 pkgsrc-2013Q1-base:1.4 pkgsrc-2012Q4:1.4.0.30 pkgsrc-2012Q4-base:1.4 pkgsrc-2012Q3:1.4.0.28 pkgsrc-2012Q3-base:1.4 pkgsrc-2012Q2:1.4.0.26 pkgsrc-2012Q2-base:1.4 pkgsrc-2012Q1:1.4.0.24 pkgsrc-2012Q1-base:1.4 pkgsrc-2011Q4:1.4.0.22 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q3:1.4.0.20 pkgsrc-2011Q3-base:1.4 pkgsrc-2011Q2:1.4.0.18 pkgsrc-2011Q2-base:1.4 pkgsrc-2011Q1:1.4.0.16 pkgsrc-2011Q1-base:1.4 pkgsrc-2010Q4:1.4.0.14 pkgsrc-2010Q4-base:1.4 pkgsrc-2010Q3:1.4.0.12 pkgsrc-2010Q3-base:1.4 pkgsrc-2010Q2:1.4.0.10 pkgsrc-2010Q2-base:1.4 pkgsrc-2010Q1:1.4.0.8 pkgsrc-2010Q1-base:1.4 pkgsrc-2009Q4:1.4.0.6 pkgsrc-2009Q4-base:1.4 pkgsrc-2009Q3:1.4.0.4 pkgsrc-2009Q3-base:1.4 pkgsrc-2009Q2:1.4.0.2 pkgsrc-2009Q2-base:1.4 pkgsrc-2009Q1:1.3.0.28 pkgsrc-2009Q1-base:1.3 pkgsrc-2008Q4:1.3.0.26 pkgsrc-2008Q4-base:1.3 pkgsrc-2008Q3:1.3.0.24 pkgsrc-2008Q3-base:1.3 cube-native-xorg:1.3.0.22 cube-native-xorg-base:1.3 pkgsrc-2008Q2:1.3.0.20 pkgsrc-2008Q2-base:1.3 cwrapper:1.3.0.18 pkgsrc-2008Q1:1.3.0.16 pkgsrc-2008Q1-base:1.3 pkgsrc-2007Q4:1.3.0.14 pkgsrc-2007Q4-base:1.3 pkgsrc-2007Q3:1.3.0.12 pkgsrc-2007Q3-base:1.3 pkgsrc-2007Q2:1.3.0.10 pkgsrc-2007Q2-base:1.3 pkgsrc-2007Q1:1.3.0.8 pkgsrc-2007Q1-base:1.3 pkgsrc-2006Q4:1.3.0.6 pkgsrc-2006Q4-base:1.3 pkgsrc-2006Q3:1.3.0.4 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.3.0.2 pkgsrc-2006Q2-base:1.3 pkgsrc-2006Q1:1.2.0.14 pkgsrc-2006Q1-base:1.2 pkgsrc-2005Q4:1.2.0.12 pkgsrc-2005Q4-base:1.2 pkgsrc-2005Q3:1.2.0.10 pkgsrc-2005Q3-base:1.2 pkgsrc-2005Q2:1.2.0.8 pkgsrc-2005Q2-base:1.2 pkgsrc-2005Q1:1.2.0.6 pkgsrc-2005Q1-base:1.2 pkgsrc-2004Q4:1.2.0.4 pkgsrc-2004Q4-base:1.2 pkgsrc-2004Q3:1.2.0.2 pkgsrc-2004Q3-base:1.2 pkgsrc-2004Q2:1.1.1.1.0.2 pkgsrc-2004Q2-base:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.5 date 2013.09.13.10.13.21; author sno; state dead; branches; next 1.4; commitid 75Gae4gGo0zalg5x; 1.4 date 2009.05.16.11.46.09; author obache; state Exp; branches; next 1.3; 1.3 date 2006.06.12.16.30.33; author joerg; state Exp; branches; next 1.2; 1.2 date 2004.08.25.23.24.12; author wiz; state dead; branches; next 1.1; 1.1 date 2004.05.20.20.48.58; author xtraeme; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2004.05.20.20.48.58; author xtraeme; state Exp; branches; next ; desc @@ 1.5 log @Updating libstatgrab from 0.17nb2 to 0.90 pkgsrc changes: * libstatgrab has gnu-lgpl-2, only statgrab and saidard are gpl * add dependency to log4cplus for have tracing ability Upstream changes (0.90 follows 0.17 immediately): libstatgrab 0.90 * Please note the API in 0.90 has changed, so applications using libstatgrab will need to be updated to support the changes. * Thread safety and reentrant functions. * API unification (every stats call is now able to return multiple entries). * Complete rewrite of internal memory management (eases future extensions). * Add experimental support for tracing using log4cplus. * Complete the ports for AIX, HP-UX and most of the widely used BSD-based operating systems. * Complete the port for Darwin/MacOS X including basic Mach. * Clean up the FreeBSD and Solaris implementations. * Remove explicit support for Linux 2.4. @ text @$NetBSD: patch-ab,v 1.4 2009/05/16 11:46:09 obache Exp $ --- src/libstatgrab/cpu_stats.c.orig 2006-10-09 13:52:06.000000000 +0000 +++ src/libstatgrab/cpu_stats.c @@@@ -35,7 +35,10 @@@@ #if defined(LINUX) || defined(CYGWIN) #include #endif -#if defined(FREEBSD) || defined(DFBSD) +#if defined(DFBSD) +#include +#include +#elif defined(FREEBSD) #include #include #endif @@@@ -83,6 +86,8 @@@@ sg_cpu_stats *sg_get_cpu_stats(){ #endif #ifdef NETBSD u_int64_t cp_time[CPUSTATES]; +#elif defined(DFBSD) + struct kinfo_cputime cp_time; #else long cp_time[CPUSTATES]; #endif @@@@ -156,7 +161,12 @@@@ sg_cpu_stats *sg_get_cpu_stats(){ cpu_now.total=cpu_now.user+cpu_now.nice+cpu_now.kernel+cpu_now.idle; #endif #ifdef ALLBSD -#if defined(FREEBSD) || defined(DFBSD) +#if defined(DFBSD) + if (kinfo_get_sched_cputime(&cp_time)) { + sg_set_error_with_errno(SG_ERROR_SYSCTLBYNAME, "kern.cp_time"); + return NULL; + } +#elif defined(FREEBSD) size = sizeof cp_time; if (sysctlbyname("kern.cp_time", &cp_time, &size, NULL, 0) < 0){ sg_set_error_with_errno(SG_ERROR_SYSCTLBYNAME, "kern.cp_time"); @@@@ -182,12 +192,21 @@@@ sg_cpu_stats *sg_get_cpu_stats(){ } #endif +#ifdef DFBSD + cpu_now.user=cp_time.cp_user; + cpu_now.nice=cp_time.cp_nice; + cpu_now.kernel=cp_time.cp_sys + cp_time.cp_intr; + cpu_now.idle=cp_time.cp_idle; + + cpu_now.total=cpu_now.user+cpu_now.nice+cpu_now.kernel+cpu_now.idle; +#else cpu_now.user=cp_time[CP_USER]; cpu_now.nice=cp_time[CP_NICE]; cpu_now.kernel=cp_time[CP_SYS]; cpu_now.idle=cp_time[CP_IDLE]; cpu_now.total=cpu_now.user+cpu_now.nice+cpu_now.kernel+cpu_now.idle; +#endif #endif #ifdef WIN32 @ 1.4 log @Update libstatgrab to 0.16. Pkgsrc changes: * try to fix build failure on recent NetBSD, reported in PR 41178. * set LICENSE=gnu-gpl-v2 * marked as DESTDIR ready libstatgrab NEWS: libstatgrab 0.16 (13 March 2008) * Fix saidar build on Solaris with Sun's compiler. * Add support for FreeBSD 8.0. * Fix build on "armel" Debian port. (Thanks to Riku Voipio and Martin Guy) * Fix statgrab-make-mrtg-config on machines with no swap. (Thanks to Tom Carlson) libstatgrab 0.15 (14 July 2007) * Fix breakages in memory stats on OpenBSD that were introduced in the last release. (Thanks to David Love) * Update internal string functions and some related cleanups. (Thanks to David Love) * Fix compile warning on FreeBSD. libstatgrab 0.14 (08 January 2007) * Fix memory stats on OpenBSD. * Add colour support to saidar. (Thanks to Angelina Carlton) * Fix CPU stats on Solaris - swap and iowait were incorrectly reported. * Fix kstat related memory leaks on Solaris. (Thanks to Javier Donaire) * Fix network stats on some unusual Solaris setups. * Fix process time_spent on Linux. (Thanks to Fred Barnes) * Make interface up status check the link status as well. (Thanks to Michelangelo Vassallo) * Fix build on NetBSD 3. (Thanks to Wijnand Wiersma) * Rework curses detection code in the configure script. * Fix bug that caused saidar to crash when the window was rapidly resized. libstatgrab 0.13 (19 March 2006) * Fix build problems with recent linux kernels. * Make saidar truncate disk/inteface/mount names to fit in display. * Add WIN32 support using MINGW (not widely tested). * Fix network interface up/down status on Solaris. * Add extern "C" to header file to make linking with C++ code easier. * Fix statgrab to cope with filesystem paths containing dots. * Make NFS a legal filesystem type on all platforms. * A few minor build fixes. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.3 2006/06/12 16:30:33 joerg Exp $ @ 1.3 log @Sync DragonFly support with reality. @ text @d1 1 a1 1 $NetBSD$ d3 1 a3 1 --- src/libstatgrab/cpu_stats.c.orig 2006-06-12 16:09:20.000000000 +0000 d17 1 a17 1 @@@@ -79,6 +82,8 @@@@ sg_cpu_stats *sg_get_cpu_stats(){ d26 1 a26 1 @@@@ -152,7 +157,12 @@@@ sg_cpu_stats *sg_get_cpu_stats(){ d40 1 a40 1 @@@@ -178,12 +188,21 @@@@ sg_cpu_stats *sg_get_cpu_stats(){ d61 1 a61 1 @ 1.2 log @Update to 0.10.3, provided by the maintainer Tim Bishop in PR 26764: libstatgrab 0.10.3 (24 August 2004) * Add -f flag to statgrab to display floating-point numbers multiplied by an integer. * Add -K, -M and -G flags to statgrab to show byte counts in kibibytes, mebibytes or gibibytes. * Make statgrab-make-mrtg-config use the new flags to scale extremely large or small numbers so that mrtg can handle them. * Make statgrab-make-mrtg-config automatically detect network interface speeds. * Add support for FreeBSD 6.0-CURRENT. libstatgrab 0.10.2 (27 July 2004) * Fix shared library version that when backwards in 0.10.1. libstatgrab 0.10.1 (26 July 2004) * Use DESTDIR correctly when setting permissions at install time. * Fix disk stats to work with OpenBSD 3.5. * Fix disk stats on NetBSD 2.0 (statvfs instead of statfs). * Fix memory leak in process stats on NetBSD 2.0. * Add vxfs (Veritas filesystem) to list of known filesystems on Solaris. * Add more variables to the pkg-config file to suggest suitable ownership and permissions for binaries using libstatgrab. * Make sure statgrab.h can safely be included twice. * Fix statgrab to display network interface names even if they don't have IO stats (like the loopback interface on Solaris). * Add error reporting function that grabs errno. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.1 2004/05/20 20:48:58 xtraeme Exp $ d3 25 a27 3 --- src/libstatgrab/disk_stats.c.bak 2004-05-20 21:17:27.000000000 +0100 +++ src/libstatgrab/disk_stats.c 2004-05-20 21:17:34.000000000 +0100 @@@@ -122,8 +122,12 @@@@ d30 21 a50 3 int nummnt; +#if defined(__NetBSD__) && (__NetBSD_Version__ > 200030000) + struct statvfs *mp; d52 8 a59 1 struct statfs *mp; a60 1 +#endif a61 2 #ifdef ALLBSD nummnt=getmntinfo(&mp , MNT_LOCAL); @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD$ @ 1.1.1.1 log @Initial import of libstatgrab-0.10 from pkgsrc-wip, packaged by the author Tim Bishop. The libstatgrab library provides an easy to use interface for accessing system statistics and information. Available statistics include CPU, Load, Memory, Swap, Disk I/O, and Network I/O. Also part of the package are two tools; saidar provides a curses-based interface to viewing live system statistics, and statgrab is a sysctl-like interface to the statistics. @ text @@