Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 619 Bytes

README.md

File metadata and controls

36 lines (25 loc) · 619 Bytes

Go process inspector

Overview

Go process inspector exposes process data on Linux and macOS with a common API.

Inspired by sys-proctable.

Example

  cmd := exec.Command("sleep", "5")
  cmd.Start()

  if process := proc.GetProcess(cmd.Process.Pid); process != nil {
    process.Pid # <pid>
    process.Command # "sleep"
    process.ComandLine # []string{"sleep", "5"}
  }
  for _, p := range proc.GetAllProcesses() {
    p.Pid
    p.Command
    p.CommandLine
  }

Supported platforms

Modern flavours of darwin and linux.

License

Apache 2.0