Commit Graph

6 Commits (0461c50666810da7853cb32671735c5f751fe66c)

Author SHA1 Message Date
Jonathan Chauncey 0461c50666 chore(*): Fixes #94
Added the ability to fetch an alternative location for /proc via an
environment variable. If the env var is not set it will return /proc as
the default value.
10 years ago
Cameron Sparr 6cd8284b30 When MemAvailable is in /proc/meminfo, use it (kernel 3.14+) 10 years ago
Cameron Sparr ce70817f55 Fix memory reporting for linux systems
/proc/meminfo reports memory in KiloBytes and so needs a multiplier of
1024 instead of 1000.
The kernel reports in terms of pages and the proc filesystem is left
shifting by 2 for 4KB pages to get KB. Since this is a binary shift,
Bytes will need to shift by 10 and so get multiplied by 1024.

From the kernel code. PAGE_SHIFT = 12 for 4KB pages
"MemTotal:       %8lu kB\n", K(i.totalram)

Thanks to @subhachandrachandra!
10 years ago
Shirou WAKAYAMA 13cd195a7e change package name. 11 years ago
WAKAYAMA shirou d11680c773 fix bugs on FreeBSD. 11 years ago
Shirou WAKAYAMA a4671fcc2a move subdirectories. refer to issue #24 11 years ago