Skip to content

Instantly share code, notes, and snippets.

@pmoranga
Created February 20, 2014 10:59
Show Gist options
  • Save pmoranga/9111197 to your computer and use it in GitHub Desktop.
Save pmoranga/9111197 to your computer and use it in GitHub Desktop.
Patch for Maatkit tool mk-slave-find so it will show the hostname of the server also on the hierarchy list. Useful if you do not have reverse dns for IP's
--- /usr/local/bin/mk-slave-find.original 2014-02-20 11:54:39.000000000 +0100
+++ /usr/local/bin/mk-slave-find 2014-02-20 11:58:21.000000000 +0100
@@ -2907,6 +2907,7 @@
push @lines, ['Version', $vars->{version}->{value}];
push @lines, ['Server ID', $vars->{server_id}->{value}];
+ push @lines, ['Hostname', $vars->{hostname}->{value}];
my $dhms = secs_to_time($stats->{Uptime}->{value}) || '';
my $started = ts(time - $stats->{Uptime}->{value}) || '';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment