aboutsummaryrefslogtreecommitdiffstats
path: root/system.c
diff options
context:
space:
mode:
authorreinelt <>2004-01-16 05:04:53 +0000
committerreinelt <>2004-01-16 05:04:53 +0000
commit914a4213848bda638bbe14b0fd7b873b8bdeeb32 (patch)
treee03170b68499b254fdcffe478b2d4786a7c867ce /system.c
parent4d0255d6a1eddbf57178f7170838c20c6b2f5573 (diff)
downloadlcd4linux-914a4213848bda638bbe14b0fd7b873b8bdeeb32.tar.gz
[lcd4linux @ 2004-01-16 05:04:53 by reinelt]
started plugin proc_stat which should parse /proc/stat which again is a paint in the a** thinking over implementation methods of delta functions (CPU load, ...)
Diffstat (limited to 'system.c')
-rw-r--r--system.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/system.c b/system.c
index 7fc0919..fe49ca7 100644
--- a/system.c
+++ b/system.c
@@ -1,4 +1,4 @@
-/* $Id: system.c,v 1.32 2004/01/09 04:16:06 reinelt Exp $
+/* $Id: system.c,v 1.33 2004/01/16 05:04:53 reinelt Exp $
*
* system status retreivement
*
@@ -22,6 +22,12 @@
*
*
* $Log: system.c,v $
+ * Revision 1.33 2004/01/16 05:04:53 reinelt
+ * started plugin proc_stat which should parse /proc/stat
+ * which again is a paint in the a**
+ * thinking over implementation methods of delta functions
+ * (CPU load, ...)
+ *
* Revision 1.32 2004/01/09 04:16:06 reinelt
* added 'section' argument to cfg_get(), but NULLed it on all calls by now.
*
@@ -556,7 +562,7 @@ int Busy (double *user, double *nice, double *system, double *idle)
d3=smooth("cpu_sys", 500, v3);
d4=smooth("cpu_idle", 500, v4);
d5=d1+d2+d3+d4;
-
+
if (d5!=0.0) {
*user=(d1+d2)/d5;
*nice=d2/d5;