• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.gitignoreH A D03-Feb-202010

.travis.ymlH A D03-Feb-202028

LICENSE.mdH A D03-Feb-20201.1 KiB

README.mdH A D03-Feb-20201.1 KiB

VagrantfileH A D03-Feb-20201.1 KiB

go.modH A D03-Feb-202043

process.goH A D03-Feb-20201.3 KiB

process_darwin.goH A D03-Feb-20202.1 KiB

process_darwin_test.goH A D03-Feb-2020135

process_freebsd.goH A D03-Feb-20205.3 KiB

process_linux.goH A D03-Feb-2020700

process_solaris.goH A D03-Feb-20202.8 KiB

process_test.goH A D03-Feb-2020701

process_unix.goH A D03-Feb-20201.5 KiB

process_unix_test.goH A D03-Feb-2020138

process_windows.goH A D03-Feb-20202.4 KiB

README.md

1# Process List Library for Go [![GoDoc](https://godoc.org/github.com/mitchellh/go-ps?status.png)](https://godoc.org/github.com/mitchellh/go-ps)
2
3go-ps is a library for Go that implements OS-specific APIs to list and
4manipulate processes in a platform-safe way. The library can find and
5list processes on Linux, Mac OS X, Solaris, and Windows.
6
7If you're new to Go, this library has a good amount of advanced Go educational
8value as well. It uses some advanced features of Go: build tags, accessing
9DLL methods for Windows, cgo for Darwin, etc.
10
11How it works:
12
13  * **Darwin** uses the `sysctl` syscall to retrieve the process table.
14  * **Unix** uses the procfs at `/proc` to inspect the process tree.
15  * **Windows** uses the Windows API, and methods such as
16    `CreateToolhelp32Snapshot` to get a point-in-time snapshot of
17    the process table.
18
19## Installation
20
21Install using standard `go get`:
22
23```
24$ go get github.com/mitchellh/go-ps
25...
26```
27
28## TODO
29
30Want to contribute? Here is a short TODO list of things that aren't
31implemented for this library that would be nice:
32
33  * FreeBSD support
34  * Plan9 support
35