{"id":18188891,"url":"https://github.com/mlafeldt/sysrq","last_synced_at":"2025-04-02T04:31:46.869Z","repository":{"id":57496897,"uuid":"109114757","full_name":"mlafeldt/sysrq","owner":"mlafeldt","description":"Go client to the Linux SysRq interface","archived":false,"fork":false,"pushed_at":"2017-11-06T10:21:17.000Z","size":36,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-16T10:24:47.689Z","etag":null,"topics":["chaos-engineering","golang","linux","sysrq"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mlafeldt.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":"2017-11-01T09:53:22.000Z","updated_at":"2022-11-20T17:00:55.000Z","dependencies_parsed_at":"2022-09-03T02:30:44.588Z","dependency_job_id":null,"html_url":"https://github.com/mlafeldt/sysrq","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlafeldt%2Fsysrq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlafeldt%2Fsysrq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlafeldt%2Fsysrq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlafeldt%2Fsysrq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlafeldt","download_url":"https://codeload.github.com/mlafeldt/sysrq/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246757470,"owners_count":20828904,"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":["chaos-engineering","golang","linux","sysrq"],"created_at":"2024-11-03T03:05:06.014Z","updated_at":"2025-04-02T04:31:41.861Z","avatar_url":"https://github.com/mlafeldt.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sysrq\n\n[![](https://travis-ci.org/mlafeldt/sysrq.svg?branch=master)](https://travis-ci.org/mlafeldt/sysrq)\n[![](https://img.shields.io/docker/pulls/mlafeldt/sysrq.svg?maxAge=604800)](https://hub.docker.com/r/mlafeldt/sysrq/)\n[![](https://godoc.org/github.com/mlafeldt/sysrq?status.svg)](https://godoc.org/github.com/mlafeldt/sysrq)\n\nGo client to perform low-level commands via the [Linux SysRq interface](https://github.com/torvalds/linux/blob/master/Documentation/admin-guide/sysrq.rst) (accessible at `/proc/sysrq-trigger`).\n\nAmong other things, SysRq can crash the system by forcing a NULL pointer dereference, which makes it a good fit for [Chaos Engineering experiments](https://medium.com/production-ready/chaos-engineering-101-1103059fae44).\n\n## CLI\n\nIn addition to the [Go library](https://godoc.org/github.com/mlafeldt/sysrq), there's a `sysrq` command-line tool you can install from source:\n\n```bash\ngo get -u github.com/mlafeldt/sysrq/cmd/sysrq\n```\n\nUse the tool to trigger one or more commands:\n\n```bash\nsudo sysrq \u003ccmd\u003e...\n```\n\nThis will print a list of all available commands:\n\n```bash\nsysrq -list\n```\n\n## Vagrant playground\n\nHere's how to run SysRq commands against a local Vagrant machine:\n\n```bash\n# Start Vagrant machine\nvagrant up\n\n# Trigger crash command\nmake trigger CMD=crash\n\n# Show system logs\nmake log\n...\nubuntu-xenial login: [   94.116848] sysrq: SysRq : Trigger a crash\n[   94.152571] BUG: unable to handle kernel NULL pointer dereference at           (null)\n[   94.263679] IP: [\u003cffffffff81504df6\u003e] sysrq_handle_crash+0x16/0x20\n...\n\n# Fix Vagrant machine\nvagrant reload\n```\n\n## Docker\n\nSince Docker mounts `/proc/sysrq-trigger` as read-only, you cannot run commands against other containers, but you can still affect the host system:\n\n```bash\ndocker run --rm -v /proc/sysrq-trigger:/sysrq -e TRIGGER_FILE=/sysrq mlafeldt/sysrq \u003ccmd\u003e...\n```\n\n## Author\n\nThis project is being developed by [Mathias Lafeldt](https://twitter.com/mlafeldt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlafeldt%2Fsysrq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlafeldt%2Fsysrq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlafeldt%2Fsysrq/lists"}