{"id":21149136,"url":"https://github.com/open-southeners/machine-stats","last_synced_at":"2026-04-19T03:06:34.675Z","repository":{"id":115721005,"uuid":"592102729","full_name":"open-southeners/machine-stats","owner":"open-southeners","description":"A platform agnostic machine stats generator. Usage and totals for cpu, disk, memory...","archived":false,"fork":false,"pushed_at":"2023-10-30T15:26:36.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T07:44:32.011Z","etag":null,"topics":["cpu-usage","disk-usage","linux","machine-stats","macos","memory-usage","resources-usage","windows"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/open-southeners.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-22T22:56:43.000Z","updated_at":"2023-10-30T12:15:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"eb38f192-1dc0-4a8c-830a-0acf931641f9","html_url":"https://github.com/open-southeners/machine-stats","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":"open-southeners/php-package-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-southeners%2Fmachine-stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-southeners%2Fmachine-stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-southeners%2Fmachine-stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-southeners%2Fmachine-stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/open-southeners","download_url":"https://codeload.github.com/open-southeners/machine-stats/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243589328,"owners_count":20315471,"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":["cpu-usage","disk-usage","linux","machine-stats","macos","memory-usage","resources-usage","windows"],"created_at":"2024-11-20T09:32:29.475Z","updated_at":"2026-04-19T03:06:34.599Z","avatar_url":"https://github.com/open-southeners.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Machine Stats [![required php version](https://img.shields.io/packagist/php-v/open-southeners/machine-stats)](https://www.php.net/supported-versions.php) [![codecov](https://codecov.io/gh/open-southeners/machine-stats/branch/main/graph/badge.svg?token=DGZOCVFLWR)](https://codecov.io/gh/open-southeners/machine-stats) [![Edit on VSCode online](https://img.shields.io/badge/vscode-edit%20online-blue?logo=visualstudiocode)](https://vscode.dev/github/open-southeners/machine-stats)\n===\n\nA platform agnostic machine stats generator (PHP 8.1+). Usage and totals for CPU, disk, memory...\n\n## Getting started\n\n```bash\ncomposer require open-southeners/machine-stats\n```\n\n### Usage\n\n```php\nuse OpenSoutheners\\MachineStats\\StatsManager;\n\n$report = StatsManager::report();\n\n$report-\u003eos-\u003evalue; // 'linux'\n$report-\u003ecpuCores; // 8\n$report-\u003ecpuUsage; // 17.12\n$report-\u003ememoryUnit-\u003ename; // 'GB'\n$report-\u003ememoryAvailable; // 11.89\n$report-\u003ememoryUsed; // 4.11\n$report-\u003ediskUnit-\u003ename; // 'GB'\n$report-\u003ediskCapacity; // 200\n$report-\u003ediskAvailable; // 189\n$report-\u003ediskUsed; // 11\n```\n\n#### Using Laravel\n\nIf you are using Laravel you can simply inject 2 instances into [Laravel's container](https://laravel.com/docs/10.x/container). Add the following on your `AppServiceProvider.php` file at the `register` method:\n\n```php\nuse OpenSoutheners\\MachineStats\\StatsManager;\nuse OpenSoutheners\\MachineStats\\Drivers\\DriverInterface;\n\n$this-\u003eapp-\u003ebind(StatsManager::class, fn () =\u003e new StatsManager);\n$this-\u003eapp-\u003ebind(DriverInterface::class, fn (Application $app) =\u003e $app-\u003emake(StatsManager::class)-\u003egetDriver());\n```\n\n**Note: StatsManager is only a wrapper to the Driver, it mimics the Manager code design pattern that Laravel uses in many places like DB, Filesystem, etc. In our case we needed to separate between operating systems (as drivers).**\n\n## Partners\n\n[![skore logo](https://github.com/open-southeners/partners/raw/main/logos/skore_logo.png)](https://getskore.com)\n\n## License\n\nThis package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-southeners%2Fmachine-stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopen-southeners%2Fmachine-stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-southeners%2Fmachine-stats/lists"}