Linux系统信息收集模块-Linux::Info
这是一个用于收集Linux运行中的各项信息接口,使用Perl开发,专用于Linux。由Sys::Statistics::Linux派生而来,收集处理器负载、内存用量、网络及磁盘的空间I/O使用量、进程信息等。它比前者提供的更加清晰的接口,前者也已经多年不在更新了,不过也引入一些新perl模块(也就更多的依赖)。Linux::Info - API in Perl to recover information about the running Linux OS,is a fork from Sys::Statistics::Linux distribution.
Sys::Statistics::Linux is a front-end module and gather different linux system information like processor workload, memory usage, network and disk statistics and a lot more. Refer the documentation of the distribution modules to get more information about all possible statistics.
可用的接口:
sysinfo - Collect system information with Linux::Info::SysInfo.
cpustats - Collect cpu statistics with Linux::Info::CpuStats.
procstats - Collect process statistics with Linux::Info::ProcStats.
memstats - Collect memory statistics with Linux::Info::MemStats.
pgswstats - Collect paging and swapping statistics with Linux::Info::PgSwStats.
netstats - Collect net statistics with Linux::Info::NetStats.
sockstats - Collect socket statistics with Linux::Info::SockStats.
diskstats - Collect disk statistics with Linux::Info::DiskStats.
diskusage - Collect the disk usage with Linux::Info::DiskUsage.
loadavg - Collect the load averagewith Linux::Info::LoadAVG.
filestats - Collect inode statisticswith Linux::Info::FileStats.
processes - Collect process statistics with Linux::Info::Processes.
Linux::Info::SysInfo这个模块主要用于获取比较简单通用的信息。
Generated by /proc/sys/kernel/{hostname,domainname,ostype,osrelease,version} and /proc/cpuinfo, /proc/meminfo, /proc/uptime, /proc/net/dev.
These are the following attribute available for a instance of this class:
hostname - The host name.
domain - The host domain name.
kernel - The kernel name.
release - The kernel release.
version - The kernel version.
mem - The total size of memory.
swap - The total size of swap space.
uptime - The uptime of the system.
idletime - The idle time of the system.
pcpucount - The total number of physical CPUs.
tcpucount - The total number of CPUs (cores, hyper threading).
interfaces - The interfaces of the system.
arch - The processor architecture (like uname -m).
multithread - A boolean indicating if the process has hyper threading enabled or not.
model - the processor name
最新版本:0.9
项目主页:https://metacpan.org/release/Linux-Info