- 22 2月, 2016 1 次提交
-
-
由 Johan Walles 提交于
This change changes and documents the (previously undocumented) behavior of Used to "RAM used by programs". We also remove the undocumented and unused Shared field of that struct. So with this change in place, the VirtualMemoryStruct contains: * three human-consumable fields for Total, Used and Available memory * one human-consumable UsedPercentage field * a number of kernel specific fields
-
- 21 2月, 2016 2 次提交
-
-
由 shirou 提交于
Use OS calls rather than exec() to get memory stats on Darwin
-
由 Johan Walles 提交于
-
- 20 2月, 2016 4 次提交
-
-
由 Johan Walles 提交于
-
由 Johan Walles 提交于
-
由 Johan Walles 提交于
Before this change we used to exec() various binaries to find out memory information. While this worked, it was awfully slow. And if somebody would want to compute how many percent of available memory all PIDs on the system uses, that would take almost ten seconds on my laptop with the previous implementation. This implementation fares a lot better, and is smaller.
-
由 Johan Walles 提交于
-
- 17 2月, 2016 3 次提交
-
-
由 Shirou WAKAYAMA 提交于
-
由 shirou 提交于
process: Implement MemoryPercent() for Darwin
-
由 Johan Walles 提交于
It calls mem.VirtualMemory() and process.MemoryInfo(), so on the platforms where those work MemoryPercent() will as well. Tested on Darwin.
-
- 12 2月, 2016 16 次提交
-
-
由 shirou 提交于
Add build check
-
由 Shirou WAKAYAMA 提交于
-
由 Shirou WAKAYAMA 提交于
-
由 Shirou WAKAYAMA 提交于
-
由 Shirou WAKAYAMA 提交于
-
由 WAKAYAMA shirou 提交于
-
由 shirou 提交于
add circle.yml.
-
由 Shirou WAKAYAMA 提交于
-
由 Shirou WAKAYAMA 提交于
-
由 Shirou WAKAYAMA 提交于
-
由 shirou 提交于
Return correct user name from process.Username()
-
由 Shirou WAKAYAMA 提交于
-
由 Shirou WAKAYAMA 提交于
-
由 Johan Walles 提交于
-
由 Johan Walles 提交于
process.Process.uids is an array of undocumented values. That one of them is the user that the process is running as is obvious, but what the other two are supposed to be is AFAICT undocumented. On Darwin, the second and third UID (out of three) seem to always be 0. This change removes the two always-zero UIDs from the process.Process struct on Darwin, and leaves just the one that actually identifies the user the process is running as.
-
由 Johan Walles 提交于
Before this change, process.Username() returned "root" for all processes on Darwin.
-
- 11 2月, 2016 2 次提交
-
-
由 shirou 提交于
Make a public function for computing total CPU time
-
由 Johan Walles 提交于
This function used to be a private part of process.go. Since I needed that functionality however I think it's better to make it public than for me to copy it into my own code. As a side effect of this change, I also fixed a bug in the function where Stolen was not part of the sum. Having the function close to the CPUTimesStat declaration will make problems like this less likely to re-occur in the future.
-
- 10 2月, 2016 2 次提交
-
-
由 shirou 提交于
fix meminfo output on consecutive calls
-
由 Ben Aldrich 提交于
-
- 09 2月, 2016 2 次提交
-
-
由 shirou 提交于
There are two possible error scenarios for CallPgrep.
-
由 Robert Weber 提交于
-
- 07 2月, 2016 1 次提交
-
-
由 shirou 提交于
try to fix diskio stats on FreeBSD-10.x
-
- 06 2月, 2016 1 次提交
-
-
由 elij 提交于
FreeBSD apparently changed the magic sysctl mib values for devstats. --- FAIL: TestDisk_io_counters (0.00s) disk_test.go:39: error no such file or directory disk_test.go:42: ret is empty, map[] This code uses an undocumented, but exported, go stdlib method to fetch the sysctl by string instead of mib.
-
- 05 2月, 2016 3 次提交
-
-
由 Robert Weber 提交于
-
由 Robert Weber 提交于
-
由 Robert Weber 提交于
system (no pgrep command) and one is a normal error state of pgrep meaning no processes found for the criteria given (in this case the parent pid does not exist or the process simply has no children). The later case is quite usefull to know about so I added a static error for this case.
-
- 02 2月, 2016 3 次提交
-
-
由 shirou 提交于
host_linux: Skip everything that isn't a normal process.
-
由 Robin Burchell 提交于
Matches the host_linux change.
-
由 Robin Burchell 提交于
host_darwin does the same filtering. Not doing this gives us some rather strange entries that likely aren't what we want. Before: {"user":"reboot","terminal":"~","host":"3.10.0-327.4.5.el7.x86_64","started":1454378260} {"user":"LOGIN","terminal":"ttyS0","host":"","started":1454378270} {"user":"LOGIN","terminal":"tty1","host":"","started":1454378270} {"user":"runlevel","terminal":"~","host":"3.10.0-327.4.5.el7.x86_64","started":1454378276} {"user":"root","terminal":"pts/0","host":"vpn","started":1454404513} After: {"user":"root","terminal":"pts/0","host":"vpn","started":1454404513}
-