Skip to content

Commit

Permalink
Few Bugfixes
Browse files Browse the repository at this point in the history
 - Regexes needed to be tweaked, some installs were showing line returns
 - fixed wrong version match for unfetched graph, didn't show up until after 1.4.7
  • Loading branch information
mhwest13 committed Mar 16, 2013
1 parent f9e9c51 commit 07a7609
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
*.swp
tmp.pl
6 changes: 3 additions & 3 deletions memcached_multi_
Expand Up @@ -499,7 +499,7 @@ if (defined $ARGV[0] && $ARGV[0] eq 'suggest') {
if (defined($s)) {
fetch_stats();
my @rootplugins = ('bytes','conns','commands','evictions','items','memory');
if ($stats{version} !~ /^1\.4\.[0-2]$/) {
if ($stats{version} !~ /^1\.4\.[0-7]$/) {
push(@rootplugins, 'unfetched');
}
foreach my $plugin (@rootplugins) {
Expand Down Expand Up @@ -1012,7 +1012,7 @@ sub fetch_stats {
# Lets print the stats command and store the info from the output
print $s "stats\r\n";
while (my $line = <$s>) {
if ($line =~ /STAT\s(.+?)\s(.*)/) {
if ($line =~ /STAT\s(.+?)\s((\w|\d|\S)+)/) {
my ($skey,$svalue) = ($1,$2);
$stats{$skey} = $svalue;
}
Expand All @@ -1021,7 +1021,7 @@ sub fetch_stats {
# Lets print the stats settings command and store the info from the output
print $s "stats settings\r\n";
while (my $line = <$s>) {
if ($line =~ /STAT\s(.+?)\s(.*)/) {
if ($line =~ /STAT\s(.+?)\s((\w|\d|\S)+)/) {
my ($skey,$svalue) = ($1,$2);
if ($skey eq 'evictions') {
$skey = 'evictions_active';
Expand Down

0 comments on commit 07a7609

Please sign in to comment.