Skip to content

jviney/go-proc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Go library to expose process data on Mac OS and Linux.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages