A simple perl6 module to get info from /proc/pid/statm
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib/Linux/Proc Add a implicit close on the $fh Sep 11, 2017
README.md add an human readable version Aug 6, 2017


Name Linux::Proc::Statm


 use Linux::Proc::Statm;
 my %meminfo = get-statm(42); #get info for the pid 42
 say %meminfo<data>; # data + stack size
 say get-statm.perl; #use $*PID
 say get-statm-human<data>; # 54.552 kB

Values are given in Kb by default. You can change this behavior by passing a :unit named parameter with etheir b, k or m according to the unit you want.

say get-statm-human(:unit<m>)<data>; # 53 mB


Sylvain "Skarsnik" Colinet scolinet@gmail.com