1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-04-26 13:48:59 +08:00

11 Commits

Author SHA1 Message Date
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!
2015-08-27 09:41:19 -06:00
Myungjun Kim
c5b94d3e4c memory[darwin]: return value of "sysctl hw.memsize" is memory size in bytes. 2015-08-16 16:32:53 +09:00
Shirou WAKAYAMA
a9e65ec556 mem[darwin]: fix VirtualMem stat multiply. 2015-07-23 11:39:22 +09:00
Nikolay Sivko
06282a319c [darwin] hw.memsize already in bytes 2015-04-08 14:53:21 +03:00
若山史郎
cea341c690 mem: add 0 check to darwin.swapmem. 2015-02-26 16:23:35 +09:00
Shirou WAKAYAMA
13cd195a7e change package name. 2014-12-30 22:09:05 +09:00
Shirou WAKAYAMA
1cb67eb4c2 merge 039b9defabe2fba35c9d3a4dbf7edc3fad812227 2014-12-27 23:43:18 +09:00
Shirou WAKAYAMA
16de570414 merge 039b9defabe2fba35c9d3a4dbf7edc3fad812227 2014-12-27 23:42:00 +09:00
WAKAYAMA Shirou
9f2c985a28 fix windows build. 2014-11-27 22:28:05 +09:00
WAKAYAMA shirou
d11680c773 fix bugs on FreeBSD. 2014-11-27 10:25:14 +09:00
Shirou WAKAYAMA
a4671fcc2a move subdirectories. refer to issue #24 2014-11-27 10:18:15 +09:00