[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 2 commits: trivial typo fix (in a comment)

Holger Levsen (@holger) gitlab at salsa.debian.org
Sun Apr 9 19:31:33 BST 2023



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
c0e0d750 by Holger Levsen at 2023-04-09T19:59:22+02:00
trivial typo fix (in a comment)

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
bc7ef0ea by Holger Levsen at 2023-04-09T20:29:38+02:00
jenkins nodes: use iostat and iostat_ios munin plugins on jenkins and osuosl4+5

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


4 changed files:

- bin/reproducible_debstrap.sh
- − hosts/jenkins/etc/munin/plugins/cpu
- − hosts/jenkins/etc/munin/plugins/iostat_ios
- update_jdn.sh


Changes:

=====================================
bin/reproducible_debstrap.sh
=====================================
@@ -133,7 +133,7 @@ else
 	TMPDIR=${RESULTSDIR}
 	#call_diffoscope ${TOOL} ${SUITE}.tar
 	# the previous, temporarily disabled line is only useful if we also make the .html file visible...
-	schroot --directory /tmp -c chroot:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --restructured-text $RESULTSDIR/${TOOL}_${SUITE}.txt $RESULTSDIR/b1/${TOOL}/${SUITE}.tar $RESULTSDIR/b2/${TOOL}/${SUITE}.tar || true # diffoscope will exi with error...
+	schroot --directory /tmp -c chroot:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --restructured-text $RESULTSDIR/${TOOL}_${SUITE}.txt $RESULTSDIR/b1/${TOOL}/${SUITE}.tar $RESULTSDIR/b2/${TOOL}/${SUITE}.tar || true # diffoscope will exit with error...
 	cat $RESULTSDIR/${TOOL}_${SUITE}.txt
 fi
 


=====================================
hosts/jenkins/etc/munin/plugins/cpu deleted
=====================================
@@ -1,250 +0,0 @@
-#!/bin/sh
-#
-# -- unfinished WORK IN PROGRESS --
-#
-# includes modifications trying to fix #767100
-#
-: <<=cut
-
-=head1 NAME
-
-cpu - Plugin to monitor CPU usage.
-
-=head1 APPLICABLE SYSTEMS
-
-All Linux systems
-
-=head1 CONFIGURATION
-
-The following is default configuration
-
-  [cpu]
-	env.HZ	100
-
-See "BUGS" for a explanation of this setting.
-
-=head2 EXAMPLE WARNING AND CRITICAL SETTINGS
-
-You can also set warning and critical levels for each of the data
-series the plugin reports.  The following environment variables are
-used as default for all fields:
-
-  env.warning
-  env.critical
-
-But each field can be controlled separately:
-
-  env.system_warning
-  env.system_critical
-
-  env.user_warning
-  env.user_critical
-
-  env.nice_warning
-  env.nice_critical
-
-  env.idle_warning
-  env.idle_critical
-
-For some kernels there is also the following settings:
-
-  env.iowait_warning
-  env.iowait_critical
-  env.irq_warning
-  env.irq_critical
-  env.softirq_warning
-  env.softirq_critical
-  env.steal_warning
-  env.steal_critical
-  env.guest_warning
-  env.guest_critical
-
-=head1 INTERPRETATION
-
-The plugin shows cpu usage in percent. In case of more than one core
-it displays 100% for each core.
-
-If a core is 100% busy there will be no "iowait" showing, that only
-shows if the CPU has nothing else to do while it waits on IO.
-Therefore a 100% busy core can hide a lot of iowait.  Please refer to
-the IO latency and other disk related graphs for further information
-about IO performance.
-
-=head1 MAGIC MARKERS
-
-  #%# family=auto
-  #%# capabilities=autoconf
-
-
-=head1 VERSION
-
-  $Id$
-
-=head1 BUGS
-
-Some combinations of hardware and Linux (probably only 2.4 kernels)
-use 1000 units/second in /proc/stat corresponding to the systems
-HZ. (see /usr/src/linux/include/asm/param.h). But Almost all systems
-use 100 units/second and this is our default. Even if
-Documentation/proc.txt in the kernel source says otherwise. - Finding
-and fix by dz at 426.ch
-
-Otherwise none known
-
-=head1 AUTHOR
-
-Unknown
-
-=head1 LICENSE
-
-GPLv2
-
-=cut
-
-
-. $MUNIN_LIBDIR/plugins/plugin.sh
-
-if [ "$1" = "autoconf" ]; then
-	if [ -r /proc/stat ]; then
-		echo yes
-		exit 0
-	else
-		echo no
-		exit 0
-	fi
-fi
-
-HZ=${HZ:-100}
-
-extinfo=""
-
-if grep -q -E '^cpu +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+' /proc/stat; then
-	extinfo="iowait irq softirq"
-	if grep -q -E '^cpu +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+' /proc/stat; then
-		extextinfo="steal"
-	fi
-	if grep -q -E '^cpu +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+' /proc/stat; then
-		extextextinfo="guest"
-	fi
-
-fi
-
-if [ "$1" = "config" ]; then
-
-	NCPU=$(grep -c -E '^cpu[0-9]+ ' /proc/stat)
-	if [ "$scaleto100" = "yes" ]; then
-		graphlimit=100
-	else
-		graphlimit=$((NCPU * 100))
-	fi
-	echo 'graph_title CPU usage'
-	echo "graph_order system user nice idle" $extinfo
-	echo "graph_args --base 1000 -r --lower-limit 0 --upper-limit $graphlimit"
-	echo 'graph_vlabel %'
-	echo 'graph_scale no'
-	echo 'graph_info This graph shows how CPU time is spent.'
-	echo 'graph_category system'
-	echo 'graph_period second'
-	echo 'system.label system'
-	echo 'system.draw AREA'
-	echo 'system.min 0'
-	echo 'system.type DERIVE'
-	echo "system.info CPU time spent by the kernel in system activities" 
-	echo 'user.label user'
-	echo 'user.draw STACK'
-	echo 'user.min 0'
-	echo 'user.type DERIVE'
-	echo 'user.info CPU time spent by normal programs and daemons'
-	echo 'nice.label nice'
-	echo 'nice.draw STACK'
-	echo 'nice.min 0'
-	echo 'nice.type DERIVE'
-	echo 'nice.info CPU time spent by nice(1)d programs'
-	echo 'idle.label idle'
-	echo 'idle.draw STACK'
-	echo 'idle.min 0'
-	echo 'idle.type DERIVE'
-	echo 'idle.info Idle CPU time'
-
-	for field in system user nice idle; do
-		print_adjusted_thresholds "$field" "$graphlimit"
-	done
-
-	if [ "$scaleto100" = "yes" ]; then
-		echo "system.cdef system,$NCPU,/"
-		echo "user.cdef user,$NCPU,/"
-		echo "nice.cdef nice,$NCPU,/"
-		echo "idle.cdef idle,$NCPU,/"
-	fi
-	if [ -n "$extinfo" ]
-	then
-		echo 'iowait.label iowait'
-		echo 'iowait.draw STACK'
-		echo 'iowait.min 0'
-		echo 'iowait.type DERIVE'
-		echo 'iowait.info CPU time spent waiting for I/O operations to finish when there is nothing else to do.'
-		echo 'irq.label irq'
-		echo 'irq.draw STACK'
-		echo 'irq.min 0'
-		echo 'irq.type DERIVE'
-		echo 'irq.info CPU time spent handling interrupts'
-		echo 'softirq.label softirq'
-		echo 'softirq.draw STACK'
-		echo 'softirq.min 0'
-		echo 'softirq.type DERIVE'
-		echo 'softirq.info CPU time spent handling "batched" interrupts'
-		if [ "$scaleto100" = "yes" ]; then
-			echo "iowait.cdef iowait,$NCPU,/"
-			echo "irq.cdef irq,$NCPU,/"
-			echo "softirq.cdef softirq,$NCPU,/"
-		fi
-		for field in iowait irq softirq; do
-			print_adjusted_thresholds "$field" "$graphlimit"
-		done
-	fi
-
-	if [ -n "$extextinfo" ]
-	then
-		echo 'steal.label steal'
-		echo 'steal.draw STACK'
-		echo 'steal.min 0'
-		echo 'steal.type DERIVE'
-		echo 'steal.info The time that a virtual CPU had runnable tasks, but the virtual CPU itself was not running'
-		if [ "$scaleto100" = "yes" ]; then
-			echo "steal.cdef steal,$NCPU,/"
-		fi
-		for field in steal; do
-			print_adjusted_thresholds "$field" "$graphlimit"
-		done
-	fi
-
-	if [ -n "$extextextinfo" ]
-	then
-		echo 'guest.label guest'
-		echo 'guest.draw STACK'
-		echo 'guest.min 0'
-		echo 'guest.type DERIVE'
-		echo 'guest.info The time spent running a virtual CPU for guest operating systems under the control of the Linux kernel.'
-		if [ "$scaleto100" = "yes" ]; then
-			echo "guest.cdef guest,$NCPU,/"
-		fi
-		for field in guest; do
-			print_adjusted_thresholds "$field" "$graphlimit"
-		done
-	fi
-
-	exit 0
-fi
-
-# Note: Counters/derive need to report integer values.  Also we need
-# to avoid 10e+09 and the like %.0f should do this.
-
-if [ -n "$extextextinfo" ]; then
-	awk -v hz=$HZ '/^cpu / { printf "user.value %.0f\nnice.value %.0f\nsystem.value %.0f\nidle.value %.0f\niowait.value %.0f\nirq.value %.0f\nsoftirq.value %.0f\nsteal.value %.0f\nguest.value %.0f\n", ($2-$10)*100/hz, $3*100/hz, $4*100/hz, $5*100/hz, $6*100/hz, $7*100/hz, $8*100/hz, $9*100/hz, $10*100/hz }' < /proc/stat
-elif [ -n "$extextinfo" ]; then
-	awk -v hz=$HZ '/^cpu / { epoch = systime(); printf "user.value %d:%.0f\nnice.value %d:%.0f\nsystem.value %d:%.0f\nidle.value %d:%.0f\niowait.value %d:%.0f\nirq.value %d:%.0f\nsoftirq.value %d:%.0f\nsteal.value %d:%.0f\n", epoch, $2*100/hz, epoch, $3*100/hz, epoch, $4*100/hz, epoch, $5*100/hz, epoch, $6*100/hz, epoch, $7*100/hz, epoch, $8*100/hz, epoch, $9*100/hz }' < /proc/stat
-elif [ -n "$extinfo" ]; then
-	awk -v hz=$HZ '/^cpu / { epoch = systime(); printf "user.value %d:%.0f\nnice.value %d:%.0f\nsystem.value %d:%.0f\nidle.value %d:%.0f\niowait.value %d:%.0f\nirq.value %d:%.0f\nsoftirq.value %d:%.0f\n", epoch, $2*100/hz, epoch, $3*100/hz, epoch, $4*100/hz, epoch, $5*100/hz, epoch, $6*100/hz, epoch, $7*100/hz, epoch, $8*100/hz }' < /proc/stat
-else
-	awk -v hz=$HZ '/^cpu / { epoch = systime(); printf "user.value %d:%.0f\nnice.value %d:%.0f\nsystem.value %d:%.0f\nidle.value %d:%.0f\niowait.value %d:%.0f\nirq.value %d:%.0f\n", epoch, $2*100/hz, epoch, $3*100/hz, epoch, $4*100/hz, epoch, $5*100/hz, epoch, $6*100/hz, epoch, $7*100/hz }' < /proc/stat
-fi


=====================================
hosts/jenkins/etc/munin/plugins/iostat_ios deleted
=====================================
@@ -1,220 +0,0 @@
-#!/usr/bin/perl -w
-# -*- cperl -*-
-=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


=====================================
update_jdn.sh
=====================================
@@ -745,8 +745,10 @@ if ! $UP2DATE || [ $BASEDIR/hosts/$HOSTNAME/etc/munin -nt $STAMP ] ; then
 			jenkins) [ -L /etc/munin/plugins/postfix_mailstats ] || for i in postfix_mailstats postfix_mailvolume postfix_mailqueue ; do sudo ln -s /usr/share/munin/plugins/$i $i ; done ;;
 			*)	;;
 	esac
-	if [ "$HOSTNAME" != "jenkins" ] && [ -L /etc/munin/plugins/iostat ] ; then
-		sudo rm /etc/munin/plugins/iostat
+	case $HOSTNAME in
+		jenkins|osuosl4-amd64|osuosl5-amd64) 	: ;;
+		*)					[ ! -e /etc/munin/plugins/iostat ] || sudo rm /etc/munin/plugins/iostat ;;
+	esac
 	fi
 	if ( [ "$HOSTNAME" = "jenkins" ] || [ "$HOSTNAME" = "ionos7-amd64" ] ) && [ ! -L /etc/munin/plugins/apache_accesses ] ; then
 		for i in apache_accesses apache_volume ; do sudo ln -s /usr/share/munin/plugins/$i $i ; done



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/dc10f29db13137ccac3cf6ee3680cd50485b11ea...bc7ef0ea62f60ac1663b4a3840d2844532793dfc

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/dc10f29db13137ccac3cf6ee3680cd50485b11ea...bc7ef0ea62f60ac1663b4a3840d2844532793dfc
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20230409/4cfcb855/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list