{"id":47669885,"url":"https://github.com/chrisbraddock/node-cgmon","last_synced_at":"2026-04-02T12:29:44.088Z","repository":{"id":13105173,"uuid":"15786709","full_name":"chrisbraddock/node-cgmon","owner":"chrisbraddock","description":"a utility intended to monitor and maximize uptime of cgminer under linux","archived":false,"fork":false,"pushed_at":"2014-02-26T20:24:42.000Z","size":312,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-04-08T16:06:13.720Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chrisbraddock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-10T02:54:45.000Z","updated_at":"2014-02-26T20:24:42.000Z","dependencies_parsed_at":"2022-08-23T18:11:14.935Z","dependency_job_id":null,"html_url":"https://github.com/chrisbraddock/node-cgmon","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/chrisbraddock/node-cgmon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisbraddock%2Fnode-cgmon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisbraddock%2Fnode-cgmon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisbraddock%2Fnode-cgmon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisbraddock%2Fnode-cgmon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrisbraddock","download_url":"https://codeload.github.com/chrisbraddock/node-cgmon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisbraddock%2Fnode-cgmon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31306039,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T09:48:21.550Z","status":"ssl_error","status_checked_at":"2026-04-02T09:48:19.196Z","response_time":89,"last_error":"SSL_read: 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":[],"created_at":"2026-04-02T12:29:43.410Z","updated_at":"2026-04-02T12:29:44.069Z","avatar_url":"https://github.com/chrisbraddock.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-cgmon\n\n**node-cgmon is a utility intended to monitor [cgminer](https://github.com/ckolivas/cgminer) or [sgminer](https://github.com/veox/sgminer) under linux and maximize its uptime**\n\n*(developed and tested mainly against cgminer 3.7.2 performing scrypt-based mining)*\n\n## What it Does\n\nnode-cgmon starts a cgminer or sgminer [screen](http://en.wikipedia.org/wiki/GNU_Screen) instance then monitors mining status via process inspection and the cgminer/sgminer APIs. node-cgmon looks for different indicators of miner failure such as high GPU temp, high fan speed, API disconnect and attempts recovery and/or reboot in order to continue mining.\n\nnode-cgmon can also log output to help diagnose mining failures and will also send email notifications so you can take action if mining stops.\n\n## Prerequisites\n* **OSX or linux host operating system** *(node-cgmon has been tested only on OSX 10.9 and Xubuntu linux 13.10)*\n* [node](http://nodejs.org/)\n* [npm](https://npmjs.org/)\n* [screen](http://en.wikipedia.org/wiki/GNU_Screen)\n\n\n## Usage\n\n1. **copy config/config.sample.json** to **config/config.json**\n2. **override any config values needed in config/config.json** (see the CONFIG section in cgmon.js for values you can use here)\n\n   example config/config.json:\n\n       {\n           \"minerName\": \"my miner\",\n           \"email\": {\n               \"user\": \"youremail@gmail.com\",\n               \"pass\": \"your gmail password\",\n               \"from\": \"from email address\",\n               \"to\": \"to email address\"\n           }\n       }\n\n3. **copy start_miner_example.sh** to **start_miner.sh**\n4. **edit start_miner.sh** for your environment; *modify the paths to cgminer\n   and you cgminer configuration file;* **NOTE: make sure to leave '--api-listen'\n   on the cgminer command**\n5. run `npm install` *(from node-cgmon directory)* to install node-cgmon dependencies\n6. run cgmon-node *(from node-cgmon directory)*: `node cgmon.js`\n7. `screen -r cgminer` should attach to your cgminer screen instance and show you standard\n   cgminer output *(CTRL+A CTRL+D) to detatch*\n\n**NOTE:** if you run this node process under a non-superuser, you must give node permissions to reboot the system:\n\n    sudo setcap CAP_SYS_BOOT=+ep /path/to/node/binary\n\n## TODO\n\n* restart cgminer if hasrate falls below a threshold (currently only warns via email)\n* restart cgminer if total shares stop increasing based on a threshold\n* switch to basic smtp vs. Gmail-only\n* break up monitor() method\n* check that scripts are executable\n* fix janky arguments passing in api() method\n* figure out jQuery deferreds mess\n* decide what should be done if gpu count is wrong\n* email for coin changes (not sure how to do this via information reported from coin()\n* periodic restart/reboot?\n\n## Credits\n\nnode-cgmon was inspired by [cgmon.tcl](https://bitcointalk.org/index.php?topic=353436.0) and borrows concepts from [CGWatcher](https://github.com/justinmilone/CGWatcher).\n\nnode-cgmon leverages a few Node modules but most notably, [node-cgminer](https://github.com/tlrobinson/node-cgminer) which eliminated a nice bit of work.\n\n\n## License\n\nThe content of this project itself is licensed under the [Creative Commons Attribution 3.0 license](http://creativecommons.org/licenses/by/3.0/us/deed.en_US), and the underlying source code used to format and display that content is licensed under the [MIT license](http://opensource.org/licenses/mit-license.php).\n\n---\n\nIf you find this software useful, donations are welcome at:\n\nBTC `1JqsUozh2EZVWqA4RxdnsUSNvmEwpFAhWP`\n\nLTC `LLoCXwYRBQGL44vGZWRYrsScweYJzkcvqh`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisbraddock%2Fnode-cgmon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrisbraddock%2Fnode-cgmon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisbraddock%2Fnode-cgmon/lists"}