Skip to content
/ sigprof Public

Golang user signal based package for collecting pprof information

License

Notifications You must be signed in to change notification settings

tam7t/sigprof

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sigprof

Join the chat at https://gitter.im/tam7t/sigprof Golang package for inspecting running processes. Similar to net/http/pprof but using USR1 and USR2 signals instead of HTTP server routes.

Usage

Link the package:

import _ "github.com/tam7t/sigprof"

Send the USR1 or USR2 signal to inspect the process.

kill -usr1 <golang process pid>

The default USR1 profile is goroutine. By default, sigprof will save results to timestamped files.

go tool pprof profile-<timestamp>.prof

Configuration

sigprof loads its configuration from the following environment variables.

  • USR1_PROF - Profile executed on the USR1 signal. Default: goroutine
  • USR2_PROF - Profile executed on the USR2 signal. Default: heap
  • SIG_PROF_OUT - Specify the output location, either file, stderr, or stdout. Default: file.

About

Golang user signal based package for collecting pprof information

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages