开发者

Is there a CPAN Perl module to find total/used/free memory on a host (without running command line through a system() call)?

开发者 https://www.devze.com 2023-03-27 07:55 出处:网络
Is there a CPAN Perl module which provides total/u开发者_如何转开发sed/free memory (like vmstat does) on a host without running a command line through a system() call to get the info?

Is there a CPAN Perl module which provides total/u开发者_如何转开发sed/free memory (like vmstat does) on a host without running a command line through a system() call to get the info?

Ideally it should be cross-platform (Linux and Solaris) though please provide Linux or Solaris-only ones as well.


Looks like Sys::MemInfo is what I needed.

It is implemented in XS, using <sys/sysinfo.h> for Linux and <sys/stat.h> / <sys/swap.h> for Solaris.


Try the Sys::Statistics::Linux distrubition for linux.

0

精彩评论

暂无评论...
验证码 换一张
取 消