{"id":15984906,"url":"https://github.com/divineomega/php-server-info","last_synced_at":"2025-03-18T01:30:23.237Z","repository":{"id":56969699,"uuid":"201121922","full_name":"DivineOmega/php-server-info","owner":"DivineOmega","description":"Gets metrics on a server via an SSH connection","archived":false,"fork":false,"pushed_at":"2019-08-10T20:51:58.000Z","size":22,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-16T16:11:45.664Z","etag":null,"topics":["metrics","php-library","servers","ssh","ssh-connection"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DivineOmega.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":"2019-08-07T20:19:29.000Z","updated_at":"2019-10-22T14:32:23.000Z","dependencies_parsed_at":"2022-08-21T10:50:53.567Z","dependency_job_id":null,"html_url":"https://github.com/DivineOmega/php-server-info","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DivineOmega%2Fphp-server-info","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DivineOmega%2Fphp-server-info/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DivineOmega%2Fphp-server-info/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DivineOmega%2Fphp-server-info/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DivineOmega","download_url":"https://codeload.github.com/DivineOmega/php-server-info/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244138997,"owners_count":20404437,"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":["metrics","php-library","servers","ssh","ssh-connection"],"created_at":"2024-10-08T02:11:13.194Z","updated_at":"2025-03-18T01:30:22.944Z","avatar_url":"https://github.com/DivineOmega.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Server Info\n\n## Installation\n\n```bash\ncomposer require divineomega/php-server-info\n```\n\n## Usage\n\n```php\n\u003c?php\n\nuse DivineOmega\\ServerInfo\\Server;\nuse DivineOmega\\SSHConnection\\SSHConnection;\n\nrequire_once __DIR__.'/../vendor/autoload.php';\n\n$connection = (new SSHConnection())\n    -\u003eto('example.com')\n    -\u003eas('username')\n    -\u003ewithPrivateKey('/home/user/.ssh/id_rsa');\n\n$array = (new Server($connection))\n    -\u003emetrics()\n    -\u003etoArray();\n\nvar_dump($array);\n```\n\n```php\narray(14) {\n  [\"uptime\"]=\u003e\n  int(7564013)\n  [\"hostname\"]=\u003e\n  string(11) \"example\"\n  [\"disk-usage-percentage\"]=\u003e\n  int(29)\n  [\"total-disk-space-bytes\"]=\u003e\n  int(18045964)\n  [\"memory-usage-percentage\"]=\u003e\n  int(37)\n  [\"total-memory-bytes\"]=\u003e\n  int(1009128)\n  [\"swap-usage-percentage\"]=\u003e\n  int(26)\n  [\"total-swap-bytes\"]=\u003e\n  int(1048572)\n  [\"mysql-server-running\"]=\u003e\n  bool(true)\n  [\"apache-server-running\"]=\u003e\n  bool(false)\n  [\"nginx-server-running\"]=\u003e\n  bool(true)\n  [\"active-http-connections\"]=\u003e\n  int(0)\n  [\"load-averages\"]=\u003e\n  array(3) {\n    [1]=\u003e\n    float(0.13)\n    [5]=\u003e\n    float(0.19)\n    [15]=\u003e\n    float(0.13)\n  }\n  [\"cpu-usage-percentage\"]=\u003e\n  float(6.2)\n}\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivineomega%2Fphp-server-info","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdivineomega%2Fphp-server-info","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivineomega%2Fphp-server-info/lists"}