Package: gkrellm
Version: 2.2.9-1
Severity: wishlist
Tags: patch

Hi,

the disk plugin counts all I/O for device-mapper devices twice as they
also show up in the raw devices beneath dm. As there is no simpley way
to get the raw devices beneath a dm device and ignore those the
attached patch instead just ignores all I/O to dm devices.

The same should be done for raid devices but there is some special
casing for raid already and I didn't want to touch that.

MfG
        Goswin

-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-xen-book-1
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages gkrellm depends on:
ii  libatk1.0-0                  1.12.4-1    The ATK accessibility toolkit
ii  libc6                        2.3.6.ds1-9 GNU C Library: Shared libraries
ii  libcairo2                    1.2.4-4     The Cairo 2D vector graphics libra
ii  libfontconfig1               2.4.2-1     generic font configuration library
ii  libglib2.0-0                 2.12.6-2    The GLib library of C routines
ii  libgtk2.0-0                  2.8.20-4    The GTK+ graphical user interface 
ii  libice6                      1:1.0.1-2   X11 Inter-Client Exchange library
ii  libpango1.0-0                1.14.8-4    Layout and rendering of internatio
ii  libsm6                       1:1.0.1-3   X11 Session Management library
ii  libx11-6                     2:1.0.3-4   X11 client-side library
ii  libxcursor1                  1.1.7-4     X cursor management library
ii  libxext6                     1:1.0.1-2   X11 miscellaneous extension librar
ii  libxfixes3                   1:4.0.1-5   X11 miscellaneous 'fixes' extensio
ii  libxi6                       1:1.0.1-4   X11 Input extension library
ii  libxinerama1                 1:1.0.1-4.1 X11 Xinerama extension library
ii  libxrandr2                   2:1.1.0.2-5 X11 RandR extension library
ii  libxrender1                  1:0.9.1-3   X Rendering Extension client libra

gkrellm recommends no packages.

-- no debconf information
diff -u gkrellm-2.2.9/debian/changelog gkrellm-2.2.9/debian/changelog
--- gkrellm-2.2.9/debian/changelog
+++ gkrellm-2.2.9/debian/changelog
@@ -1,3 +1,9 @@
+gkrellm (2.2.9-1a0.mrvn.1) unstable; urgency=low
+
+  * Ignore devcie mapper devices in disk stats
+
+ -- Goswin von Brederlow <[EMAIL PROTECTED]>  Sun, 14 Jan 2007 16:55:04 +0100
+
 gkrellm (2.2.9-1) unstable; urgency=low
 
   * New upstream release (fixed segfault on battery plugin)
only in patch2:
unchanged:
--- gkrellm-2.2.9.orig/src/sysdeps/linux.c
+++ gkrellm-2.2.9/src/sysdeps/linux.c
@@ -329,6 +329,9 @@
 #if !defined(NBD_MAJOR)
 #define NBD_MAJOR 43
 #endif
+#if !defined(DM_MAJOR)
+#define DM_MAJOR 254
+#endif
 
 
 struct _disk_name_map
@@ -386,6 +389,7 @@
 	{"cc5d", COMPAQ_CISS_MAJOR + 5,		16,	'0' },	/* 109:  c5d0-c5d15 */
 	{"cc6d", COMPAQ_CISS_MAJOR + 6,		16,	'0' },	/* 110:  c6d0-c6d15 */
 	{"cc7d", COMPAQ_CISS_MAJOR + 7,		16,	'0' },	/* 111:  c7d0-c7d15 */
+	{"dm-", DM_MAJOR,			256,	'0' },	/* 254:  dm-0 - dm-255 */
 
 	{"fd",	FLOPPY_MAJOR,				0,	'0' }	/* 2:  fd0-fd3  */
 	};
@@ -564,6 +568,7 @@
 			|| (rd == 0 && wr == 0 && !inactivity_override)
 			|| major == LVM_BLK_MAJOR || major == NBD_MAJOR
 			|| major == RAMDISK_MAJOR || major == LOOP_MAJOR
+		        || major == DM_MAJOR
 			|| !disk_get_device_name(major, minor, disk, part)
 		   )
 			continue;

Reply via email to