PHPackages                             anpk12/sysinfo - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. anpk12/sysinfo

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

anpk12/sysinfo
==============

Reads info about memory usage, cpu, load etc

v1.0(10y ago)0105GPL-3.0PHPPHP &gt;=5.4

Since Apr 9Pushed 10y ago1 watchersCompare

[ Source](https://github.com/anpk12/sysinfo)[ Packagist](https://packagist.org/packages/anpk12/sysinfo)[ Docs](https://github.com/anpk12/sysinfo.git)[ RSS](/packages/anpk12-sysinfo/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (3)Used By (0)

[![Build Status](https://camo.githubusercontent.com/b457589d0c45f8d930ebc114c5a7e1978233a68811e1463b4ca0631e7b8fd90c/68747470733a2f2f7472617669732d63692e6f72672f616e706b31322f737973696e666f2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/anpk12/sysinfo)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/de8811667337a6739c4d476d0d5ce3cf0214c231004d0605c411f1f6b6a78bef/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616e706b31322f737973696e666f2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/anpk12/sysinfo/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/4b8a2ddf06c3226a75c91a34e291a1ca34e756364aba47fc1cf7b183bbfaa4a0/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616e706b31322f737973696e666f2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/anpk12/sysinfo/?branch=master)

This is a simple script for retrieving information about the host system that the code (typically web application) is running on, so that it can be presented on a web page, and/or graphed over time. Or perhaps it can be used to detect situations where the system is running low on resources.

It is made as part of an online course in web development. So I was forced to make this available on github and packagist. Maybe it can be useful for someone.

Note that it is intended for Linux host systems and no effort has been made to make it work for other host operating systems.

HOW TO USE WITH ANAX-MVC

Clone the Anax-MVC git repository using

$ git clone  Anax-MVC.git

Then add the following line to the "require" property of Anax-MVC.git/composer.json:

"anpk12/sysinfo": "dev-master"

The part after the colon is the version requirement and can optionally be changed to a fixed version such as "1.0.0".

Validate your composer.json file:

$ composer validate

If it succeeds, update:

$ composer update

Now, to see if it works, you need to integrate anpk12\\sysinfo into a route. We will take the easiest route possible to create a working demo.

Make a copy of webroot/hello.php, call it webroot/hello\_sysinfo.php . After the line that starts with "require", create an instance of Anpk12\\Sysinfo\\Snapshot:

$sysinfo = new Anpk12\\Sysinfo\\Snapshot();

This will create a snapshot of the current system status, which we can then use to generate html, graphs/images or database entries etc.

The Snapshot class provides easy access to the various types of system information it collects through accessors.

But it can also generate a complete html report using all the information. This is done using the htmlReport() member function. Add the following line to hello\_sysinfo.php, just after the creation of the Snapshot instance:

$sysReport = $sysinfo-&gt;htmlReport(false)

The boolean argument controls whether or not to create a short summary (true) or a full report (false).

The variable $sysReport now holds a string of html markup, which we can tell Anax-MVC to render. Simply change the title and main variables of the theme:

// Prepare the page content $app-&gt;theme-&gt;setVariable('title', "Hello World Sysinfo") -&gt;setVariable('main', $sysreport);

Done! Try accessing Anax-MVC.git/webroot/hello\_sysinfo.php with a web browser. You should see current memory usage etc.

In order to access the system information directly instead of generating html, use the Snapshot member functions meminfo(), memTotal(), memAvailable() and loadavg() .

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3728d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c308e1b138ab3e70439ee44b632d9769713f251652fe91b5573510bcceabe12d?d=identicon)[anpk12](/maintainers/anpk12)

---

Top Contributors

[![antonp](https://avatars.githubusercontent.com/u/290151?v=4)](https://github.com/antonp "antonp (12 commits)")

---

Tags

memoryCPUloadsysinfo

### Embed Badge

![Health badge](/badges/anpk12-sysinfo/health.svg)

```
[![Health](https://phpackages.com/badges/anpk12-sysinfo/health.svg)](https://phpackages.com/packages/anpk12-sysinfo)
```

###  Alternatives

[fidry/cpu-core-counter

Tiny utility to get the number of CPU cores.

241163.0M34](/packages/fidry-cpu-core-counter)[flow-php/etl

PHP ETL - Extract Transform Load - Abstraction

377559.7k86](/packages/flow-php-etl)[lorisleiva/lody

Load files and classes as lazy collections in Laravel.

957.5M14](/packages/lorisleiva-lody)[marquine/php-etl

Extract, Transform and Load data using PHP.

182138.0k](/packages/marquine-php-etl)[internal/destroy

561.3M14](/packages/internal-destroy)[fab2s/yaetl

Widely Extended Nodal Extract-Transform-Load ETL Workflow AKA NEJQTL or Nodal-Extract-Join-Qualify-Tranform-Load

64187.4k](/packages/fab2s-yaetl)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
