in reply to time and mem usage of pgm
On linux, one might use the following:
But directly reading the process stats is preferable:sub mem{ `ps -o rss $$` =~ m[(\d+)] }
sub mem { local $/; open my $fh, '/proc/self/status'; <$fh> =~ /^VmRSS:\s*(\d+)/m; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: time and mem usage of pgm
by carolw (Sexton) on Feb 06, 2015 at 07:33 UTC | |
by BrowserUk (Patriarch) on Feb 06, 2015 at 07:45 UTC |