linfo/linfo
Composer 安装命令:
composer require linfo/linfo
包简介
App and library for easily parsing and displaying system information of the host, like network/torrents/cpu/memory/usb/pci/sound cards/filesystems/raid array/ipmi/etc.
README 文档
README
Linfo is a:
- Light themable Web UI and REST API displaying lots of system stats
- Ncurses CLI view of WebUI
- Extensible, easy (composer) to use PHP5 Library to get extensive system stats programmatically from your PHP app
Contributing
Interested in contributing? Check out Development Readme
web UI
ncurses preview
See: Enabling ncurses
PHP library usage
composer require linfo/linfo
<?php $linfo = new \Linfo\Linfo; $parser = $linfo->getParser(); var_dump($parser->getCPU()); // and a whole lot more
Runs on
- Linux
- Windows
- FreeBSD
- NetBSD
- OpenBSD
- DragonflyBSD
- Darwin/Mac OSX
- Solaris
- Minix
Information reported
- CPU type/speed; Architecture
- Mount point usage
- Hard/optical/flash drives
- Hardware Devices
- Network devices and stats
- Uptime/date booted
- Hostname
- Memory usage (physical and swap, if possible)
- Temperatures/voltages/fan speeds
- RAID arrays
- Via included extensions:
- Nvidia GPU temps
- Truecrypt mounts
- DHCPD leases
- Samba status
- APC UPS status
- Transmission torrents status
- uTorrent torrents status
- Soldat server status
- CUPS printer status
- IPMI
- libvirt VMs
- lxd Containers
- more
System requirements:
- At least PHP 8
Windows
- You need to have COM enabled.
Linux
- /proc and /sys mounted and readable by PHP
- Tested with the 2.6.x/3.x/4.x/5.x/6.x kernels
FreeBSD
- PHP able to execute usual programs under /bin, /usr/bin, /usr/local/bin, etc
- Tested on 8.0-RELEASE, 10.2-RELEASE
NetBSD
- PHP able to execute usual programs under /bin, /usr/bin, /usr/local/bin, /usr/pkg/bin, etc
- Tested on NetBSD 5.0.2
OpenBSD
- PHP able to execute usual programs under /bin, /usr/bin, /usr/local/bin, etc
- Tested on OpenBSD 4.7, 5.7
- Turn chroot of httpd/nginx/php-fpm off
Web UI Installation
- Extract tarball contents to somewhere under your web root
- Rename
sample.config.inc.phptoconfig.inc.php, after optionally changing values in it - Visit page in web browser
- Pass URL to your friends to show off
URL arguments
?out=json- JSON output?out=jsonp&callback=functionName- JSON output with a function callback. (Look here: http://www.json-p.org/ )?out=php_array- PHP serialized associative array?out=html- Usual lightweight HTML (default)
Extensions
- See a list of php files in src/Linfo/Extensions/
- Open them and look at the comment at the top of the file for usage
Troubleshooting:
Set $settings['show_errors'] = true; in config.inc.php to yield useful error messages.
TODO:
- Support for other Unix operating systems (Hurd, IRIX, AIX, HP UX, etc)
- Support for strange operating systems: Haiku/BeOS
- More superfluous features/extensions
- Make ncurses mode rival htop (half kidding)
Meta
- By Joe Gillotti joe@u13.net
- Licensed under MIT
- Pull requests! Linfo on Github
- Commit stats from OpenHub/Ohloh
This project is dedicated to the memory of Eric Looper.
linfo/linfo 适用场景与选型建议
linfo/linfo 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.78M 次下载、GitHub Stars 达 371, 最近一次更新时间为 2014 年 05 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「health」 「linux」 「system」 「CPU」 「specs」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 linfo/linfo 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 linfo/linfo 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 linfo/linfo 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Brotli binary provided by google/brotli and compiled for amd64
Advanced local development experience for Linux.
Is your Laravel app OK? Health checks running in production to ensure you can sleep well at night and be sure everything is still OK.
Provides healthcheck endpoints in accordance with IETF's healthcheck draft RFC
Provide status and health api endpoints
SoftWax Health Check Bundle for Symfony framework
统计信息
- 总下载量: 1.78M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 380
- 点击次数: 37
- 依赖项目数: 21
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2014-05-06