File: memfree.pl

package info (click to toggle)
cacti 0.6.7-2.2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,000 kB
  • ctags: 1,120
  • sloc: php: 5,059; sql: 922; sh: 302; perl: 81; makefile: 56
file content (6 lines) | stat: -rwxr-xr-x 123 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
#!/usr/bin/perl

$mem = `cat /proc/meminfo | grep -w "$ARGV[0]"`;
$mem =~ s/($ARGV[0].*\s)(.*[0-9])( kB)//;

print $2;