{"id":20916073,"url":"https://github.com/pigloverabbit520/salamandergomonitor","last_synced_at":"2025-06-17T06:36:17.343Z","repository":{"id":181814641,"uuid":"125333731","full_name":"pigLoveRabbit520/SalamanderGoMonitor","owner":"pigLoveRabbit520","description":"基于go获得Linux系统负载， web","archived":false,"fork":false,"pushed_at":"2018-03-15T11:56:04.000Z","size":5,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-19T16:26:15.815Z","etag":null,"topics":["go","golang","rest-api"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/pigLoveRabbit520.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,"governance":null}},"created_at":"2018-03-15T08:13:05.000Z","updated_at":"2021-08-09T00:17:58.000Z","dependencies_parsed_at":"2023-07-17T15:37:51.990Z","dependency_job_id":null,"html_url":"https://github.com/pigLoveRabbit520/SalamanderGoMonitor","commit_stats":null,"previous_names":["pigloverabbit520/salamandergomonitor"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pigLoveRabbit520%2FSalamanderGoMonitor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pigLoveRabbit520%2FSalamanderGoMonitor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pigLoveRabbit520%2FSalamanderGoMonitor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pigLoveRabbit520%2FSalamanderGoMonitor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pigLoveRabbit520","download_url":"https://codeload.github.com/pigLoveRabbit520/SalamanderGoMonitor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243308517,"owners_count":20270434,"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":["go","golang","rest-api"],"created_at":"2024-11-18T16:19:36.570Z","updated_at":"2025-03-12T23:20:16.230Z","avatar_url":"https://github.com/pigLoveRabbit520.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SalamanderGoMonitor\n基于go获得Linux系统负载（通过Linux ps命令）， web接口\n\n# API\n\n## GET /info\n## 参数\n|参数名|必选|类型|说明|\n|--- |--- |--- |--- |\n|sort|是|string|按什么排序，可为mem（内存），cpu|\n|num|是|int|限制行数|\n\n## 返回示例\n```\n查询成功\n{\n    \"errcode\": 0,\n    \"errmsg\": \"success\",\n    \"res\": \"USER        PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND\\nroot         12  0.0  0.3 157948  7932 pts/0    Ss+  11:50   0:00 curl -s localhost:8888/info?sort=mem\\u0026num=10\\nroot          1  0.4  0.2  48064  5852 ?        Ssl  11:50   0:00 ./app\\nroot         19  0.0  0.1  36632  2788 ?        R    11:50   0:00 ps -aux --sort -pmem\\nroot         18  0.0  0.0   4208   708 ?        S    11:50   0:00 head -10\\n\"\n}\n查询错误\n{\n    \"errno\":1,\n    \"errmsg\":\"sort不能为空\",\n    \"res\": \"\"\n}\n```\n## 返回参数说明\n|参数名|类型|说明|\n|--- |--- |--- |\n|errcode|int|错误码，0：成功；1：参数不正确 2:系统发生错误|\n|errmsg|string|错误信息|\n|res|string|查询结果，就是ps命令里的内容|\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpigloverabbit520%2Fsalamandergomonitor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpigloverabbit520%2Fsalamandergomonitor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpigloverabbit520%2Fsalamandergomonitor/lists"}