mirror of
https://github.com/pikami/slstatus.git
synced 2024-12-02 16:25:42 +00:00
Fix ram_free for Linux
This commit is contained in:
parent
39ee31c242
commit
49d1e5fae2
@ -9,7 +9,11 @@
|
|||||||
{
|
{
|
||||||
long free;
|
long free;
|
||||||
|
|
||||||
return (pscanf("/proc/meminfo", "MemFree: %ld kB\n", &free) == 1) ?
|
return (pscanf("/proc/meminfo",
|
||||||
|
"MemTotal: %ld kB\n"
|
||||||
|
"MemFree: %ld kB\n"
|
||||||
|
"MemAvailable: %ld kB\n",
|
||||||
|
&free, &free, &free) == 3) ?
|
||||||
bprintf("%f", (float)free / 1024 / 1024) : NULL;
|
bprintf("%f", (float)free / 1024 / 1024) : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user