Commit Graph

1217 Commits

Author SHA1 Message Date
shirou b8c456e534 Revert "Fix build with bazel on OSX"
This reverts commit 51c7c4013b.
2017-12-09 16:50:03 +09:00
shirou ab3d3b7f21
Merge pull request #467 from improbable-io/bugfix-darwin-build
Fix build with bazel on OSX
2017-12-09 14:40:04 +09:00
Tatiana Borisova 51c7c4013b Fix build with bazel on OSX 2017-12-08 15:05:00 +00:00
shirou 5c46042e0d
Merge pull request #461 from medzin/time-stat-doc
Add missing doc for cpu.TimesStat structure
2017-11-30 22:50:17 +09:00
Adam Medzinski 22f3299fd7
Add missing doc for cpu.TimesStat structure 2017-11-27 12:17:18 +01:00
shirou bfe3c2e8f4
Merge pull request #452 from leafnunes/master
prevent hang on pkg import if wmi.Query hangs
2017-11-21 21:01:14 +09:00
leaf 65598d98cc To prevent hang if wmi.Query hangs, add a context-aware wrapper for it. 2017-11-20 10:13:27 -08:00
WAKAYAMA shirou f5e19d7e16 [process]windows: implements process.Kill using os/exec 2017-11-18 22:43:54 +09:00
shirou 384a55110a
Merge pull request #458 from danielnelson/skip-not-exist
[net] linux: skip if not exist error on getProcInodesAll
2017-11-18 22:09:29 +09:00
shirou f7e6fc5972
Merge pull request #456 from Lomanic/windows-snapprocess
Use getFromSnapProcess to get process Name and Ppid on Windows instead of slow WMI
2017-11-18 22:08:34 +09:00
Daniel Nelson 6abd227e48
[net] linux: skip if not exist error on getProcInodesAll 2017-11-17 10:46:16 -08:00
shirou 234b6bc9b8
Merge pull request #455 from Lomanic/windows-enumprocesses
Use w32.EnumerateProcesses instead of slower wmi in windows process.Processes()
2017-11-13 21:46:12 +09:00
Lomanic 00bdebfce7 Use getFromSnapProcess to get process Name and Ppid on Windows instead of slow WMI 2017-11-12 21:59:17 +01:00
Lomanic da12f10f63 Use w32.EnumerateProcesses instead of slower wmi in windows process.Processes() 2017-11-12 21:13:39 +01:00
shirou a8bc262994
Merge pull request #454 from Lomanic/windows-enumprocesses
Handle case in Windows process.Pids() where buffer is too small to handle that many processes returned by w32.EnumProcesses
2017-11-13 01:40:41 +09:00
Lomanic c9a24cf2d0 Handle case in Windows process.Pids() where buffer is too small to handle that many processes returned by w32.EnumProcesses 2017-11-12 16:40:35 +01:00
shirou 699bd0f65a
Merge pull request #453 from Lomanic/windows-enumprocesses
Use w32.EnumProcesses to get pids on Windows in process.Pids()
2017-11-12 22:13:38 +09:00
Lomanic 0314bc81f3 Use w32.EnumProcesses to get pids on Windows in process.Pids() 2017-11-12 03:08:47 +01:00
shirou 982c40e07b
Merge pull request #444 from tychoish/make-list-all-processes-public
make process.processes function public
2017-11-12 01:32:35 +09:00
shirou 40b2c667c5
Merge pull request #447 from shawnps/master
call Fatal if length of Users() is 0
2017-11-12 01:21:39 +09:00
shirou 5efab3f766
Merge pull request #450 from mpfz0r/fixtypo
fix typo
2017-11-10 07:34:52 +09:00
shirou 51809083eb
Merge pull request #449 from mpfz0r/connsupport
Implement Connection support for OpenBSD
2017-11-10 07:34:25 +09:00
Sam Kleinman 4d92a03da8 fix cross compiles 2017-11-09 10:31:12 -05:00
Marco Pfatschbacher df6462b50e Fix PR comments made by shirou 2017-11-09 13:14:12 +01:00
shirou 09135c072b
Merge pull request #448 from mpfz0r/master
Fix IOCounters for OpenBSD
2017-11-09 14:52:09 +09:00
Marco Pfatschbacher 5476f100bc mark net_connections as supported for OpenBSD 2017-11-08 21:41:57 +01:00
Marco Pfatschbacher 1ca44eace9 fix typo 2017-11-08 21:38:07 +01:00
Marco Pfatschbacher 6e7aca41d7 Implement Connection support for OpenBSD
This retrieves open TCP/UDP connections by using netstat(1)
File descriptors and pids are not supported.
2017-11-08 21:26:05 +01:00
Marco Pfatschbacher d62768abc9 Fix IOCounters for OpenBSD
Use SysctlRaw instead of Sysctl.
The latter assumes NUL terminated strings
which returns the lenght off by one.
Therefore, only n-1 disks where reported.
2017-11-08 20:52:36 +01:00
shawnps befc2c3d92 call Fatal if length of Users() is 0 2017-11-08 13:29:49 +09:00
tycho garen 08a382b207 make process.processes function public 2017-11-05 20:40:33 -05:00
shirou dc3a09c1d0 [host] linux: change file if in a lxc container. 2017-10-22 16:39:36 +09:00
shirou 48fc561289 add HOST_VAR to README 2017-10-19 00:04:09 +09:00
shirou 232ceb4667 update README. 2017-10-19 00:02:22 +09:00
shirou a0823a75b1 Merge pull request #438 from mlkm/processtimes-win
Implement Process.Times for Windows
2017-10-18 23:59:27 +09:00
shirou 4f3240425b Merge pull request #439 from danielnelson/add-host-var-envvar
Add HOST_VAR envvar and use to locate utmp on Linux.
2017-10-17 07:48:22 +09:00
Daniel Nelson df2f1a8dd1
Add HOST_VAR envvar and use to locate utmp on Linux. 2017-10-16 14:53:14 -07:00
mlkm b9ab45bcdd Implement Process.Times for Windows 2017-10-13 16:17:51 +02:00
shirou f23a6bd2fa Merge pull request #436 from john-m-liu/patch-1
Improve performance of finding child processes on Windows
2017-10-12 21:48:05 +09:00
shirou 8f7dc4e5a1 Merge pull request #432 from stevenh/raw-sysctl
Eliminate use of sysctl command on FreeBSD
2017-10-08 20:41:15 +09:00
shirou e01a14e318 [net] linux: skip if permission error on getProcInodesAll
This fixes #433
2017-10-07 11:42:26 +09:00
John Liu d28c254aaf Improve performance of finding child processes on Windows 2017-10-06 12:23:54 -04: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 a6cc94f428 update README about thread and cmdline. 2017-10-05 10:42:53 +09:00
shirou fa0e9fd921 Merge pull request #428 from Leonid99/threads
Implement Threads() in Linux
2017-10-05 08:03:32 +09:00
shirou 1873a1fd4f Merge pull request #431 from Leonid99/whitespace
process.go: reformat whitespaces to keep gofmt happy
2017-10-05 08:03:01 +09:00
Leonid Podolny 4269f19b1b process.go: reformat whitespaces to keep gofmt happy 2017-10-04 15:46:49 -04:00
Leonid Podolny 7ee4a4c6ff Fix Threads() signature to better match python original 2017-10-04 15:38:01 -04:00
Leonid Podolny 7ad3836ad3 Implement Threads() for Linux 2017-10-04 15:38:01 -04:00
WAKAYAMA shirou 1ba77cdb3d [load] freebsd: change to use x/sys/unix.SysctlRaw.
This implementation is borrowed from NodeExporter.
https://github.com/prometheus/node_exporter/blob/master/collector/loadavg_freebsd.go
2017-10-04 22:34:47 +09:00