Is there a CPAN Perl module to search for shared / used / free memory on a host (without executing a command line through a call to system ())?

Is there a Perl CPAN module that provides shared / used / free memory (e.g. vmstat ) on the host without executing a command line via a system() call to retrieve information?

Ideally, it should be cross-platform (Linux and Solaris), although please also provide Linux or Solaris.

+6
source share
2 answers

It looks like Sys::MemInfo is what I need.

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

+7
source
+3
source

Source: https://habr.com/ru/post/894642/


All Articles