View on GitHub

InfoServer

Récupère des informations de base d'un serveur linux en PHP.

News Server Linux

Latest Stable Version Total Downloads

Description

Récupère les informations de base d’un serveur linux:

* getSystem()
* getCpu()
* getRam()
* getSwap()
* getLoadAverage()
* getReseau()
* getDisk()
* getUptime()

Installation

composer require jjeanniard/infoserver

Warning

Require: phpseclib/phpseclib

Usage

Exemple :

require __DIR__ . '/vendor/autoload.php';

use phpseclib\Net\SSH2;
use jjeanniard\InfoServer;

$ssh = new SSH2('localhost', 'port');

if (!$ssh->login('username', 'password')) {
    echo('Login Failed');
}

$dataServ = new InfoServer($ssh);
$dataServ->getCpu();

Licence

MIT