Xymon Mailing List Archive search

Can't check kernel version on arm64 systems

list Christoph Zechner
Thu, 28 Jul 2022 12:16:07 +0200
Message-Id: <user-583eaf151d3f@xymon.invalid>

Hi,

we had the same problems on our pi, my colleague came up with this patch for the libs [1] check:

--- libs.orig
+++ libs
@@ -73,6 +73,11 @@
      if (-x '/usr/bin/dpkg' and `dpkg --print-architecture` =~ /sparc/) {
          $kernel_image_read_command = "zcat '$newest_kernel_image' | strings";
      }
+    if (-x '/usr/bin/dpkg' and `dpkg --print-architecture` =~ /armhf/) {
+        my $offset = `grep --only-matching --byte-offset --binary --text '\x1f\x8b' '$newest_kernel_image' 2>/dev/null| head -1 | cut -f 1 -d :`;
+        $offset =~ s/\n//g;
+        $kernel_image_read_command = "dd if='$newest_kernel_image' skip=1 bs=$offset 2>/dev/null | gunzip 2>/dev/null | strings";
+    }
      $kernel_image_read_command .=
          " | egrep '^$kernel_image_release|^Linux version '";


Hope it helps!

Cheers
Christoph


[1] /usr/lib/xymon/client/ext/libs


On 28/07/2022 11:46, Jaap Winius via Xymon wrote: