.gitignore
Unix process parsing.travis.yml
Update .travis.ymlgo.mod
add go.modLICENSE.md
Licenseprocess_darwin_test.go
Add darwin testprocess_darwin.go
style nitpicksprocess_freebsd.go
Remove amd64 directiveprocess_linux.go
Separate linux specific Refresh methodprocess_solaris.go
Get rid of cgo dependencyprocess_test.go
Implement Windowsprocess_unix_test.go
Add solaris supportprocess_unix.go
It is not mandatory to verify whether the file in /proc is a directory -process_windows.go
Better error handlingprocess.go
Package docsREADME.md
Add GoDoc linkVagrantfile
Unix process parsingProcess List Library for Go
go-ps is a library for Go that implements OS-specific APIs to list and manipulate processes in a platform-safe way. The library can find and list processes on Linux, Mac OS X, Solaris, and Windows.
If you're new to Go, this library has a good amount of advanced Go educational value as well. It uses some advanced features of Go: build tags, accessing DLL methods for Windows, cgo for Darwin, etc.
How it works:
- Darwin uses the
sysctlsyscall to retrieve the process table. - Unix uses the procfs at
/procto inspect the process tree. - Windows uses the Windows API, and methods such as
CreateToolhelp32Snapshotto get a point-in-time snapshot of the process table.
Installation
Install using standard go get:
$ go get github.com/mitchellh/go-ps
...TODO
Want to contribute? Here is a short TODO list of things that aren't implemented for this library that would be nice:
- FreeBSD support
- Plan9 support