{"id":37114154,"url":"https://github.com/rohankmr414/sigdump","last_synced_at":"2026-01-14T13:26:35.027Z","repository":{"id":65187317,"uuid":"584553693","full_name":"rohankmr414/sigdump","owner":"rohankmr414","description":"Use signal to show stacktrace of a Go process without restarting it","archived":false,"fork":false,"pushed_at":"2023-01-10T20:47:05.000Z","size":10,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-20T12:04:16.886Z","etag":null,"topics":["debugging","go","golang","sigdump","stacktrace"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/rohankmr414/sigdump","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rohankmr414.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2023-01-02T22:38:16.000Z","updated_at":"2023-08-21T17:29:49.000Z","dependencies_parsed_at":"2023-02-08T20:15:28.855Z","dependency_job_id":null,"html_url":"https://github.com/rohankmr414/sigdump","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/rohankmr414/sigdump","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohankmr414%2Fsigdump","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohankmr414%2Fsigdump/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohankmr414%2Fsigdump/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohankmr414%2Fsigdump/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rohankmr414","download_url":"https://codeload.github.com/rohankmr414/sigdump/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohankmr414%2Fsigdump/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28421173,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debugging","go","golang","sigdump","stacktrace"],"created_at":"2026-01-14T13:26:34.333Z","updated_at":"2026-01-14T13:26:34.996Z","avatar_url":"https://github.com/rohankmr414.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sigdump\n\n`sigdump` is a Go package that captures and dumps the stack trace and memory profile to a file when a specified signal\nis received. It is inspired by the [fluent/sigdump](https://github.com/fluent/sigdump) gem for Ruby.\n\n## Installation\n\n```bash\n$ go get github.com/rohankmr414/sigdump\n```\n\n## Usage\n\nTo use `sigdump`, import the package and call the Start function at the beginning of your program:\n\n```bash\nimport \"github.com/rohankmr414/sigdump\"\n\nfunc main() {\n\tsigdump.Start()\n\t// Rest of your program goes here...\n}\n```\n\nBy default, `sigdump` will listen for the `SIGCONT` signal and print the stack trace to a file in the `/tmp` directory\nwhen the signal is received. To listen for a different signal, set the `SIGDUMP_SIGNAL` environment variable to the\nsignal name you want to listen for. For example, to listen for the SIGINT signal (Ctrl+C), you can set the environment\nvariable like this:\n\n```bash\n$ SIGDUMP_SIGNAL=SIGINT myprogram\n```\n\nTo specify a different path to write the stack trace to, set the `SIGDUMP_PATH` environment variable to the desired\npath. The special values \"-\" and \"+\" can be used to write the stack trace to `stdout` and `stderr`, respectively.\n\nFor example, to write the stack trace to a file in the `/var/log` directory, you can set the `SIGDUMP_PATH` environment\nvariable like this:\n\n```bash\n$ SIGDUMP_PATH=/var/log/sigdump.log myprogram\n```\n\n## Sample Output\n\n```\n$ cat /tmp/sigdump-8829.log\nSigdump time=2023-01-10T18:01:39+05:30 host=MacBook.local pid=8829 ppid=5521 signal=SIGCONT\n  goroutine 34 [running]:\n\tgithub.com/rohankmr414/sigdump.dumpStack({0x1002ed918?, 0x10035bcd8})\n\t\t/Users/rohan/Documents/code/personal/go-test/vendor/github.com/rohankmr414/sigdump/sigdump.go:46 +0x68\n\tgithub.com/rohankmr414/sigdump.Start.func1()\n\t\t/Users/rohan/Documents/code/personal/go-test/vendor/github.com/rohankmr414/sigdump/sigdump.go:39 +0x38\n\tcreated by github.com/rohankmr414/sigdump.Start\n\t\t/Users/rohan/Documents/code/personal/go-test/vendor/github.com/rohankmr414/sigdump/sigdump.go:36 +0xd4\n\n  goroutine 1 [sleep]:\n\ttime.Sleep(0x1bf08eb000)\n\t\t/usr/local/go/src/runtime/time.go:195 +0x118\n\tmain.main()\n\t\t/Users/rohan/Documents/code/personal/go-test/main.go:12 +0x2c\n\n  goroutine 33 [syscall]:\n\tos/signal.signal_recv()\n\t\t/usr/local/go/src/runtime/sigqueue.go:149 +0x2c\n\tos/signal.loop()\n\t\t/usr/local/go/src/os/signal/signal_unix.go:23 +0x1c\n\tcreated by os/signal.Notify.func1.1\n\t\t/usr/local/go/src/os/sig\n\n  Mem Stat:\n\tAlloc = 203440\n\tTotalAlloc = 203440\n\tSys = 8834064\n\tLookups = 0\n\tMallocs = 258\n\tFrees = 9\n\tHeapAlloc = 203440\n\tHeapSys = 3801088\n\tHeapIdle = 3096576\n\tHeapInuse = 704512\n\tHeapReleased = 3063808\n\tHeapObjects = 249\n\tStackInuse = 393216\n\tStackSys = 393216\n\tMSpanInuse = 37536\n\tMSpanSys = 48960\n\tMCacheInuse = 9600\n\tMCacheSys = 15600\n\tBuckHashSys = 3523\n\tGCSys = 3776672\n\tOtherSys = 795005\n\tNextGC = 4194304\n\tLastGC = 0\n\tPauseTotalNs = 0\n\tNumGC = 0\n\tGCCPUFraction = 0\n\tDebugGC = false\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohankmr414%2Fsigdump","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frohankmr414%2Fsigdump","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohankmr414%2Fsigdump/lists"}