yii-starter-kit/yii2-probe
Composer 安装命令:
composer require yii-starter-kit/yii2-probe
包简介
System information provider
README 文档
README
Requires PHP 8.4+.
This package provides an easy interface to get information about the system it is running on.
$provider = \YiiStarterKit\Probe\ProviderFactory::create(); $provider->getCpuModel(); $provider->getCpuUsage(); $provider->getFreeMem();
Available methods
- 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()
- getCpuPhysicalCores()
- 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()
Supported OS
- Linux
- Windows
- MacOS
Note: To get Windows System Information, you must have php_com_dotnet.dll enabled in your php.ini.
[COM_DOT_NET] extension=php_com_dotnet.dll
Linux Specific methods
- getCoresPerSocket()
- getCpuinfoByLsCpu()
Contributing
Any help in any way is welcome.
TODO
- disk usage
- rx/tx
- processes list
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-09