{"id":28501880,"url":"https://github.com/fluent/sigdump","last_synced_at":"2025-12-12T01:02:23.063Z","repository":{"id":50117184,"uuid":"9630008","full_name":"fluent/sigdump","owner":"fluent","description":"Use signal to show stacktrace of a Ruby process without restarting it","archived":false,"fork":false,"pushed_at":"2023-07-03T06:39:40.000Z","size":28,"stargazers_count":190,"open_issues_count":10,"forks_count":29,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-04-22T00:17:27.627Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/fluent.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-04-23T18:19:42.000Z","updated_at":"2025-02-15T10:12:58.000Z","dependencies_parsed_at":"2024-06-18T12:42:01.588Z","dependency_job_id":"5ddd8aef-0f49-407b-94e7-319d0a5ca5fa","html_url":"https://github.com/fluent/sigdump","commit_stats":null,"previous_names":["frsyuki/sigdump"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluent%2Fsigdump","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluent%2Fsigdump/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluent%2Fsigdump/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluent%2Fsigdump/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fluent","download_url":"https://codeload.github.com/fluent/sigdump/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250366701,"owners_count":21418769,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-06-08T16:08:16.762Z","updated_at":"2025-12-12T01:02:23.029Z","avatar_url":"https://github.com/fluent.png","language":"Ruby","readme":"# sigdump\n\nIn short: *SIGQUIT of Java VM for Ruby.*\n\nServer applications (like Rails apps) cause performance problems, deadlock or memory swapping from time to time. But it's difficult to reproduce such kind of problems. `sigdump` makes it possible to get information from a running process without restarting. Just sending `SIGCONT` signal will dump backtrace and memory profile to `/tmp/sigdump-\u003cpid\u003e.log` file.\n\n`sigdump` dumps following information (see also [Sample output](#sample-outout)):\n\n* Backtrace of all threads\n* Number of allocated objects per class\n* GC profiler reports if GC profiler is enabled (`GC::Profiler.enable` is called)\n* Stacktrace of Java threads for each Ruby threads if the runtime is JRuby\n\n## Install\n\nJust install `sigdump` gem and add `require 'sigdump/setup'` line to your code. Or you can use Bundler as following:\n\n```ruby\n# Gemfile\ngem 'sigdump', require: 'sigdump/setup'\n```\n\nNote for [Resque](https://github.com/resque/resque):\n\nYou need to change the default signal (`SIGCONT`) because Rescue traps `SIGCONT` and it conflicts with sigdump.\nTo change the signal, set name of a signal to `SIGDUMP_SIGNAL` environment variable. For Rails, you can add following lines to `environment.rb` file:\n\n```ruby\n# setup sigdump: https://github.com/frsyuki/sigdump\nENV['SIGDUMP_SIGNAL'] = 'TSTP'\nrequire 'sigdump/setup'\n```\n\n## Usage\n\nSend `SIGCONT` signal to the Ruby process. It dumps backtrace and memory profile to `/tmp/sigdump-\u003cpid\u003e.log` file.\n\n```shell\n$ kill -CONT \u003cpid\u003e\n$ cat /tmp/sigdump-\u003cpid\u003e.log\n```\n\nSet `SIGDUMP_SIGNAL` environment variable to change the signal (default: SIGCONT).\n\nSet `SIGDUMP_PATH` environment variable to change the output path (default: /tmp/sigdump-\\\u003cpid\\\u003e.log). You can set \"-\" here to dump to STDOUT, or \"+\" to STDERR.\n\n## Sample outout\n\n    $ cat /tmp/sigdump-9218.log\n    Sigdump at 2013-04-24 16:57:12 +0000 process 9218 (unicorn worker[3] -E staging -c /etc/unicorn/staging.rb -E staging)\n      Thread #\u003cThread:0x00000001424518\u003e status=run priority=0\n          /srv/staging/current/vendor/bundle/ruby/1.9.1/gems/sigdump-0.1.0/lib/sigdump.rb:32:in `dump_backtrace'\n          /srv/staging/current/vendor/bundle/ruby/1.9.1/gems/sigdump-0.1.0/lib/sigdump.rb:19:in `block in dump_all_thread_backtrace'\n          /srv/staging/current/vendor/bundle/ruby/1.9.1/gems/sigdump-0.1.0/lib/sigdump.rb:18:in `each'\n          /srv/staging/current/vendor/bundle/ruby/1.9.1/gems/sigdump-0.1.0/lib/sigdump.rb:18:in `dump_all_thread_backtrace'\n          /srv/staging/current/vendor/bundle/ruby/1.9.1/gems/sigdump-0.1.0/lib/sigdump.rb:9:in `block (2 levels) in install_thread_dump_handler'\n          /srv/staging/current/vendor/bundle/ruby/1.9.1/gems/sigdump-0.1.0/lib/sigdump.rb:91:in `open'\n          /srv/staging/current/vendor/bundle/ruby/1.9.1/gems/sigdump-0.1.0/lib/sigdump.rb:91:in `_open_dump_path'\n          /srv/staging/current/vendor/bundle/ruby/1.9.1/gems/sigdump-0.1.0/lib/sigdump.rb:7:in `block in install_thread_dump_handler'\n          /srv/staging/current/vendor/bundle/ruby/1.9.1/gems/unicorn-4.3.1/lib/unicorn/http_server.rb:626:in `call'\n          /srv/staging/current/vendor/bundle/ruby/1.9.1/gems/unicorn-4.3.1/lib/unicorn/http_server.rb:626:in `select'\n          /srv/staging/current/vendor/bundle/ruby/1.9.1/gems/unicorn-4.3.1/lib/unicorn/http_server.rb:626:in `worker_loop'\n          /srv/staging/current/vendor/bundle/ruby/1.9.1/gems/unicorn-4.3.1/lib/unicorn/http_server.rb:487:in `spawn_missing_workers'\n          /srv/staging/current/vendor/bundle/ruby/1.9.1/gems/unicorn-4.3.1/lib/unicorn/http_server.rb:137:in `start'\n          /srv/staging/current/vendor/bundle/ruby/1.9.1/gems/unicorn-4.3.1/bin/unicorn:121:in `\u003ctop (required)\u003e'\n          /srv/staging/current/vendor/bundle/ruby/1.9.1/bin/unicorn:23:in `load'\n          /srv/staging/current/vendor/bundle/ruby/1.9.1/bin/unicorn:23:in `\u003cmain\u003e'\n      GC stat:\n          count: 34\n          heap_allocated_pages: 1366\n          heap_sorted_length: 1368\n          heap_allocatable_pages: 0\n          heap_available_slots: 556777\n          heap_live_slots: 551708\n          heap_free_slots: 5069\n          heap_final_slots: 0\n          heap_marked_slots: 363350\n          heap_swept_slots: 58807\n          heap_eden_pages: 1366\n          heap_tomb_pages: 0\n          total_allocated_pages: 1367\n          total_freed_pages: 1\n          total_allocated_objects: 2438499\n          total_freed_objects: 1886791\n          malloc_increase_bytes: 650416\n          malloc_increase_bytes_limit: 16777216\n          minor_gc_count: 25\n          major_gc_count: 9\n          remembered_wb_unprotected_objects: 5122\n          remembered_wb_unprotected_objects_limit: 5222\n          old_objects: 348964\n      Built-in objects:\n       367,492: TOTAL\n       208,193: T_STRING\n        61,817: T_ARRAY\n        37,343: T_DATA\n        28,293: T_NODE\n        10,678: T_OBJECT\n         6,385: T_HASH\n         5,957: T_CLASS\n         2,300: T_ICLASS\n         2,184: T_REGEXP\n         1,547: T_MODULE\n           900: T_FLOAT\n           677: T_STRUCT\n           497: T_BIGNUM\n           432: T_MATCH\n           251: T_RATIONAL\n            29: T_FILE\n             8: FREE\n             1: T_COMPLEX\n      All objects:\n       207,335: String\n        32,987: Array\n        28,665: RubyVM::InstructionSequence\n         5,863: Hash\n         3,759: RubyVM::Env\n         3,680: Proc\n         2,338: Class\n         2,184: Regexp\n         1,632: MIME::Type\n         1,547: Module\n         1,040: Gem::Version\n           982: Gem::Requirement\n           945: Float\n           920: Journey::Nodes::Cat\n           804: Time\n           660: Gem::Dependency\n           497: Bignum\n      ...\n      String 7,556,137 bytes\n       Array 821 elements\n        Hash 90 pairs\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluent%2Fsigdump","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffluent%2Fsigdump","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluent%2Fsigdump/lists"}