Permalink
Browse files

Fallback to /usr/bin/vm_stat on OS X Mavericks (because /usr/bin/top …

…output is way too incomplete)
  • Loading branch information...
1 parent 9e7563f commit 352346c643cf4a59973e73cd734a62439c33a72e @creaktive committed Oct 29, 2013
Showing with 1 addition and 3 deletions.
  1. +1 −3 rainbarf
View
@@ -301,9 +301,7 @@ sub usage {
sub memory {
my %m;
my %n = (K => 1/2**10, M => 1, G => 2**10);
- if (exists $top{physmem}) {
- $top{physmem} =~ s/[\(\),]+/,/gx
- if $top{physmem} =~ s/\bunused\b/free/x;
+ if (exists $top{physmem} and $top{physmem} !~ /\bunused\b/ix) {
%m =
map { lc $_->[2] => $_->[0] * $n{$_->[1]} }
map { [(/(\d+)([KMG])\s+(\w)/x)] }

0 comments on commit 352346c

Please sign in to comment.