Commit Graph

78 Commits (00957cfedcbe63524a680e52aaf369415dac308c)

Author SHA1 Message Date
Lomanic f586a57353
Merge pull request #796 from Lomanic/issue795
[process][darwin][openbsd][freebsd] Fix #795 don't truncate process names to 16 characters
5 years ago
Lomanic 8e4dde660a [process][darwin] Fix Test_Process_Status and Status returning more than status letter 5 years ago
Lomanic 4f0e679e35 [process][darwin][openbsd][freebsd] Fix #795 don't truncate process names to 16 characters 5 years ago
Lomanic 547679f88e [process] Fix #760 implement IsRunning by checking process with same PID has same CreateTime as current process 6 years ago
Lomanic 6f5b1dbee7 [darwin][process] Add cgo implementation of Exe() from PR #243
Original from ppanyukov 4473014098
6 years ago
Lomanic 3eefe64948 [process] Fix #752 sort PIDS returned by process.Pids() 6 years ago
Lomanic 3465186bca [process] Fix #729 check process existence in NewProcess() 6 years ago
Lomanic 0e0dd767df [process][darwin] Fix #670 remove call to common.Pipeline (prone to race condition)
Also properly parse lsof to get second txt record instead of hoping the 5th line is the right one (wrong data returned for pid 57)
6 years ago
Liam Xu 1b525b7c9c Return cpu time format error
Return cpu time format error
6 years ago
Liam Xu f2f18df9db Use Swith to replace if else
Use Swith to replace if else
6 years ago
Xu Lian 6eb4d73bde Fix an indentation issues 6 years ago
Liam Xu b3670f8027 Add hour handling in convertCPUTimes function
This commit add hour handling in convertCPUTimes function.

The time string usually comes from macOS command line:
ps -a -o stime,utime -p <pid>

which could contain hour string.
6 years ago
Lomanic 41e774419f
Merge pull request #643 from wcc526/master
Update process_linux.go for Add process ConnectionsMax
6 years ago
wcc526 462e0f6c2f Update process_linux.go for Add process ConnectionsMax 6 years ago
David Naylor 414c76f159 [process][linux] Export process page fault info
Add a function for retrieving page fault counts from /proc/[pid]/stat on
Linux.
6 years ago
Lomanic 8ef9b01052 Fix process.Foreground for BSDs, add openbsd implementation 6 years ago
Lomanic 878e0a701b Fix #596 Implement process.Background and process.Foreground functions 6 years ago
Lomanic e38ea9f318 [process] Don't lose context in ProcessesWithContext() on Windows and Linux 7 years ago
shirou 145dca90f7 change to use CommandContext. 7 years ago
shirou 6a368fb7cd [process]: add ProcessesWithContext. 7 years ago
shirou cd61c36c4f
Merge branch 'master' into feature/add_context_support 7 years ago
Nick Kirsch 6c35887d02 Add ErrNotImplementedError to Darwin, FreeBSD, and OpenBSD. 7 years ago
shirou 4c73494c78 Add WithContext functions. 7 years ago
Sam Kleinman 4d92a03da8 fix cross compiles 7 years ago
tycho garen 08a382b207 make process.processes function public 7 years ago
Leonid Podolny 7ee4a4c6ff Fix Threads() signature to better match python original 8 years ago
Leonid Podolny 7ad3836ad3 Implement Threads() for Linux 8 years ago
shirou a452de7c73 Merge pull request #346 from phemmer/rlimit-current
add current values to rlimit retrieval
8 years ago
Chris Roberts 9c998f664a Fix process.Exe() on macOS 10.12
The `lsof` command on macOS < 10.12 always selects the `p` field
when using the `-F` option. On macOS 10.12 the `f` field is also
always selected causing an incorrect result. This modification adds
both options which are always selected to maintain consistency.
8 years ago
Sean Chittenden 635b971c0e
Move from the `syscall` package to the `golang.org/x/sys/{unix,windows}` 8 years ago
Patrick Hemmer 60c32eb847 add current values to rlimit retrieval 8 years ago
Sean Chittenden d0e40ff723
Fix issues reported by golint. 8 years ago
tycho garen 6110db7ab5 error earlier on darwin for get parent pid 8 years ago
Nex 189b8e6d12 Fixed missing bin and unused stderr 9 years ago
Nex b6a7649aab Error handling 9 years ago
Nex d9b355f75e Added proper piping of commands 9 years ago
Nex dd3cbcc611 Trying remove single quotes 9 years ago
Nex 1534b109ae Fixing pid name 9 years ago
Nex 8c3e7bd255 Casting pid properly 9 years ago
Nex 9659355f49 Checking content 9 years ago
Nex 8bb06aca3d Fixed type casting 9 years ago
Nex 5481d93989 Fixing assignment of vars 9 years ago
Nex 4f7834af25 Added attempt to get exe path from pid 9 years ago
Tom Elliott 1435987652 Correctly handle long running processes on OSX
The full etime format is dd-hh:mm:ss. Replacing '-' with ':' fixes parsing of this format.
9 years ago
Tom Elliott 3855e7ba0e Implement CreateTime for darwin. Parses elapsed time and converts this to epoch time. 9 years ago
Shirou WAKAYAMA 613a8a90e1 fixed by golint. 9 years ago
Shirou WAKAYAMA 944429d994 fixed by errcheck 9 years ago
Shirou WAKAYAMA 46ddd57c72 process has NetIOCounters and IOCounters. 9 years ago
Shirou WAKAYAMA ea152ea901 [BREAKING CHANGE] rename functions to pass golint. ex) net.NetIOCounters -> net.IOCounters 9 years ago
Chris Gilling 8c186ae593 process: add CmdlineSlice for darwin + windows
darwin will not perform correctly if there are spaces in the actual
arguments, in which case a single argument will be reported as
multple. Some CGO would be needed to get around this I think.

I couldn't find any good documentation on how windows handles
command line arguments with spaces inside the actual arguments, so
this implementation merely just splits on spaces.
9 years ago