aboutsummaryrefslogtreecommitdiffstats
path: root/plugin_meminfo.c
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-01-25 05:30:09 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-01-25 05:30:09 +0000
commit870fec3b7b48712b88c2c8b3ebb05613b186cdd3 (patch)
treeca155e758edec1f13ad82cf5b0fef9d323920a0b /plugin_meminfo.c
parent821103866ec28ee777a093c71d696faf71152d0c (diff)
downloadlcd4linux-870fec3b7b48712b88c2c8b3ebb05613b186cdd3.tar.gz
[lcd4linux @ 2004-01-25 05:30:08 by reinelt]
plugin_netdev for parsing /proc/net/dev added git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@338 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'plugin_meminfo.c')
-rw-r--r--plugin_meminfo.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/plugin_meminfo.c b/plugin_meminfo.c
index b455f71..4091648 100644
--- a/plugin_meminfo.c
+++ b/plugin_meminfo.c
@@ -1,4 +1,4 @@
-/* $Id: plugin_meminfo.c,v 1.3 2004/01/21 10:48:17 reinelt Exp $
+/* $Id: plugin_meminfo.c,v 1.4 2004/01/25 05:30:09 reinelt Exp $
*
* plugin for /proc/meminfo parsing
*
@@ -23,6 +23,9 @@
*
*
* $Log: plugin_meminfo.c,v $
+ * Revision 1.4 2004/01/25 05:30:09 reinelt
+ * plugin_netdev for parsing /proc/net/dev added
+ *
* Revision 1.3 2004/01/21 10:48:17 reinelt
* hash_age function added
*
@@ -65,12 +68,11 @@ static HASH MemInfo = { 0, };
static int parse_meminfo (void)
{
int age;
- int line;
FILE *stream;
- // reread every 100 msec only
+ // reread every 10 msec only
age=hash_age(&MemInfo, NULL, NULL);
- if (age>0 && age<=100) return 0;
+ if (age>0 && age<=10) return 0;
stream=fopen("/proc/meminfo", "r");
if (stream==NULL) {
@@ -78,7 +80,6 @@ static int parse_meminfo (void)
return -1;
}
- line=0;
while (!feof(stream)) {
char buffer[256];
char *c, *key, *val;