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.
精彩评论