{"id":18840220,"url":"https://github.com/maxim2266/rstat","last_synced_at":"2026-05-09T15:03:57.569Z","repository":{"id":57609667,"uuid":"101092032","full_name":"maxim2266/rstat","owner":"maxim2266","description":"Library \"rstat\" provides basic functionality for periodical health check of IoT devices running Linux.","archived":false,"fork":false,"pushed_at":"2021-07-22T21:46:12.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-30T09:42:17.472Z","etag":null,"topics":["golang","iot","linux","monitoring","monitoring-tool","raspberry-pi","ssh"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxim2266.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-08-22T17:52:31.000Z","updated_at":"2022-08-22T08:02:40.000Z","dependencies_parsed_at":"2022-08-27T11:32:26.831Z","dependency_job_id":null,"html_url":"https://github.com/maxim2266/rstat","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/maxim2266%2Frstat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxim2266%2Frstat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxim2266%2Frstat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxim2266%2Frstat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxim2266","download_url":"https://codeload.github.com/maxim2266/rstat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239777004,"owners_count":19695198,"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":["golang","iot","linux","monitoring","monitoring-tool","raspberry-pi","ssh"],"created_at":"2024-11-08T02:46:53.991Z","updated_at":"2026-01-29T14:30:15.033Z","avatar_url":"https://github.com/maxim2266.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rstat\n\n[![GoDoc](https://godoc.org/github.com/maxim2266/rstat?status.svg)](https://godoc.org/github.com/maxim2266/rstat)\n[![Go Report Card](https://goreportcard.com/badge/github.com/maxim2266/rstat)](https://goreportcard.com/report/github.com/maxim2266/rstat)\n\nLibrary `rstat` provides basic functionality for periodical health check of IoT devices running Linux.\nIt has an API for invoking `ps` command on a remote device via `ssh`, returning a process tree with the\nrequested metrics for each process.\n\n#### Usage example:\n\n```Go\n// compose ssh command with the given ip, user, password and timeout in seconds\nssh := rstat.SSHCommand(\"192.168.0.16\", \"pi\", \"raspberry\", 5)\n// request process tree with 3 metrics per process\nroot, err := rstat.ProcTree(ssh, \"%cpu\", \"%mem\", \"cmd\")\n\nif err != nil {\n\treturn err\n}\n\n// iterate the process tree\nroot.ForEach(func(node *rstat.ProcNode) {\n\t// just for example, print the metrics\n\tfmt.Printf(\"%d %s %s %s %q\\n\", node.Pid, node.ParentPid, node.Stats[\"%CPU\"], node.Stats[\"%MEM\"], node.Stats[\"CMD\"])\n})\n\n```\n\n### Project status\nThe project is in a alpha state. Tested on Linux Mint 18.2. Go version 1.8.\n\n##### Platform: Linux\n##### License: BSD\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxim2266%2Frstat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxim2266%2Frstat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxim2266%2Frstat/lists"}