diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1997-09-12 01:29:55 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1997-09-12 01:29:55 +0000 |
commit | 545f435ebcfd94a1e7c20b46efe81b4d6ac4e698 (patch) | |
tree | e9ce4bc598d06374bda906f18365984bf22a526a /fs/proc/array.c | |
parent | 4291a610eef89d0d5c69d9a10ee6560e1aa36c74 (diff) |
Merge with Linux 2.1.55. More bugfixes and goodies from my private
CVS archive.
Diffstat (limited to 'fs/proc/array.c')
-rw-r--r-- | fs/proc/array.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c index 21fefe4a7..eac2db247 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -295,14 +295,20 @@ static int get_uptime(char * buffer) static int get_meminfo(char * buffer) { struct sysinfo i; + int len; si_meminfo(&i); si_swapinfo(&i); - + len = sprintf(buffer, " total: used: free: shared: buffers: cached:\n" + "Mem: %8lu %8lu %8lu %8lu %8lu %8lu\n" + "Swap: %8lu %8lu %8lu\n", + i.totalram, i.totalram-i.freeram, i.freeram, i.sharedram, i.bufferram, page_cache_size*PAGE_SIZE, + i.totalswap, i.totalswap-i.freeswap, i.freeswap); /* - * Tagged format, for easy grepping and expansion. + * Tagged format, for easy grepping and expansion. The above will go away + * eventually, once the tools have been updated. */ - return sprintf(buffer, + return len + sprintf(buffer+len, "MemTotal: %8lu kB\n" "MemFree: %8lu kB\n" "MemShared: %8lu kB\n" |