richbarrett / health-check
Very lightweight tool for checking some server level health data (designed to work with Ubuntu)
dev-master
2017-12-12 12:40 UTC
Requires
- php: >=5.6.0
This package is not auto-updated.
Last update: 2025-04-27 06:13:09 UTC
README
This is a very lightweight tool for checking some server health metrics (designed to work with Ubuntu).
Methods available
- diskSpacePercentageUsed
- diskSpaceFree
- diskSpaceTotal
- diskSpaceUsed
- memoryInfo
- totalMemory
- memoryPhysicallyFree
- memoryPhysicallyUsed
- memoryUsedPercentage
- loadAverages
Installation
You can install this with composer:
composer require richbarrett/HealthCheck
Usage
include_once('vendor/autoload.php'); $hc = new \richbarrett\HealthCheck\HealthCheck; echo 'Disk currently '. $hc->diskSpacePercentageUsed().'% full ('.$hc->diskSpaceFree().'gb available)';