pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

ksysguard: Add ksysguard 5.6.3



Module Name:	pkgsrc-wip
Committed By:	Mark Davies <mark%ecs.vuw.ac.nz@localhost>
Pushed By:	markd
Date:		Tue May 10 00:01:42 2016 +1200
Changeset:	b42607ca8c623401dd4092be2dde83561a659840

Added Files:
	ksysguard/DESCR
	ksysguard/Makefile
	ksysguard/PLIST
	ksysguard/distinfo
	ksysguard/patches/patch-example_CMakeLists.txt
	ksysguard/patches/patch-gui_CMakeLists.txt
	ksysguard/patches/patch-ksysguardd_FreeBSD_ProcessList.c
	ksysguard/patches/patch-ksysguardd_FreeBSD_cpuinfo.c
	ksysguard/patches/patch-ksysguardd_FreeBSD_uptime.c
	ksysguard/patches/patch-ksysguardd_NetBSD_CPU.c
	ksysguard/patches/patch-ksysguardd_NetBSD_CPU.h
	ksysguard/patches/patch-ksysguardd_NetBSD_Memory.c
	ksysguard/patches/patch-ksysguardd_NetBSD_Memory.h
	ksysguard/patches/patch-ksysguardd_NetBSD_ProcessList.c
	ksysguard/patches/patch-ksysguardd_Solaris_LoadAvg.c

Log Message:
ksysguard: Add ksysguard 5.6.3

KSysGuard is a program to monitor various elements of your system, or any
other remote system with the KSysGuard daemon (ksysgardd) installed.
Currently the daemon has been ported to Linux, FreeBSD, Irix, NetBSD,
OpenBSD, Solaris and Tru64 with varying degrees of completion.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=b42607ca8c623401dd4092be2dde83561a659840

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 ksysguard/DESCR                                    |   4 +
 ksysguard/Makefile                                 |  37 ++++++
 ksysguard/PLIST                                    | 128 +++++++++++++++++++++
 ksysguard/distinfo                                 |  17 +++
 ksysguard/patches/patch-example_CMakeLists.txt     |  10 ++
 ksysguard/patches/patch-gui_CMakeLists.txt         |  13 +++
 .../patches/patch-ksysguardd_FreeBSD_ProcessList.c |  83 +++++++++++++
 .../patches/patch-ksysguardd_FreeBSD_cpuinfo.c     |  20 ++++
 .../patches/patch-ksysguardd_FreeBSD_uptime.c      |  15 +++
 ksysguard/patches/patch-ksysguardd_NetBSD_CPU.c    |  67 +++++++++++
 ksysguard/patches/patch-ksysguardd_NetBSD_CPU.h    |  15 +++
 ksysguard/patches/patch-ksysguardd_NetBSD_Memory.c | 121 +++++++++++++++++++
 ksysguard/patches/patch-ksysguardd_NetBSD_Memory.h |  23 ++++
 .../patches/patch-ksysguardd_NetBSD_ProcessList.c  |  12 ++
 .../patches/patch-ksysguardd_Solaris_LoadAvg.c     |  14 +++
 15 files changed, 579 insertions(+)

diffs:
diff --git a/ksysguard/DESCR b/ksysguard/DESCR
new file mode 100644
index 0000000..1e01c9a
--- /dev/null
+++ b/ksysguard/DESCR
@@ -0,0 +1,4 @@
+KSysGuard is a program to monitor various elements of your system, or any
+other remote system with the KSysGuard daemon (ksysgardd) installed. 
+Currently the daemon has been ported to Linux, FreeBSD, Irix, NetBSD,
+OpenBSD, Solaris and Tru64 with varying degrees of completion.
diff --git a/ksysguard/Makefile b/ksysguard/Makefile
new file mode 100644
index 0000000..0391ec7
--- /dev/null
+++ b/ksysguard/Makefile
@@ -0,0 +1,37 @@
+# $NetBSD: Makefile,v 1.25 2016/01/10 20:01:05 markd Exp $
+
+DISTNAME=	ksysguard-${PLASMAVER}
+CATEGORIES=	x11
+
+HOMEPAGE=	https://userbase.kde.org/KSysGuard
+COMMENT=	Track and control the processes running in your system
+LICENSE=	gnu-gpl-v2 AND gnu-fdl-v1.2
+
+.include "../../wip/kde5/plasma.mk"
+
+CONFLICTS+=	kde-workspace4-[0-9]*
+
+BUILD_DEPENDS+=	kdoctools>=5.19.0:../../wip/kdoctools
+
+USE_TOOLS+=	msgmerge pkg-config
+
+# ksysguardd/NetBSD/netdev.c and apm.c dont like the standard setting
+SUBST_CLASSES+=		eat-std
+SUBST_STAGE.eat-std=	post-configure
+SUBST_FILES.eat-std=	_KDE_build/ksysguardd/NetBSD/CMakeFiles/libksysguardd.dir/flags.make
+SUBST_SED.eat-std=	-e 's, -std=iso9899:1990 , ,g'
+
+
+MAKE_DIRS+=	${PKG_SYSCONFDIR}/xdg
+CONF_FILES+=	${PREFIX}/share/examples/ksysguard/ksysguarddrc \
+		${PKG_SYSCONFDIR}/ksysguarddrc
+CONF_FILES+=	${PREFIX}/share/examples/kde-xdg/ksysguard.knsrc \
+		${PKG_SYSCONFDIR}/xdg/ksysguard.knsrc
+
+.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
+.include "../../sysutils/desktop-file-utils/desktopdb.mk"
+.include "../../wip/libksysguard/buildlink3.mk"
+.include "../../wip/kdelibs4support/buildlink3.mk"
+.include "../../wip/knewstuff/buildlink3.mk"
+.include "../../x11/qt5-qtbase/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/ksysguard/PLIST b/ksysguard/PLIST
new file mode 100644
index 0000000..70e4668
--- /dev/null
+++ b/ksysguard/PLIST
@@ -0,0 +1,128 @@
+@comment $NetBSD$
+bin/ksysguard
+bin/ksysguardd
+lib/libkdeinit5_ksysguard.so
+share/applications/org.kde.ksysguard.desktop
+share/doc/HTML/ca/ksysguard/index.cache.bz2
+share/doc/HTML/ca/ksysguard/index.docbook
+share/doc/HTML/de/ksysguard/index.cache.bz2
+share/doc/HTML/de/ksysguard/index.docbook
+share/doc/HTML/en/ksysguard/index.cache.bz2
+share/doc/HTML/en/ksysguard/index.docbook
+share/doc/HTML/et/ksysguard/index.cache.bz2
+share/doc/HTML/et/ksysguard/index.docbook
+share/doc/HTML/it/ksysguard/index.cache.bz2
+share/doc/HTML/it/ksysguard/index.docbook
+share/doc/HTML/nl/ksysguard/index.cache.bz2
+share/doc/HTML/nl/ksysguard/index.docbook
+share/doc/HTML/pt_BR/ksysguard/index.cache.bz2
+share/doc/HTML/pt_BR/ksysguard/index.docbook
+share/doc/HTML/sv/ksysguard/index.cache.bz2
+share/doc/HTML/sv/ksysguard/index.docbook
+share/doc/HTML/uk/ksysguard/index.cache.bz2
+share/doc/HTML/uk/ksysguard/index.docbook
+share/examples/kde-xdg/ksysguard.knsrc
+share/examples/ksysguard/ksysguarddrc
+share/icons/hicolor/16x16/apps/computer.png
+share/icons/hicolor/16x16/apps/daemon.png
+share/icons/hicolor/16x16/apps/kdeapp.png
+share/icons/hicolor/16x16/apps/kernel.png
+share/icons/hicolor/16x16/apps/ksysguardd.png
+share/icons/hicolor/16x16/apps/running.png
+share/icons/hicolor/16x16/apps/shell.png
+share/icons/hicolor/16x16/apps/unknownapp.png
+share/icons/hicolor/16x16/apps/waiting.png
+share/knotifications5/ksysguard.notifyrc
+share/ksysguard/ProcessTable.sgrd
+share/ksysguard/SystemLoad2.sgrd
+share/kxmlgui5/ksysguard/ksysguardui.rc
+share/locale/af/LC_MESSAGES/ksysguard.mo
+share/locale/ar/LC_MESSAGES/ksysguard.mo
+share/locale/ast/LC_MESSAGES/ksysguard.mo
+share/locale/be/LC_MESSAGES/ksysguard.mo
+share/locale/be@latin/LC_MESSAGES/ksysguard.mo
+share/locale/bg/LC_MESSAGES/ksysguard.mo
+share/locale/bn/LC_MESSAGES/ksysguard.mo
+share/locale/bn_IN/LC_MESSAGES/ksysguard.mo
+share/locale/br/LC_MESSAGES/ksysguard.mo
+share/locale/bs/LC_MESSAGES/ksysguard.mo
+share/locale/ca/LC_MESSAGES/ksysguard.mo
+share/locale/ca@valencia/LC_MESSAGES/ksysguard.mo
+share/locale/cs/LC_MESSAGES/ksysguard.mo
+share/locale/csb/LC_MESSAGES/ksysguard.mo
+share/locale/cy/LC_MESSAGES/ksysguard.mo
+share/locale/da/LC_MESSAGES/ksysguard.mo
+share/locale/de/LC_MESSAGES/ksysguard.mo
+share/locale/el/LC_MESSAGES/ksysguard.mo
+share/locale/en_GB/LC_MESSAGES/ksysguard.mo
+share/locale/eo/LC_MESSAGES/ksysguard.mo
+share/locale/es/LC_MESSAGES/ksysguard.mo
+share/locale/et/LC_MESSAGES/ksysguard.mo
+share/locale/eu/LC_MESSAGES/ksysguard.mo
+share/locale/fa/LC_MESSAGES/ksysguard.mo
+share/locale/fi/LC_MESSAGES/ksysguard.mo
+share/locale/fr/LC_MESSAGES/ksysguard.mo
+share/locale/fy/LC_MESSAGES/ksysguard.mo
+share/locale/ga/LC_MESSAGES/ksysguard.mo
+share/locale/gl/LC_MESSAGES/ksysguard.mo
+share/locale/gu/LC_MESSAGES/ksysguard.mo
+share/locale/he/LC_MESSAGES/ksysguard.mo
+share/locale/hi/LC_MESSAGES/ksysguard.mo
+share/locale/hne/LC_MESSAGES/ksysguard.mo
+share/locale/hr/LC_MESSAGES/ksysguard.mo
+share/locale/hsb/LC_MESSAGES/ksysguard.mo
+share/locale/hu/LC_MESSAGES/ksysguard.mo
+share/locale/ia/LC_MESSAGES/ksysguard.mo
+share/locale/id/LC_MESSAGES/ksysguard.mo
+share/locale/is/LC_MESSAGES/ksysguard.mo
+share/locale/it/LC_MESSAGES/ksysguard.mo
+share/locale/ja/LC_MESSAGES/ksysguard.mo
+share/locale/kk/LC_MESSAGES/ksysguard.mo
+share/locale/km/LC_MESSAGES/ksysguard.mo
+share/locale/kn/LC_MESSAGES/ksysguard.mo
+share/locale/ko/LC_MESSAGES/ksysguard.mo
+share/locale/ku/LC_MESSAGES/ksysguard.mo
+share/locale/lt/LC_MESSAGES/ksysguard.mo
+share/locale/lv/LC_MESSAGES/ksysguard.mo
+share/locale/mai/LC_MESSAGES/ksysguard.mo
+share/locale/mk/LC_MESSAGES/ksysguard.mo
+share/locale/ml/LC_MESSAGES/ksysguard.mo
+share/locale/mr/LC_MESSAGES/ksysguard.mo
+share/locale/ms/LC_MESSAGES/ksysguard.mo
+share/locale/nb/LC_MESSAGES/ksysguard.mo
+share/locale/nds/LC_MESSAGES/ksysguard.mo
+share/locale/ne/LC_MESSAGES/ksysguard.mo
+share/locale/nl/LC_MESSAGES/ksysguard.mo
+share/locale/nn/LC_MESSAGES/ksysguard.mo
+share/locale/oc/LC_MESSAGES/ksysguard.mo
+share/locale/or/LC_MESSAGES/ksysguard.mo
+share/locale/pa/LC_MESSAGES/ksysguard.mo
+share/locale/pl/LC_MESSAGES/ksysguard.mo
+share/locale/pt/LC_MESSAGES/ksysguard.mo
+share/locale/pt_BR/LC_MESSAGES/ksysguard.mo
+share/locale/ro/LC_MESSAGES/ksysguard.mo
+share/locale/ru/LC_MESSAGES/ksysguard.mo
+share/locale/se/LC_MESSAGES/ksysguard.mo
+share/locale/si/LC_MESSAGES/ksysguard.mo
+share/locale/sk/LC_MESSAGES/ksysguard.mo
+share/locale/sl/LC_MESSAGES/ksysguard.mo
+share/locale/sq/LC_MESSAGES/ksysguard.mo
+share/locale/sr/LC_MESSAGES/ksysguard.mo
+share/locale/sr@ijekavian/LC_MESSAGES/ksysguard.mo
+share/locale/sr@ijekavianlatin/LC_MESSAGES/ksysguard.mo
+share/locale/sr@latin/LC_MESSAGES/ksysguard.mo
+share/locale/sv/LC_MESSAGES/ksysguard.mo
+share/locale/ta/LC_MESSAGES/ksysguard.mo
+share/locale/te/LC_MESSAGES/ksysguard.mo
+share/locale/tg/LC_MESSAGES/ksysguard.mo
+share/locale/th/LC_MESSAGES/ksysguard.mo
+share/locale/tr/LC_MESSAGES/ksysguard.mo
+share/locale/ug/LC_MESSAGES/ksysguard.mo
+share/locale/uk/LC_MESSAGES/ksysguard.mo
+share/locale/uz/LC_MESSAGES/ksysguard.mo
+share/locale/uz@cyrillic/LC_MESSAGES/ksysguard.mo
+share/locale/vi/LC_MESSAGES/ksysguard.mo
+share/locale/wa/LC_MESSAGES/ksysguard.mo
+share/locale/xh/LC_MESSAGES/ksysguard.mo
+share/locale/zh_CN/LC_MESSAGES/ksysguard.mo
+share/locale/zh_TW/LC_MESSAGES/ksysguard.mo
diff --git a/ksysguard/distinfo b/ksysguard/distinfo
new file mode 100644
index 0000000..febf224
--- /dev/null
+++ b/ksysguard/distinfo
@@ -0,0 +1,17 @@
+$NetBSD$
+
+SHA1 (ksysguard-5.6.3.tar.xz) = a31d2b09bc4187860457140132ac84b735ede5f6
+RMD160 (ksysguard-5.6.3.tar.xz) = c9226aa4585f504ce33c002f4d0ccf333f9002bc
+SHA512 (ksysguard-5.6.3.tar.xz) = 5f47004b2f5e28b1c99cbf7196765d227e40d59706db972b77e14a6c240e4958d6bd6b9d3097864704bc61639001cfdc16bdc33024d007a95035b542244cf83d
+Size (ksysguard-5.6.3.tar.xz) = 615740 bytes
+SHA1 (patch-example_CMakeLists.txt) = 1f208084ee87001b9c0f620bf2dffb8be5155869
+SHA1 (patch-gui_CMakeLists.txt) = 60e5609cff7d5b38fc4bf878104f8ed65ab53ecd
+SHA1 (patch-ksysguardd_FreeBSD_ProcessList.c) = 8ce52ef671aff102e9db0d6d4be2dae0da8ef989
+SHA1 (patch-ksysguardd_FreeBSD_cpuinfo.c) = bf646d263846faaf42ba80c0c85c3b607747f80d
+SHA1 (patch-ksysguardd_FreeBSD_uptime.c) = 8ea36c213e590f2c91c0723d03ddcf97d4f084ca
+SHA1 (patch-ksysguardd_NetBSD_CPU.c) = e1b44fffa0cc1109eb2999c4880f4240643a3829
+SHA1 (patch-ksysguardd_NetBSD_CPU.h) = dd1e701b60de2a3ddca37585b37d5540a3891afe
+SHA1 (patch-ksysguardd_NetBSD_Memory.c) = 0752eca6966424e5b7e56cef96d6868268ba6df9
+SHA1 (patch-ksysguardd_NetBSD_Memory.h) = 7fe2f05789d6166a982785ae155e36d7ed1cdcd1
+SHA1 (patch-ksysguardd_NetBSD_ProcessList.c) = 8a01eaf184ae989081c7f3e3c71ede93c2bbeb3b
+SHA1 (patch-ksysguardd_Solaris_LoadAvg.c) = 4d21e99fd3e183cc20560ccdb08451c858536ec9
diff --git a/ksysguard/patches/patch-example_CMakeLists.txt b/ksysguard/patches/patch-example_CMakeLists.txt
new file mode 100644
index 0000000..7a9008c
--- /dev/null
+++ b/ksysguard/patches/patch-example_CMakeLists.txt
@@ -0,0 +1,10 @@
+$NetBSD$
+
+Install via examples dir
+
+--- example/CMakeLists.txt.orig	2016-04-19 11:11:51.000000000 +0000
++++ example/CMakeLists.txt
+@@ -1,2 +1,2 @@
+-install( FILES ksysguarddrc  DESTINATION  ${KDE_INSTALL_FULL_SYSCONFDIR} )
++install( FILES ksysguarddrc  DESTINATION  ${KDE_INSTALL_DATAROOTDIR}/examples/ksysguard )
+ install( FILES ksysguard.notifyrc DESTINATION  ${KNOTIFYRC_INSTALL_DIR} )
diff --git a/ksysguard/patches/patch-gui_CMakeLists.txt b/ksysguard/patches/patch-gui_CMakeLists.txt
new file mode 100644
index 0000000..dabc05a
--- /dev/null
+++ b/ksysguard/patches/patch-gui_CMakeLists.txt
@@ -0,0 +1,13 @@
+$NetBSD$
+
+Install via examples dir
+
+--- gui/CMakeLists.txt.orig	2016-04-19 11:11:51.000000000 +0000
++++ gui/CMakeLists.txt
+@@ -70,5 +70,5 @@ install(TARGETS ksysguard         ${INST
+ install( PROGRAMS org.kde.ksysguard.desktop  DESTINATION  ${XDG_APPS_INSTALL_DIR} )
+ install( FILES ProcessTable.sgrd SystemLoad2.sgrd DESTINATION  ${DATA_INSTALL_DIR}/ksysguard )
+ install( FILES ksysguardui.rc  DESTINATION  ${KXMLGUI_INSTALL_DIR}/ksysguard )
+-install( FILES ksysguard.knsrc DESTINATION ${CONFIG_INSTALL_DIR})
++install( FILES ksysguard.knsrc DESTINATION ${KDE_INSTALL_DATAROOTDIR}/examples/kde-xdg)
+ 
diff --git a/ksysguard/patches/patch-ksysguardd_FreeBSD_ProcessList.c b/ksysguard/patches/patch-ksysguardd_FreeBSD_ProcessList.c
new file mode 100644
index 0000000..f218956
--- /dev/null
+++ b/ksysguard/patches/patch-ksysguardd_FreeBSD_ProcessList.c
@@ -0,0 +1,83 @@
+$NetBSD: patch-ksysguard_ksysguard_FreeBSD_ProcessList.c,v 1.2 2013/04/03 10:51:50 markd Exp $
+
+--- ksysguardd/FreeBSD/ProcessList.c.orig	2013-03-01 06:32:24.000000000 +0000
++++ ksysguardd/FreeBSD/ProcessList.c
+@@ -54,6 +54,24 @@
+ 
+ #define MONITORBUF 20
+ 
++#if defined(__DragonFly__)
++#include <kvm.h>
++#include <limits.h>
++#define ki_comm    kp_comm
++#define ki_nice    kp_nice
++#define ki_pid     kp_pid
++#define ki_pgid    kp_pgid
++#define ki_ppid    kp_ppid
++#define ki_ruid    kp_ruid
++#define ki_runtime kp_lwp.kl_pctcpu
++#define ki_rssize  kp_vm_rssize
++#define ki_size    kp_vm_map_size
++#define ki_stat    kp_stat
++#define ki_start   kp_start
++#define ki_uid     kp_uid
++#define KERN_PROC_PROC KERN_PROC_ALL
++#endif
++
+ static struct kinfo_proc proc_buf[PROCBUF], prev_list[PROCBUF];
+ static int nproc, prev_nproc, sorted_proc[PROCBUF], prev_sorted[PROCBUF];
+ 
+@@ -230,7 +248,11 @@ void printProcessList(const char* cmd)
+                 *arg_fix = '*';
+         }
+ 
++#if defined(__DragonFly__)
++        if (args[0] == '\0' && (ps->kp_flags & P_SYSTEM)) {
++#else
+         if (args[0] == '\0' && (ps->ki_flag & P_SYSTEM || ps->ki_args == NULL)) {
++#endif
+             int cpy;
+             cpy = strlcpy(buf3 + 1, ps->ki_comm, NAMEBUF - 1);
+             if (cpy > NAMEBUF - 2)
+@@ -246,6 +268,17 @@ void printProcessList(const char* cmd)
+             name = "????";
+ 
+         switch (ps->ki_stat) {
++#if defined(__DragonFly__)
++            case SACTIVE:
++                if (smpmode)
++                    state = cpunames[ps->kp_lwp.kl_cpuid];
++                else
++                    state = statuses[2];
++                break;
++            case SIDL:
++            case SSTOP:
++            case SZOMB:
++#else
+             case SRUN:
+                 if (smpmode && ps->ki_oncpu != 0xff)
+                     state = cpunames[ps->ki_oncpu];
+@@ -269,6 +302,7 @@ void printProcessList(const char* cmd)
+             case SSTOP:
+             case SZOMB:
+             case SWAIT:
++#endif
+                 state = statuses[(int)ps->ki_stat];
+                 break;
+ 
+@@ -300,10 +334,15 @@ void printProcessList(const char* cmd)
+             ++prev_proc;
+         }
+ 
++#if defined(__DragonFly__)
++	/* XXX */
++	load = 0;
++#else
+         if (last_ps != NULL)
+             load = (ps->ki_runtime - last_ps->ki_runtime) / 1000000.0 / scale;
+         else
+             load = ps->ki_runtime / 1000000.0 / scale;
++#endif
+ 
+         if (!ps->ki_pid)
+             /* XXX: TODO: add support for displaying kernel process */
diff --git a/ksysguard/patches/patch-ksysguardd_FreeBSD_cpuinfo.c b/ksysguard/patches/patch-ksysguardd_FreeBSD_cpuinfo.c
new file mode 100644
index 0000000..58378bf
--- /dev/null
+++ b/ksysguard/patches/patch-ksysguardd_FreeBSD_cpuinfo.c
@@ -0,0 +1,20 @@
+$NetBSD: patch-ksysguard_ksysguard_FreeBSD_cpuinfo.c,v 1.1 2012/03/31 06:39:20 marino Exp $
+
+--- ksysguardd/FreeBSD/cpuinfo.c.orig	2012-03-30 18:23:17.735747000 +0000
++++ ksysguardd/FreeBSD/cpuinfo.c
+@@ -39,6 +39,15 @@
+ #define FREQ_LEVEL_BUFFER 256
+ #define SYSCTL_ID_LEN 35
+ 
++#if defined(__DragonFly__) && !defined(CPUSTATES)
++#define CP_USER 	0
++#define CP_NICE 	1
++#define CP_SYS		2
++#define CP_INTR 	3
++#define CP_IDLE 	4
++#define CPUSTATES	5
++#endif
++
+ static void get_mmfreq(int, int*, int*);
+ 
+ static long percentages(int cnt, long *out, long *new, long *old, long *diffs);
diff --git a/ksysguard/patches/patch-ksysguardd_FreeBSD_uptime.c b/ksysguard/patches/patch-ksysguardd_FreeBSD_uptime.c
new file mode 100644
index 0000000..3a8b87a
--- /dev/null
+++ b/ksysguard/patches/patch-ksysguardd_FreeBSD_uptime.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-ksysguard_ksysguard_FreeBSD_uptime.c,v 1.1 2012/03/31 06:39:20 marino Exp $
+
+--- ksysguardd/FreeBSD/uptime.c.orig	2012-03-30 22:35:19.995531000 +0000
++++ ksysguardd/FreeBSD/uptime.c
+@@ -38,8 +38,10 @@ void printUptime( const char* cmd ) {
+     struct timespec tp;
+     float uptime = 0.;
+ 
++#if defined(CLOCK_UPTIME)
+     if (clock_gettime(CLOCK_UPTIME, &tp) != -1)
+         uptime = tp.tv_nsec / 1000000000.0 + tp.tv_sec;
++#endif
+     fprintf( CurrentClient, "%f\n", uptime);
+ }
+ 
diff --git a/ksysguard/patches/patch-ksysguardd_NetBSD_CPU.c b/ksysguard/patches/patch-ksysguardd_NetBSD_CPU.c
new file mode 100644
index 0000000..eb5d1f6
--- /dev/null
+++ b/ksysguard/patches/patch-ksysguardd_NetBSD_CPU.c
@@ -0,0 +1,67 @@
+$NetBSD: patch-ksysguard_ksysguardd_NetBSD_CPU.c,v 1.1 2012/03/19 19:44:03 markd Exp $
+
+--- ksysguardd/NetBSD/CPU.c.orig	2008-01-05 12:55:45.000000000 +1300
++++ ksysguardd/NetBSD/CPU.c
+@@ -49,12 +49,16 @@ initCpuInfo(struct SensorModul* sm)
+ 	registerMonitor("cpu/system/nice", "integer", printCPUNice, printCPUNiceInfo, sm);
+ 	registerMonitor("cpu/system/sys", "integer", printCPUSys, printCPUSysInfo, sm);
+ 	registerMonitor("cpu/system/idle", "integer", printCPUIdle, printCPUIdleInfo, sm);
++	registerMonitor("cpu/system/intr", "integer", printCPUIntr, printCPUIntrInfo, sm);
++	/* linux compat */
++	registerMonitor("cpu/system/wait", "integer", printCPUWait, printCPUWaitInfo, sm);
+ 	
+ 	/* Monitor names changed from kde3 => kde4. Remain compatible with legacy requests when possible. */
+ 	registerLegacyMonitor("cpu/user", "integer", printCPUUser, printCPUUserInfo, sm);
+ 	registerLegacyMonitor("cpu/nice", "integer", printCPUNice, printCPUNiceInfo, sm);
+ 	registerLegacyMonitor("cpu/sys", "integer", printCPUSys, printCPUSysInfo, sm);
+ 	registerLegacyMonitor("cpu/idle", "integer", printCPUIdle, printCPUIdleInfo, sm);
++	registerMonitor("cpu/wait", "integer", printCPUWait, printCPUWaitInfo, sm);
+ 	
+ 	updateCpuInfo();
+ }
+@@ -66,12 +70,15 @@ exitCpuInfo(void)
+ 	removeMonitor("cpu/system/nice");
+ 	removeMonitor("cpu/system/sys");
+ 	removeMonitor("cpu/system/idle");
++	removeMonitor("cpu/system/intr");
++	removeMonitor("cpu/system/wait");
+ 
+ 	/* These were registered as legacy monitors */
+ 	removeMonitor("cpu/user");
+ 	removeMonitor("cpu/nice");
+ 	removeMonitor("cpu/sys");
+ 	removeMonitor("cpu/idle");
++	removeMonitor("cpu/wait");
+ }
+ 
+ int
+@@ -136,6 +143,29 @@ printCPUIdleInfo(const char* cmd)
+ 	fprintf(CurrentClient, "CPU Idle Load\t0\t100\t%%\n");
+ }
+ 
++void
++printCPUIntr(const char* cmd)
++{
++	fprintf(CurrentClient, "%d\n", cpu_states[CP_INTR]/10);
++}
++
++void
++printCPUIntrInfo(const char* cmd)
++{
++	fprintf(CurrentClient, "CPU Interrupt Load\t0\t100\t%%\n");
++}
++
++void
++printCPUWait(const char* cmd)
++{
++	fprintf(CurrentClient, "0\n");
++}
++
++void
++printCPUWaitInfo(const char* cmd)
++{
++	fprintf(CurrentClient, "CPU Wait Load\t0\t100\t%%\n");
++}
+ 
+ /* The part ripped from top... */
+ /*
diff --git a/ksysguard/patches/patch-ksysguardd_NetBSD_CPU.h b/ksysguard/patches/patch-ksysguardd_NetBSD_CPU.h
new file mode 100644
index 0000000..7932993
--- /dev/null
+++ b/ksysguard/patches/patch-ksysguardd_NetBSD_CPU.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-ksysguard_ksysguardd_NetBSD_CPU.h,v 1.1 2012/03/19 19:44:03 markd Exp $
+
+--- ksysguardd/NetBSD/CPU.h.save	2006-10-26 15:12:41.000000000 +1300
++++ ksysguardd/NetBSD/CPU.h
+@@ -37,6 +37,10 @@ void printCPUSys(const char* cmd);
+ void printCPUSysInfo(const char* cmd);
+ void printCPUIdle(const char* cmd);
+ void printCPUIdleInfo(const char* cmd);
++void printCPUIntr(const char* cmd);
++void printCPUIntrInfo(const char* cmd);
++void printCPUWait(const char* cmd);
++void printCPUWaitInfo(const char* cmd);
+ void printCPUxUser(const char* cmd);
+ void printCPUxUserInfo(const char* cmd);
+ void printCPUxNice(const char* cmd);
diff --git a/ksysguard/patches/patch-ksysguardd_NetBSD_Memory.c b/ksysguard/patches/patch-ksysguardd_NetBSD_Memory.c
new file mode 100644
index 0000000..6e490b8
--- /dev/null
+++ b/ksysguard/patches/patch-ksysguardd_NetBSD_Memory.c
@@ -0,0 +1,121 @@
+$NetBSD: patch-ksysguard_ksysguardd_NetBSD_Memory.c,v 1.2 2013/01/17 16:05:53 joerg Exp $
+
+--- ksysguardd/NetBSD/Memory.c.orig	2012-06-01 13:20:44.000000000 +0000
++++ ksysguardd/NetBSD/Memory.c
+@@ -32,7 +32,7 @@
+ #include <unistd.h>
+ /* Everything post 1.5.x uses uvm/uvm_* includes */
+ #if __NetBSD_Version__ >= 105010000
+-#include <uvm/uvm_param.h>
++#include <uvm/uvm_extern.h>
+ #else
+ #include <vm/vm_param.h>
+ #endif
+@@ -49,10 +49,13 @@ static size_t Inactive = 0;
+ static size_t Wired = 0;
+ static size_t Execpages = 0;
+ static size_t Filepages = 0;
++static size_t Anonpages = 0;
+ static size_t STotal = 0;
+ static size_t SFree = 0;
+ static size_t SUsed = 0;
+ 
++static size_t Appl = 0;
++
+ void
+ initMemory(struct SensorModul* sm)
+ {
+@@ -63,8 +66,13 @@ initMemory(struct SensorModul* sm)
+ 	registerMonitor("mem/physical/wired", "integer", printWired, printWiredInfo, sm);
+ 	registerMonitor("mem/physical/execpages", "integer", printExecpages, printExecpagesInfo, sm);
+ 	registerMonitor("mem/physical/filepages", "integer", printFilepages, printFilepagesInfo, sm);
++	registerMonitor("mem/physical/anonpages", "integer", printAnonpages, printAnonpagesInfo, sm);
+ 	registerMonitor("mem/swap/free", "integer", printSwapFree, printSwapFreeInfo, sm);
+ 	registerMonitor("mem/swap/used", "integer", printSwapUsed, printSwapUsedInfo, sm);
++
++	registerMonitor( "mem/physical/application", "integer", printAppl, printApplInfo, sm );
++	registerMonitor( "mem/physical/buf", "integer", printBuffers, printBuffersInfo, sm );
++	registerMonitor( "mem/physical/cached", "integer", printCached, printCachedInfo, sm );
+ }
+ 
+ void
+@@ -93,7 +101,8 @@ updateMemory(void)
+     
+     len = sizeof(x);
+     STotal = SUsed = SFree = -1;
+-    Active = Inactive = Wired = Execpages = Filepages = MFree = Used = -1;
++    Active = Inactive = Wired = Execpages = Filepages = Anonpages = -1;
++    MFree = Used = -1;
+     if (-1 < sysctl(mib, ARRLEN(mib), &x, &len, NULL, 0)) {
+       STotal = (x.pagesize*x.swpages) >> 10;
+       SUsed = (x.pagesize*x.swpginuse) >> 10;
+@@ -104,7 +113,9 @@ updateMemory(void)
+       Wired = (x.wired * x.pagesize) >> 10;
+       Execpages = (x.execpages * x.pagesize) >> 10;
+       Filepages = (x.filepages * x.pagesize) >> 10;
++      Anonpages = (x.anonpages * x.pagesize) >> 10;
+       Used = Total - MFree;
++      Appl = Active - Filepages;
+     }
+   }
+   return 0;
+@@ -195,6 +206,18 @@ printFilepagesInfo(const char* cmd)
+ }
+ 
+ void
++printAnonpages(const char* cmd)
++{
++	fprintf(CurrentClient, "%d\n", Anonpages);
++}
++
++void
++printAnonpagesInfo(const char* cmd)
++{
++	fprintf(CurrentClient, "Anon Pages\t0\t%d\tKB\n", Total);
++}
++
++void
+ printSwapUsed(const char* cmd)
+ {
+ 	fprintf(CurrentClient, "%d\n", SUsed);
+@@ -217,3 +240,40 @@ printSwapFreeInfo(const char* cmd)
+ {
+ 	fprintf(CurrentClient, "Free Swap Memory\t0\t%d\tKB\n", STotal);
+ }
++
++/* Linux compat */
++void
++printBuffers(const char* cmd)
++{
++	fprintf(CurrentClient, "%d\n", Filepages /* + bufmem */);
++}
++
++void
++printBuffersInfo(const char* cmd)
++{
++	fprintf(CurrentClient, "Buffer Memory\t0\t%d\tKB\n", Total);
++}
++
++void
++printCached(const char* cmd)
++{
++	fprintf(CurrentClient, "0\n");
++}
++
++void
++printCachedInfo(const char* cmd)
++{
++	fprintf(CurrentClient, "Cached Memory\t0\t%d\tKB\n", Total);
++}
++
++void
++printAppl(const char* cmd)
++{
++	fprintf(CurrentClient, "%d\n", Appl);
++}
++
++void
++printApplInfo(const char* cmd)
++{
++	fprintf(CurrentClient, "Application Memory\t0\t%d\tKB\n", Total);
++}
diff --git a/ksysguard/patches/patch-ksysguardd_NetBSD_Memory.h b/ksysguard/patches/patch-ksysguardd_NetBSD_Memory.h
new file mode 100644
index 0000000..755f699
--- /dev/null
+++ b/ksysguard/patches/patch-ksysguardd_NetBSD_Memory.h
@@ -0,0 +1,23 @@
+$NetBSD: patch-ksysguard_ksysguardd_NetBSD_Memory.h,v 1.1 2012/03/19 19:44:03 markd Exp $
+
+--- ksysguardd/NetBSD/Memory.h.orig	2008-01-05 12:55:45.000000000 +1300
++++ ksysguardd/NetBSD/Memory.h
+@@ -41,9 +41,18 @@ void printExecpages(const char* cmd);
+ void printExecpagesInfo(const char* cmd);
+ void printFilepages(const char* cmd);
+ void printFilepagesInfo(const char* cmd);
++void printAnonpages(const char* cmd);
++void printAnonpagesInfo(const char* cmd);
+ void printSwapUsed(const char* cmd);
+ void printSwapUsedInfo(const char* cmd);
+ void printSwapFree(const char* cmd);
+ void printSwapFreeInfo(const char* cmd);
+ 
++void printAppl(const char* cmd);
++void printApplInfo(const char* cmd);
++void printBuffers(const char* cmd);
++void printBuffersInfo(const char* cmd);
++void printCached(const char* cmd);
++void printCachedInfo(const char* cmd);
++
+ #endif
diff --git a/ksysguard/patches/patch-ksysguardd_NetBSD_ProcessList.c b/ksysguard/patches/patch-ksysguardd_NetBSD_ProcessList.c
new file mode 100644
index 0000000..f161226
--- /dev/null
+++ b/ksysguard/patches/patch-ksysguardd_NetBSD_ProcessList.c
@@ -0,0 +1,12 @@
+$NetBSD: patch-ksysguard_ksysguardd_NetBSD_ProcessList.c,v 1.1 2013/01/17 16:05:53 joerg Exp $
+
+--- ksysguardd/NetBSD/ProcessList.c.orig	2013-01-16 23:02:11.000000000 +0000
++++ ksysguardd/NetBSD/ProcessList.c
+@@ -35,6 +35,7 @@
+ #include <sys/time.h>
+ #include <sys/types.h>
+ #include <sys/user.h>
++#include <sys/resource.h>
+ #include <unistd.h>
+ #include <signal.h>
+ 
diff --git a/ksysguard/patches/patch-ksysguardd_Solaris_LoadAvg.c b/ksysguard/patches/patch-ksysguardd_Solaris_LoadAvg.c
new file mode 100644
index 0000000..b485588
--- /dev/null
+++ b/ksysguard/patches/patch-ksysguardd_Solaris_LoadAvg.c
@@ -0,0 +1,14 @@
+$NetBSD: patch-ksysguard_ksysguardd_Solaris_LoadAvg.c,v 1.1 2013/06/22 22:39:10 jperkin Exp $
+
+Need string.h
+
+--- ksysguardd/Solaris/LoadAvg.c.orig	2013-05-03 04:36:45.431119797 +0000
++++ ksysguardd/Solaris/LoadAvg.c
+@@ -22,6 +22,7 @@
+ 
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <unistd.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>


Home | Main Index | Thread Index | Old Index