Commit Graph

20 Commits

Author SHA1 Message Date
shirou 0969c9436b delete v2 directory, move v3 to top #1078 2021-11-30 23:47:59 +00:00
mingrammer 017c9f9cbc Fix typos 2019-03-18 02:52:26 +09:00
WAKAYAMA shirou bb15c85289 [mem][freebsd]: add SysctlUint which can adapt both 32 and 64 bit 2019-03-16 21:43:15 +09:00
shirou b3d992b0f6 [mem]freebsd: update xswdev_version to adapt FreeBSD 12. 2019-02-10 23:19:06 +09:00
Isida Zyun'iti bd7b2f8148 Add mem(laundry) numbers on FreeBSD.
After FreeBSD 11.1, mem number of cached replaced by laundry.

https://reviews.freebsd.org/D8302
2018-08-08 19:54:18 +09:00
Isida Zyun'iti 48da6ade9e Fix FreeBSD total memory.
Like this.
FreeBSD: fix total memory giampaolo/psutil@bd9a58b bd9a58b2af
2018-08-07 10:42:15 +00:00
Daniel Nelson 28b1d7477e
Use uint64 when retrieving vfs.bufspace
On some system using a the uint32 function would return the error
"cannot allocate memory".
2018-04-12 15:33:51 -07:00
Steven Hartland d968f63e51 Eliminate call to swapinfo on FreeBSD
Improve performance by eliminating the fork out to swapinfo on FreeBSD which also helps prevent crashes / hangs due to the outstanding fork crash bug:
golang/go#15658

This also fixes the value reported by SwapMemory and SwapMemoryWithContext on FreeBSD which previously only included the first swap device and also reported the values in terms of 1K blocks instead of bytes.
2018-03-11 22:15:22 +00:00
shirou 4c73494c78 Add WithContext functions. 2017-12-31 15:25:49 +09:00
Steven Hartland 6450c60b61 Eliminate use of sysctl command on FreeBSD
In order to improve performance and help prevent crashes due to the outstanding fork crash bug:
https://github.com/golang/go/issues/15658

Replace string parsed values from the sysctl command with native reads of sysctl values using unix.SysctlRaw and unix.SysctlUint32.

This also merges OpenBSD and FreeBSD load implementations which are identical.
2017-10-05 08:45:56 +01:00
Shirou WAKAYAMA 57f6aebc7e add Timeout to invoke command and use common.Invoke refs: #201 2016-05-20 17:59:41 +09:00
Shirou WAKAYAMA 613a8a90e1 fixed by golint. 2016-04-01 21:34:39 +09:00
Johan Walles 0d5592714b Fix memory stats on LinuxFreeBSD 2016-02-22 07:28:44 +01:00
Masayoshi Sekimura 3a1fa5dc80 format go program with go 1.5.2 "go fmt" 2016-01-09 16:17:21 -08:00
Nikolay Sivko 075839d9f1 fix imports 2015-11-25 10:50:51 +03:00
Nikolay Sivko d4e648e253 [freebsd] fix SwapMemory for hosts without swap 2015-11-24 17:37:01 +03:00
Shirou WAKAYAMA 7288e9a5af common[all]: add internal 2015-10-20 00:04:57 +09:00
WAKAYAMA shirou be88485e9f mem[freebsd]: fix virtual memory available and used. 2015-09-18 14:01:49 +09:00
Shirou WAKAYAMA 13cd195a7e change package name. 2014-12-30 22:09:05 +09:00
Shirou WAKAYAMA a4671fcc2a move subdirectories. refer to issue #24 2014-11-27 10:18:15 +09:00