--- acpustatus.cc.orig	Sat Apr  5 18:14:33 2003
+++ acpustatus.cc	Sat Apr  5 19:36:31 2003
@@ -26,7 +26,7 @@
 
 #include "intl.h"
 
-#if (defined(linux) || defined(HAVE_KSTAT_H))
+#if (defined(linux) || defined(HAVE_KSTAT_H) || defined(sgi))
 
 #define UPDATE_INTERVAL 500
 
@@ -350,8 +350,35 @@
     cpu[taskBarCPUSamples-1][IWM_IDLE] = cp_pct[CPU_IDLE];
 
 #endif /* have_kstat_h */
+#ifdef sgi
 
+	struct sysinfo info;
+	struct sgt_cookie cookie;
+	long cur[IWM_STATES];
+
+	SGT_COOKIE_INIT(&cookie);
+	if(sysget(SGT_SINFO, (char*)&info, sizeof(info), SGT_READ,
+		&cookie) == -1) {
+		perror("sysget ");
+		return;
+	}
+
+	cpu[taskBarCPUSamples - 1][IWM_USER] = info.cpu[CPU_USER];
+	cpu[taskBarCPUSamples - 1][IWM_NICE] = 0;
+	cpu[taskBarCPUSamples - 1][IWM_SYS]
+		= info.cpu[CPU_KERNEL] + info.cpu[CPU_WAIT]
+		+ info.cpu[CPU_SXBRK] + info.cpu[CPU_INTR];
+	cpu[taskBarCPUSamples - 1][IWM_IDLE] = info.cpu[CPU_IDLE];
+
+	for(int i = 0; i < IWM_STATES; i++) {
+		cur[i] = cpu[taskBarCPUSamples - 1][i];
+		cpu[taskBarCPUSamples - 1][i] = cur[i] - last_cpu[i];
+		last_cpu[i] = cur[i];
+	}
+
+#endif /* sgi */
+
 }
 #endif
-#endif
+#endif /* CONFIG_APPLET_CPU_STATUS */
 
--- acpustatus.h.orig	Sat Apr  5 18:14:33 2003
+++ acpustatus.h	Sat Apr  5 18:14:33 2003
@@ -1,7 +1,7 @@
 #ifndef __CPUSTATUS_H
 #define __CPUSTATUS_H
 
-#if defined(linux) || defined(HAVE_KSTAT_H)
+#if defined(linux) || defined(HAVE_KSTAT_H) || defined(sgi)
 
 #ifdef HAVE_KSTAT_H
 #include <kstat.h>
@@ -8,6 +8,10 @@
 #include <sys/sysinfo.h>
 #endif /* have_kstat_h */
 
+#ifdef sgi
+#include <sys/sysinfo.h>
+#include <sys/sysget.h>
+#endif
 
 #define IWM_USER   (0)
 #define IWM_NICE   (1)
