aiddroid/probe

系统信息提供者

0.2.1 2015-06-26 12:53 UTC

This package is auto-updated.

Last update: 2024-09-13 15:48:39 UTC


README

本软件包提供了一个简单的接口,用于获取系统运行时的信息。

$provider = \probe\Factory::create();
$provider->getCpuModel();
$provider->getCpuUsage();
$provider->getFreeMem();

可用方法

  • getOsRelease()
  • getOsType();
  • getOsKernelVersion();
  • getArchitecture();
  • getDbVersion(\PDO $connection);
  • getDbInfo(\PDO $connection);
  • getDbType(\PDO $connection);
  • getTotalMem();
  • getFreeMem();
  • getUsedMem();
  • getTotalSwap();
  • getFreeSwap();
  • getUsedSwap();
  • getHostname();
  • isLinuxOs();
  • isWindowsOs();
  • isBsdOs();
  • isMacOs();
  • getUptime();
  • getPhysicalCpus();
  • getCpuCores();
  • getCpuPhysicalCore();
  • getCpuModel();
  • getCpuUsage();
  • getServerIP();
  • getExternalIP();
  • getServerSoftware();
  • isISS();
  • isNginx();
  • isApache();
  • getPhpInfo($what = -1);
  • getPhpVersion();
  • getPhpDisabledFunctions();
  • getPhpModules();
  • isPhpModuleLoaded($module);
  • getPing(array $hosts = null, $count = 2);
  • getServerVariable($key);
  • getPhpSapiName();
  • isFpm();
  • isCli();

支持的操作系统

  • Linux
  • Windows
  • MacOS

注意:要获取Windows系统信息,您需要在您的 php.ini 中启用 php_com_dotnet.dll

[COM_DOT_NET] 
extension=php_com_dotnet.dll

Linux特定方法

  • getCoresPerSocket()
  • getCpuinfoByLsCpu()

贡献

我没有特别的规则。任何形式的帮助都将是有用的。

待办事项

  • 磁盘使用情况
  • 接收/发送
  • 进程列表