From 75b0837762aeac5fd5a8d5b006a25aae5dce5987 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Thu, 19 Feb 2015 13:11:49 +0100 Subject: upgrade to munin 2.0.25-1~bpo70+1, drop some FIXMEs, add one to TODO --- TODO | 4 + etc/munin/plugins/cpu | 4 + etc/munin/plugins/diskstats | 1 - etc/munin/plugins/iostat | 1 - etc/munin/plugins/iostat_ios | 221 ------------------------------------------ etc/munin/plugins/munin_stats | 1 - update_jdn.sh | 5 +- 7 files changed, 11 insertions(+), 226 deletions(-) delete mode 120000 etc/munin/plugins/diskstats delete mode 120000 etc/munin/plugins/iostat delete mode 100755 etc/munin/plugins/iostat_ios diff --git a/TODO b/TODO index f05bbebd..ac4ff406 100644 --- a/TODO +++ b/TODO @@ -39,6 +39,10 @@ See link:https://jenkins.debian.net/userContent/about.html["about jenkins.debian * etc/pbuilderrc: remove /run/shm bindmount once we are running jessie - this is a workaround for #700591 * bin/g-i-installation: use lvcreate without --virtualsize +=== To be done once bugs are fixed + +* etc/munin/plugins/munin_stats includes the proposed fix for #767032 + === jenkins-job-builder related * use jessie version plus my patches from kali diff --git a/etc/munin/plugins/cpu b/etc/munin/plugins/cpu index aed93a00..b66ed381 100755 --- a/etc/munin/plugins/cpu +++ b/etc/munin/plugins/cpu @@ -1,5 +1,9 @@ #!/bin/sh # +# -- unfinished WORK IN PROGRESS -- +# +# includes modifications trying to fix #767100 +# : <<=cut =head1 NAME diff --git a/etc/munin/plugins/diskstats b/etc/munin/plugins/diskstats deleted file mode 120000 index d44002b7..00000000 --- a/etc/munin/plugins/diskstats +++ /dev/null @@ -1 +0,0 @@ -/usr/share/munin/plugins/diskstats \ No newline at end of file diff --git a/etc/munin/plugins/iostat b/etc/munin/plugins/iostat deleted file mode 120000 index b3b1256e..00000000 --- a/etc/munin/plugins/iostat +++ /dev/null @@ -1 +0,0 @@ -/usr/share/munin/plugins/iostat \ No newline at end of file diff --git a/etc/munin/plugins/iostat_ios b/etc/munin/plugins/iostat_ios deleted file mode 100755 index 6f1b817c..00000000 --- a/etc/munin/plugins/iostat_ios +++ /dev/null @@ -1,221 +0,0 @@ -#!/usr/bin/perl -w -# -*- cperl -*- -# FIXME: this copy of the iostat_ios munin plugin includes workarounds for #767017 and #767018 -=head1 NAME - -iostat_ios - Show IO-operation latency pr. device. - -=head1 APPLICABLE SYSTEMS - -Any Linux system - -=head1 CONFIGURATION - -None needed - -=head1 USAGE - -Link this into /etc/munin/plugins/ and restart the munin-node. - -=head1 INTERPRETATION - -The plugin shows the average time a IO-operation needs to complete for -each disk or block device on the system. - -Simple partitioned disks will only show as the whole disk. When/if -you use some device layer over that, such as LVM then LV devices will -show up individualy. - -When the IO-operation time here increases it is to be expected that -the iowait on the CPU graph increases, but please read about how -iowait reporting works to fully understand that number. - -=head1 MAGIC MARKERS - - #%# family=legacy - #%# capabilities=autoconf - -=head1 VERSION - - $Id$ - -=head1 BUGS - -Should show more useful device names/labels for device-mapper devices, -such as those used by LVM and so on. - -=head1 AUTHOR - -(C) 2004 Per Buer. Documentation and some modifications by Nicolai -Langfeldt. - -=head1 LICENSE - -GPLv2 - -=cut - -use strict; -use warnings; - -use IO::File; -use Storable qw(store retrieve); -use Munin::Plugin; - -use constant STATEFILE => "$ENV{MUNIN_PLUGSTATE}/iostat-ios.state"; - - -if (defined($ARGV[0]) and $ARGV[0] eq 'autoconf') { - if (-r "/proc/diskstats" or -r "/proc/partitions") { - print "yes\n"; - exit 0; - } else { - print "no (no /proc/diskstats or /proc/partitions)\n"; - exit 0; - } -} - -if (defined($ARGV[0]) and $ARGV[0] eq 'config') { - print_config(); - exit; -} - -my ($r, $old_r); -my %name; - -$r = get_ios(); - -($old_r) = get_state(); - -if ($old_r) { - cmp_io($old_r, $r); -} else { - warn "iostat_ios: No historic data present\n"; -} - -store_state( $r ); - -sub filter { - my ($major, $minor, $tmpnam) = @_; - if(defined($major)) { - return 0 if ($major == 1); # RAM devices - return 0 if ($major == 9); # MD devices - return 0 if ($major == 58); # LVM devices - return 0 if ($major == 253); # LVM2 devices - } - if(defined($tmpnam)) { - return 0 if ($tmpnam =~ /part\d+$/); - return 0 if ($tmpnam =~ /^\s*(?:sd|hd|vd)[a-z]\d+\s*$/); - } - - return 1; -} - - -sub get_ios { - my ($opt) = @_; - - my %R; - my ($parts, $kernel); - my @dev; - - if (-r "/proc/diskstats") { - $kernel = 2.6; - $parts = new IO::File("/proc/diskstats") || die(); - } else { - $kernel = 2.4; - $parts = new IO::File("/proc/partitions"); - die("kernel $kernel not supported yet\n"); - } - - unless ($parts) { - print "Could not gather statistics\n"; - return undef; - } - - while (<$parts>) { - my ($maj, $min, $name, $rio, $rtime, $wio, $wtime) = - (split(/\s+/, $_ ))[1,2,3,4,7,8,11]; - - next unless (defined($min) && defined($maj)); - next unless ($wio and $rio and $rtime and $wtime); - - next if (filter($maj, $min, $name) == 0); - - $R{$maj}{$min}{rio} = $rio; - $R{$maj}{$min}{rtime} = $rtime; - - $R{$maj}{$min}{wio} = $wio; - $R{$maj}{$min}{wtime} = $wtime; - - my $label = "dev${maj}_${min}"; - - push(@dev, $label); - - $name{$label} = $name; - } - $parts->close(); - - if ($opt) { - return \@dev; - } else { - return \%R; - } -} - - -sub print_config { - print("graph_title IO Service time\n", - "graph_args --base 1000 --logarithmic\n", - "graph_category disk\n", - "graph_vlabel seconds\n", - "graph_info For each applicable disk device this plugin shows the latency (or delay) for I/O operations on that disk device. The delay is in part made up of waiting for the disk to flush the data, and if data arrives at the disk faster than it can read or write it then the delay time will include the time needed for waiting in the queue.\n"); - - for my $d ( @{ get_ios(1) } ) { - print "${d}_rtime.label ",$name{$d}," read\n", - "${d}_rtime.type GAUGE\n", - "${d}_rtime.cdef ${d}_rtime,1000,/\n", - "${d}_wtime.label ",$name{$d}," write\n", - "${d}_wtime.type GAUGE\n", - "${d}_wtime.cdef ${d}_wtime,1000,/\n"; - print_thresholds($d); - } -} - - -sub cmp_io { - my ($old_io, $new_io) = @_; - - for my $maj (sort keys %{$new_io} ) { - for my $min (sort keys %{ $new_io->{$maj} } ) { - my $rio_diff = $$new_io{$maj}{$min}{rio} - $$old_io{$maj}{$min}{rio}; - my $rtime_diff = $$new_io{$maj}{$min}{rtime} - $$old_io{$maj}{$min}{rtime}; - - my $wio_diff = $$new_io{$maj}{$min}{wio} - $$old_io{$maj}{$min}{wio}; - my $wtime_diff = $$new_io{$maj}{$min}{wtime} - $$old_io{$maj}{$min}{wtime}; - - my $dev = "dev${maj}_${min}"; - - print "${dev}_rtime.value ", ($rio_diff > 0 and $rtime_diff > 0) ? ($rtime_diff / $rio_diff) : 'U', "\n", - "${dev}_wtime.value ", ($wio_diff > 0 and $wtime_diff > 0) ? ($wtime_diff / $wio_diff) : 'U', "\n"; - } - } - -} - - -sub store_state { - my ($R) = @_; - store($R, STATEFILE); -} - - -sub get_state { - my ($R); - return(undef) unless ( -r STATEFILE); - $R = retrieve( STATEFILE ); - return($R); -} - - -# vim: ft=perl : ts=4 : sw=4 : et diff --git a/etc/munin/plugins/munin_stats b/etc/munin/plugins/munin_stats index 2a4f0b15..8c7c82a2 100755 --- a/etc/munin/plugins/munin_stats +++ b/etc/munin/plugins/munin_stats @@ -1,6 +1,5 @@ #!/usr/bin/perl # -*- perl -*- -# FIXME: this copy of the munin_stats munin plugin includes the fix for #767032 # Copyright (C) 2006-2009 Rodolphe Quiedeville # # This program is free software; you can redistribute it and/or diff --git a/update_jdn.sh b/update_jdn.sh index 955c6e96..164f0455 100755 --- a/update_jdn.sh +++ b/update_jdn.sh @@ -57,7 +57,7 @@ fi # install packages we need # (more or less grouped into more-then-nice-to-have, needed-while-things-are-new, needed) # -sudo apt-get install vim screen less etckeeper moreutils curl mtr-tiny dstat devscripts bash-completion shorewall shorewall6 cron-apt apt-listchanges munin munin-plugins-extra calamaris visitors procmail libjson-rpc-perl libfile-touch-perl zutils ip2host pigz \ +sudo apt-get install vim screen less etckeeper moreutils curl mtr-tiny dstat devscripts bash-completion shorewall shorewall6 cron-apt apt-listchanges calamaris visitors procmail libjson-rpc-perl libfile-touch-perl zutils ip2host pigz \ build-essential python-setuptools molly-guard \ debootstrap sudo figlet graphviz apache2 libapache2-mod-macro python-yaml python-pip mr subversion subversion-tools vnstat poxml vncsnapshot imagemagick libav-tools python-twisted python-imaging gocr guestmount schroot sqlite3 dose-extra apt-file python-lzma bc \ unzip python-hachoir-metadata ghc python-rpy2 libsoap-lite-perl haveged postgresql-client-9.1 xvfb virt-viewer libsikuli-script-java \ @@ -68,7 +68,8 @@ sudo apt-get install vim screen less etckeeper moreutils curl mtr-tiny dstat dev # debootstrap is affected by #766459 in wheezy sudo apt-get install -t wheezy-backports qemu debootstrap qemu-kvm qemu-system-x86 libvirt0 qemu-user-static binfmt-support \ libvirt-dev libvirt-bin seabios ruby-rjb ruby-packetfu cucumber \ - linux-image-amd64 + linux-image-amd64 \ + munin munin-plugins-extra explain "Packages installed." echo "Also needs python-arpy from jessie..." -- cgit v1.2.3-70-g09d2