PHPackages                             perf2k2/monitre - 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. perf2k2/monitre

ActiveLibrary

perf2k2/monitre
===============

PHP library for remote linux monitoring/diagnostic with no installation needed

0.2.0(6y ago)05[1 PRs](https://github.com/perf2k2/monitre/pulls)MITPHPPHP &gt;=7.2CI passing

Since Sep 29Pushed 3mo agoCompare

[ Source](https://github.com/perf2k2/monitre)[ Packagist](https://packagist.org/packages/perf2k2/monitre)[ RSS](/packages/perf2k2-monitre/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (5)Used By (0)

Monitre
=======

[](#monitre)

[![Build Status](https://camo.githubusercontent.com/0e466cd5ed78f12e3fea9b34b3fbc4b7dda6e6fdc3ef6396e4c75d41dcd42814/68747470733a2f2f7472617669732d63692e6f72672f70657266326b322f6d6f6e697472652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/perf2k2/monitre)

### About

[](#about)

Library for connecting to remote linux systems and reading key performance and other metrics. Maybe useful for periodic checking remote machine state and logging situations with wrong values.

### How it works

[](#how-it-works)

It uses classes called "monitors" for checking metrics. After connecting to remote host by ssh, monitor runs linux command and parse output for getting information.

### List of monitors

[](#list-of-monitors)

- Memory
    - Usage percent
- Disk
    - Usage percent (by mount path)
- File (by absolute path)
    - Size
    - Modify time
    - Content
    - Last lines
    - Header lines

### Requirements

[](#requirements)

- PHP &gt;= 7.2
- ext-ssh2

### Installation

[](#installation)

```
composer require perf2k2/monitre
```

### Usage

[](#usage)

```
$logger = new Logger();
$server = new Connection('ip', new PasswordAuthenticator('user', 'password'));

$memoryMonitor = new MemoryUsageMonitor($server);
if ($memoryMonitor->getUsagePercent() > 90) {
    $logger->warning('High memory usage!');
}

$diskMonitor = new DiskUsageMonitor($server);
if ($diskMonitor->getUsagePercent() > 90) {
    $logger->warning('High disk usage!');
}

$fileMonitor = new FileMonitor($server, '/path/to/file');
if ($fileMonitor->getSize()->asMegabytes() > 100) {
    $logger->warning('File too large!');
}
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance57

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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

Every ~9 days

Total

2

Last Release

2404d ago

### Community

Maintainers

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

---

Top Contributors

[![perf2k2](https://avatars.githubusercontent.com/u/7932964?v=4)](https://github.com/perf2k2 "perf2k2 (37 commits)")

---

Tags

remote-monitoringlinux monitoringos monitoringremote diagnostic

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/perf2k2-monitre/health.svg)

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

PHPackages © 2026

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