PHPackages                             sd1328/admin-tools - 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. sd1328/admin-tools

ActiveLibrary

sd1328/admin-tools
==================

Server / Application Administration Components

01PHP

Since Mar 11Pushed 7y ago1 watchersCompare

[ Source](https://github.com/WebSystemsSolutions/admin-tools)[ Packagist](https://packagist.org/packages/sd1328/admin-tools)[ RSS](/packages/sd1328-admin-tools/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (1)Used By (0)

\[RU\]

admin-tools
===========

[](#admin-tools)

Набор инструментов для административных задач:

Подключение:

```
composer require sd1328/admin-tools

```

#### 1.1 Ридер логов

[](#11-ридер-логов)

> /Service/LogPageReader

Позволяет постраничное чтение текстовых логов (удобно в случае лога большого размера) начиная с конца (последних добавленных строк).

Может использоваться для мониторинга состояния различных текстовых логов.

**Пример использования:**

```
$logReader = new LogPageReader('/var/www/logs/test-log', 5 * 1024);

// Чтение 1 страницы (самого конца лога)
$page1 = $logReader->getLogContent();
// получаем смещение для чтения следующей страницы
$prevOffset = $logReader->getLastOffset();

// Чтение 2 страница (движение с конца файла)
// устанавливаем смещение предыдущей страницы
$logReader->setLastOffset($prevOffset);
$page2 = $logReader->getLogContent();
// получаем смещение для чтения следующей страницы
$prevOffset = $logReader->getLastOffset();
```

#### 2.1 Получение показателей работы сервера

[](#21-получение-показателей-работы-сервера)

> /Server/OsMonitoring

Компонент состоит из набора классов сенсоров `/Server/Sensors/...`, каждый из которых возвращает один из показателей работы сервера:

- показатели загрузки процессора
- показатели использования оперативной памяти
- показатели файловой системы

Может использоваться для мониторинга работы сервера.

**Пример использования:**

```
// можно задать список получаемых показателей - по умолчанию все доступные
$sensorList = null;
$stat = new OsMonitoring($sensorList);

// получения показаний
foreach ($stat->getMeters() as $key => $meter) {
    echo $key . ' : ' . $meter . PHP_EOL;
}
```

\[ENG\]

admin-tools
===========

[](#admin-tools-1)

A set of tools for administrative tasks:

Connection:

```
composer require sd1328 / admin-tools

```

#### 1.1 Log Reader

[](#11-log-reader)

> / Service / LogPageReader

Allows page-by-page reading of text logs (conveniently in the case of a large-sized log) starting from the end (last lines added).

It can be used to monitor the status of various text logs.

**Example use:**

```
$ logReader = new LogPageReader ('/ var / www / logs / test-log', 5 * 1024);

// Reading 1 page (the very end of the log)
$ page1 = $ logReader-> getLogContent ();
// get the offset to read the next page
$ prevOffset = $ logReader-> getLastOffset ();

// Reading 2 page (movement from the end of the file)
// set the offset of the previous page
$ logReader-> setLastOffset ($ prevOffset);
$ page2 = $ logReader-> getLogContent ();
// get the offset to read the next page
$ prevOffset = $ logReader-> getLastOffset ();
```

#### 2.1 Getting Server Performance Indicators

[](#21-getting-server-performance-indicators)

> / Server / OsMonitoring

The component consists of a set of sensor classes `/ Server / Sensors / ...`, each of which returns one of the server performance indicators:

- CPU utilization rates
- indicators of the use of RAM
- file system indicators

Can be used to monitor server operation.

**Example use:**

```
//you can set a list of the received indicators - by default all available
$sensorList = null;
$stat = new OsMonitoring($sensorList);

// getting testimony
foreach ($stat->getMeters() as $key => $meter) {
    echo $key . ' : ' . $meter . PHP_EOL;
}
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 60% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17289030?v=4)[sd1328](/maintainers/sd1328)[@sd1328](https://github.com/sd1328)

---

Top Contributors

[![sd1328](https://avatars.githubusercontent.com/u/17289030?v=4)](https://github.com/sd1328 "sd1328 (6 commits)")[![web-systems-solutions](https://avatars.githubusercontent.com/u/23033176?v=4)](https://github.com/web-systems-solutions "web-systems-solutions (4 commits)")

### Embed Badge

![Health badge](/badges/sd1328-admin-tools/health.svg)

```
[![Health](https://phpackages.com/badges/sd1328-admin-tools/health.svg)](https://phpackages.com/packages/sd1328-admin-tools)
```

PHPackages © 2026

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