To see how much memory you have used over time, first set up the RimuHosting memory monitor as described at
http://rimuhosting.com/howto/memory.jspAfter it has run for some time, you can use this perl script to see how much memory your server has used over time, and it gives you a really simple look at how much you have used.
#!/usr/bin/perlmy $max_used = 0;
my %memcounts;
opendir(DH,".") || die "Unable to open current directory";
while(my $file = readdir(DH)) {
if($file =~ m/memmon.txt/) {
open(FILE, "<$file");
while($line = <FILE>) {
if($line =~ m/buffers/cache: +([0-9]+) +([0-9]+)/) {
$used = $1;
$memcounts = $memcounts ? $memcounts + 1 : 1;
$max_used = $used > $max_used ? $used : $max_used;
}
}
}
}
print "Max memory used: $max_used\\n\\n";for($i = 0; $i <= $max_used; $i++) {
print "$i => ".$memcounts."\\n";
}The output shows the number of times that the memmon.sh script hit each amount of memory. Note that this is just a really quick version to view memory utilization. There are much better tools for long-term monitoring of memory usage (and many other things), like MRTG, Cacti, Cricket, etc