head 1.4; access; symbols pkgsrc-2013Q2:1.3.0.24 pkgsrc-2013Q2-base:1.3 pkgsrc-2013Q1:1.3.0.22 pkgsrc-2013Q1-base:1.3 pkgsrc-2012Q4:1.3.0.20 pkgsrc-2012Q4-base:1.3 pkgsrc-2012Q3:1.3.0.18 pkgsrc-2012Q3-base:1.3 pkgsrc-2012Q2:1.3.0.16 pkgsrc-2012Q2-base:1.3 pkgsrc-2012Q1:1.3.0.14 pkgsrc-2012Q1-base:1.3 pkgsrc-2011Q4:1.3.0.12 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q3:1.3.0.10 pkgsrc-2011Q3-base:1.3 pkgsrc-2011Q2:1.3.0.8 pkgsrc-2011Q2-base:1.3 pkgsrc-2011Q1:1.3.0.6 pkgsrc-2011Q1-base:1.3 pkgsrc-2010Q4:1.3.0.4 pkgsrc-2010Q4-base:1.3 pkgsrc-2010Q3:1.3.0.2 pkgsrc-2010Q3-base:1.3 pkgsrc-2010Q2:1.2.0.10 pkgsrc-2010Q2-base:1.2 pkgsrc-2010Q1:1.2.0.8 pkgsrc-2010Q1-base:1.2 pkgsrc-2009Q4:1.2.0.6 pkgsrc-2009Q4-base:1.2 pkgsrc-2009Q3:1.2.0.4 pkgsrc-2009Q3-base:1.2 pkgsrc-2009Q2:1.2.0.2 pkgsrc-2009Q2-base:1.2 pkgsrc-2009Q1:1.1.0.28 pkgsrc-2009Q1-base:1.1 pkgsrc-2008Q4:1.1.0.26 pkgsrc-2008Q4-base:1.1 pkgsrc-2008Q3:1.1.0.24 pkgsrc-2008Q3-base:1.1 cube-native-xorg:1.1.0.22 cube-native-xorg-base:1.1 pkgsrc-2008Q2:1.1.0.20 pkgsrc-2008Q2-base:1.1 cwrapper:1.1.0.18 pkgsrc-2008Q1:1.1.0.16 pkgsrc-2008Q1-base:1.1 pkgsrc-2007Q4:1.1.0.14 pkgsrc-2007Q4-base:1.1 pkgsrc-2007Q3:1.1.0.12 pkgsrc-2007Q3-base:1.1 pkgsrc-2007Q2:1.1.0.10 pkgsrc-2007Q2-base:1.1 pkgsrc-2007Q1:1.1.0.8 pkgsrc-2007Q1-base:1.1 pkgsrc-2006Q4:1.1.0.6 pkgsrc-2006Q4-base:1.1 pkgsrc-2006Q3:1.1.0.4 pkgsrc-2006Q3-base:1.1 pkgsrc-2006Q2:1.1.0.2 pkgsrc-2006Q2-base:1.1; locks; strict; comment @# @; 1.4 date 2013.09.13.10.13.21; author sno; state dead; branches; next 1.3; commitid 75Gae4gGo0zalg5x; 1.3 date 2010.08.24.06.33.11; author sno; state Exp; branches; next 1.2; 1.2 date 2009.05.16.11.46.09; author obache; state Exp; branches; next 1.1; 1.1 date 2006.06.12.16.30.33; author joerg; state Exp; branches; next ; desc @@ 1.4 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-ac,v 1.3 2010/08/24 06:33:11 sno Exp $ --- src/libstatgrab/disk_stats.c.orig 2009-12-04 22:09:30.000000000 +0000 +++ src/libstatgrab/disk_stats.c @@@@ -64,7 +64,9 @@@@ #include #endif #if defined(FREEBSD) || defined(DFBSD) +#if !defined(DFBSD) #include +#endif #include #include #include @@@@ -457,7 +459,11 @@@@ sg_disk_io_stats *sg_get_disk_io_stats(i struct devstat *dev_ptr; #endif #ifdef NETBSD +#ifdef HW_DISKSTATS struct disk_sysctl *stats; +#else + struct io_sysctl *stats; +#endif #endif #ifdef OPENBSD int diskcount; @@@@ -604,9 +610,15 @@@@ sg_disk_io_stats *sg_get_disk_io_stats(i #if defined(NETBSD) || defined(OPENBSD) mib[0] = CTL_HW; +#ifdef HW_DISKSTATS mib[1] = HW_DISKSTATS; +#endif #ifdef NETBSD +#ifdef HW_DISKSTATS mib[2] = sizeof(struct disk_sysctl); +#else + mib[2] = sizeof(struct io_sysctl); +#endif #endif if (sysctl(mib, MIBSIZE, NULL, &size, NULL, 0) < 0) { @@@@ -615,8 +627,12 @@@@ sg_disk_io_stats *sg_get_disk_io_stats(i } #ifdef NETBSD +#ifdef HW_DISKSTATS num_disks = size / sizeof(struct disk_sysctl); #else + num_disks = size / sizeof(struct io_sysctl); +#endif +#else num_disks = size / sizeof(struct diskstats); #endif @@@@ -635,6 +651,7 @@@@ sg_disk_io_stats *sg_get_disk_io_stats(i u_int64_t rbytes, wbytes; #ifdef NETBSD +#ifdef HW_DISKSTATS #ifdef HAVE_DK_RBYTES rbytes = stats[i].dk_rbytes; wbytes = stats[i].dk_wbytes; @@@@ -643,6 +660,10 @@@@ sg_disk_io_stats *sg_get_disk_io_stats(i rbytes = wbytes = stats[i].dk_bytes; #endif #else + rbytes = stats[i].rbytes; + wbytes = stats[i].wbytes; +#endif +#else #ifdef HAVE_DS_RBYTES rbytes = stats[i].ds_rbytes; wbytes = stats[i].ds_wbytes; @@@@ -665,8 +686,12 @@@@ sg_disk_io_stats *sg_get_disk_io_stats(i diskio_stats_ptr->read_bytes = rbytes; diskio_stats_ptr->write_bytes = wbytes; #ifdef NETBSD +#ifdef HAVE_DISKSTATS name = stats[i].dk_name; #else + name = stats[i].name; +#endif +#else name = dk_name[i]; #endif if (sg_update_string(&diskio_stats_ptr->disk_name, name) < 0) { @ 1.3 log @Updating devel/libstatgrab from 0.16 to 0.17 shared library version changed from 6.2.2 to 6.2.3 - I assume no revbump needed Upstream changes: libstatgrab 0.17 (21 February 2010) * Provide iowait cpu information on Linux version 2.5.41 or later. * Display data for ZFS on Solaris. * Dynamically get list of valid filesystems on FreeBSD. (Thanks to Baptiste Daroussin) * Support FreeBSD 9. * Use utmpx when available (required for FreeBSD 9). (Thanks to Ed Schouten) * Support larger amounts of memory on FreeBSD. (Thanks to Tom Bird) @ text @d1 1 a1 1 $NetBSD$ @ 1.2 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-ac,v 1.1 2006/06/12 16:30:33 joerg Exp $ d3 1 a3 1 --- src/libstatgrab/disk_stats.c.orig 2006-10-09 14:09:38.000000000 +0000 d13 3 a15 3 #define VALID_FS_TYPES {"hpfs", "msdosfs", "ntfs", "udf", "ext2fs", \ "ufs", "mfs", "nfs"} @@@@ -430,7 +432,11 @@@@ sg_disk_io_stats *sg_get_disk_io_stats(i d27 1 a27 1 @@@@ -577,9 +583,15 @@@@ sg_disk_io_stats *sg_get_disk_io_stats(i d43 1 a43 1 @@@@ -588,8 +600,12 @@@@ sg_disk_io_stats *sg_get_disk_io_stats(i d56 1 a56 1 @@@@ -608,6 +624,7 @@@@ sg_disk_io_stats *sg_get_disk_io_stats(i d64 1 a64 1 @@@@ -616,6 +633,10 @@@@ sg_disk_io_stats *sg_get_disk_io_stats(i d75 1 a75 1 @@@@ -638,8 +659,12 @@@@ sg_disk_io_stats *sg_get_disk_io_stats(i @ 1.1 log @Sync DragonFly support with reality. @ text @d1 1 a1 1 $NetBSD$ d3 1 a3 1 --- src/libstatgrab/disk_stats.c.orig 2006-06-12 16:18:08.000000000 +0000 d15 73 @