git.lirion.de

Of git, get, and gud

summaryrefslogtreecommitdiffstats
path: root/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm
diff options
context:
space:
mode:
authorHarald Pfeiffer <coding _ lirion.de> 2019-04-17 19:07:19 +0200
committerHarald Pfeiffer <coding _ lirion.de> 2019-04-17 19:07:19 +0200
commit1e2387474a449452b78520b9ad96a8b4b5e99722 (patch)
tree836889471eec7d2aac177405068e2a8f1e2b1978 /nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm
downloadnagios-plugins-contrib-1e2387474a449452b78520b9ad96a8b4b5e99722.tar.bz2
initial commit of source fetch
Diffstat (limited to 'nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm')
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/Makefile15
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/AUTHORS1
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/COPYING340
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/ChangeLog226
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/INSTALL229
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/Makefile.am6
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/Makefile.in764
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/NEWS0
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/README346
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/TODO71
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/acinclude.m478
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/aclocal.m4758
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/config.guess1558
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/config.sub1788
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/configure4028
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/configure.in133
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/install-sh527
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/missing215
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem.pm240
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component.pm7
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem.pm176
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/FanSubsystem.pm139
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/FuseSubsystem.pm121
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/ManagerSubsystem.pm154
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/TempSubsystem.pm177
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/NetConnectorSubsystem.pm134
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/PowerEnclosureSubsystem.pm136
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/PowerSupplySubsystem.pm238
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/ServerBladeSubsystem.pm158
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant.pm771
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component.pm5
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/AsrSubsystem.pm45
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/AsrSubsystem/CLI.pm32
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/AsrSubsystem/SNMP.pm68
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/BatterySubsystem.pm124
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/BatterySubsystem/CLI.pm27
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/BatterySubsystem/SNMP.pm78
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/CpuSubsystem.pm112
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/CpuSubsystem/CLI.pm57
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/CpuSubsystem/SNMP.pm50
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem.pm159
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da.pm407
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da/CLI.pm239
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da/SNMP.pm232
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca.pm433
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca/CLI.pm34
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca/SNMP.pm303
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide.pm256
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide/CLI.pm27
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide/SNMP.pm115
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas.pm251
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas/CLI.pm27
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas/SNMP.pm126
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi.pm227
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi/CLI.pm27
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi/SNMP.pm134
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/EventSubsystem.pm236
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/EventSubsystem/CLI.pm78
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/EventSubsystem/SNMP.pm221
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/FanSubsystem.pm263
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/FanSubsystem/CLI.pm101
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/FanSubsystem/SNMP.pm231
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/MemorySubsystem.pm197
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/MemorySubsystem/CLI.pm87
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/MemorySubsystem/SNMP.pm746
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/NicSubsystem.pm202
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/NicSubsystem/SNMP.pm189
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem.pm214
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem/CLI.pm81
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem/SNMP.pm96
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/SNMP.pm67
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem.pm205
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem/CLI.pm56
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem/SNMP.pm119
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/SNMP/Utils.pm103
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Server.pm447
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Storage.pm308
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/StorageWorks.pm157
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/Makefile.am104
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/Makefile.in574
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/Nagios/MiniPlugin.pm333
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/check_hpasm.pl215
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/subst.in64
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/control18
-rw-r--r--nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/copyright19
l---------nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/src1
86 files changed, 22861 insertions, 0 deletions
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/Makefile b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/Makefile
new file mode 100644
index 0000000..0fcfdce
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/Makefile
@@ -0,0 +1,15 @@
+PLUGIN := check_hpasm
+CLEANFILES := check_hpasm
+
+include ../common.mk
+
+check_hpasm:
+ set -e; for i in guess sub; do if [ ! -e src/config.$$i.bak ]; then cp src/config.$$i src/config.$$i.bak; fi; done
+ cp /usr/share/misc/config.* src
+ cd src && ./configure --prefix=/usr --enable-perfdata --enable-extendedinfo --with-nagios-user=nagios --with-nagios-group=nagios --with-degrees=celsius
+ make -C src
+ sed '2s,^,# nagios: -epn\n,' src/plugins-scripts/check_hpasm > $@
+
+clean::
+ [ ! -f src/Makefile ] || make -C src distclean
+ set -e; for i in guess sub; do if [ -e src/config.$$i.bak ]; then mv src/config.$$i.bak src/config.$$i; fi; done
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/AUTHORS b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/AUTHORS
new file mode 100755
index 0000000..6206f02
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/AUTHORS
@@ -0,0 +1 @@
+Gerhard Lausser <gerhard.lausser@consol.de>
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/COPYING b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/COPYING
new file mode 100755
index 0000000..60549be
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/ChangeLog b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/ChangeLog
new file mode 100755
index 0000000..9370df3
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/ChangeLog
@@ -0,0 +1,226 @@
+* 4.8 2018-09-24
+ check proliant cpqHeSysBatteryTable
+* 4.7.5.5 2018-04-19
+ add HPE Synergy
+* 4.7.5.4 2017-02-01
+ allow snmpv3 in a flat community-string
+* 4.7.5.3 2016-12-05
+ reorder cpqHoMibStatusArray
+* 4.7.5.2 2016-12-02
+ Detect more MSA devices (P2000)
+* 4.7.5.1 2016-11-18
+ Merge pull request # 15 Use HP::StorageWorks for HP MSA systems
+* 4.7.5 2016-09-19
+ better error message for hpasmcli on dl160 (Thanks Matthias Bethke)
+ better error detection for da accelerators
+ Merge pull request #6 from fredricj/master (Add support for proliant DA subsystem Disk enclosures)
+* 4.7.4 2016-06-16
+ allow tcp connects. state other for fans is like ok. (Thanks fredericve)
+* 4.7.3.1 2016-05-01
+ add blacklisting for ide. (Thanks Tommi)
+* 4.7.3 2016-02-15
+ add hp superdome 2
+* 4.7.2 2016-02-01
+ search for hpssacli if hpacucli was not found
+* 4.7.1.1 2015-06-08
+ bugfix for gen9 with broken SysRomVer string
+* 4.7.1 2015-03-23
+ interpret other status for fcal as ok
+* 4.7.0.2 2014-03-18
+ add another storageworks detection
+ add StoreEasy detection (thanks Alexander Laimer)
+* 4.7.0.1 2014-03-04
+ bugfix in blacklisting (Thanks Ingvar Hagelund)
+* 4.7 2014-02-21
+ add StorageWorks
+* 4.6.3.4 2013-05-15
+ fix a bug in fan perfdata (absent fans were shown with 0%)
+* 4.6.3.3 2013-04-10
+ fix a bug in snmp overall nic condition
+ sort events by id numerically
+* 4.6.3.2 2013-03-19
+ fix a bug in proliant/gen8/ilo temperature thresholds (Thanks Kai Benninghoff and Stephane Loeuillet)
+* 4.6.3.1 2013-01-10
+ fix a bug in da disk in local mode
+ fix a bux in overall_init proliant nics (Thanks Fanming Jen)
+* 4.6.3 2012-11-25
+ gen8 should work now
+ fix the problem with -99 degrees
+ fix the problem with binary zero EventUpdateTime
+* 4.6.2.1 2012-11-09
+ some bugfixes in bladecenter temperatures (Thanks Thomas Reichel)
+* 4.6.2 2012-08-20
+ fix some bugs in snmpget where the system responded with undef values
+* 4.6.1 2012-08-14
+ fix a small bug in boottime
+ skip pagination in long "show iml" lists
+ make bulk requests if possible
+* 4.6 2012-06-07
+ output power consumption as performance data (only newer proliant models)
+ support older <=7 versions of hpacucli
+ add another error log: Uncorrectable Memory Error
+ raise the default timeout from 15 to 60 seconds
+* 4.5.3.1 2012-04-19
+ change the way --snmpwalk reads oids from a file
+* 4.5.3 2012-03-26
+ fix a bug in snmp-eventlogs
+* 4.5.2 2012-03-06
+ add another error log: Main Memory - Corrected Memory Error threshold exceeded
+* 4.5.1 2012-02
+ add another error log: 210 - Quick Path Interconnect (QPI) Link Degradation
+ remove watt percent for blade center power supply
+ make the snmp oid collection phase shorter for blade center
+* 4.5 2012-01-26
+ output power consumption perfdata for BladeCenters
+ correctly identify dl388g7 (Thanks lilei8)
+* 4.4 2011-12-16
+ add checks for power converters
+ add checks for nic teaming (experimental!!, must be enabled with --eval-nics)
+ fix a bug with invalid date/time from iml
+ fix a bug in blade enclosure manager verbose output
+ add msa2xxx storage sensors
+* 4.3 2011-10-14
+ add monitoring of IML events (Thanks Klaus)
+ esp. Memory initialization error... The OS may not have access to all of the memory installed in the system
+* 4.2.5
+ G2 series of X1660 storage systems are now correctly detected. (Thanks Andre Zaborowski)
+ blacklisting for SAS controller & disks was added (Thanks Jewi)
+* 4.2.4.1 2011-08-09
+ dimm output of G7 hpasmcli (under Solaris) is now handled (Thanks Ron Waffle)
+* 4.2.4 2011-07-21
+add a check for asr (Thanks Ingmar Verheij http://www.ingmarverheij.com/)
+* 4.2.3 2011-07-21
+ add a global temperature check when no temperature sensors are found
+ check power converters if no fault tolerant power supplies are found
+* 4.2.2.1 2011-04-17
+ fix a bug when a wrong --hostname was used (Thanks Wim Savenberg)
+* 4.2.2 2011-01-21
+ add support for msa500 and hpasmcli (Thanks Kalle Andersson)
+* 4.2.1.1
+ added support for x1** nas storage, which was detected as storage but in fact is like a proliant (Thanks Maik Schulz)
+* 4.2.1
+ added timeout handling
+ better hpacucli da controller handling
+ fix a bug in memory detection (0 dimms were shown) (Thanks Anthony Cano)
+ better handling for failed and disabled controller batteries. warning only.
+* 4.2 2010-03-20
+ added temperatures for bladesystems (although not implemented by HP)
+ added fuses for bladesystems
+ added enclosure managers for bladesystems
+ added blacklisting for scsi devices (scco,scld,scpd) (Thanks Marco Hill)
+ added blacklisting for overall fan status (ofs) (Thanks Thomas Jampen)
+* 4.1.2.1 2010-03-03
+ fixed a harmless bug in BladeCenter::Powersupply output
+* 4.1.2 2010-02-09
+ fixed a severe bug in detecting multiple logical drives with hpacucli (Thanks Trond Hasle)
+* 4.1.1 2010-01-07
+ detect more smart array types when run in local mode (Thanks Trond Hasle)
+* 4.1 2009-12-07
+ added more details for bladecenters (power suppl., server blades)
+ fixed a bug in powersupply checks with hpasmcli (Thanks Guillaume)
+* 4.0.1 2009-12-02
+ added the missing output for --help
+ non-redundant fans are now tolerated if the global fan status says "ok"
+ added detection for servers with a hidden model description
+ fixed a bug in celsius-fahrenheit-conversion
+* 4.0 2009-11-30
+ added support for the new g6-models
+ complete rewrite of the code
+ autodetection for proliant, bladecenter and storage
+ detailed dump of the hardware with -vvv
+ new format for blacklist
+* 3.5.1 2009-04-22
+ fixed a bug where the server didn't reveal serial no. and rom rev. (thanks Daniel Rich)
+ fixed a bug in the snmpv3 code.
+* 3.5 2009-03-20
+ added support for SNMPv3
+ added new parameter --port
+* 3.2.1 2009-02-26
+ fixed a bug which showed degraded dimms as missing. (thanks matt at adicio.com)
+* 3.2 2009-02-20
+ added support for external disk arrays. (M. M. has a MSA20)
+* 3.1.1.1 2009-02-13
+ added an error message when sudo was configured with requiretty=yes. (thanks Jeff The Riffer)
+* 3.1.1 2009-02-06
+ fixed a bug which caused ugly perl warnings. (thanks Martin Hofmann and Bill Katz)
+* 3.1 2009-01-21
+ added support for sas and ide controllers/disks (only with snmp)
+* 3.0.7.2 2009-01-16
+ minor bugfix for dl320g5+hpasmcli+fan+n/a. (thanks Bruce Jackson)
+* 3.0.7.1 2008-12-05
+ minor bugfix. snmpwalk now uses -On
+* 3.0.7 2008-11-29
+ bugfix in controller blacklists (thanks Maurice Moric)
+ no need for Net::SNMP with --snmpwalk /usr/bin/snmpwalk
+* 3.0.6 2008-10-30
+ buxfix in ignore-dimms (thanks tumtliw)
+* 3.0.5 2008-10-23
+ higher speed through decreased amount of transferred oids (thanks Yannick Gravel)
+ new switch --ignore-fan-redundancy for old boxes without double fans
+* 3.0.4 2008-09-18
+ rewrote snmp memory checking for better handling of missing health info
+ new configure option --enable-extendedinfo (outputs lots of crap)
+* 3.0.3.2 2008-09-11
+ --protocol ist now optional (this was a bug)
+* 3.0.3.1 2008-09-10
+ Only accept 1, 2 or 2c as SNMP protocol
+ Try both bulk walk and get-next
+* 3.0.3 2008-08-11
+ cpqSiMem instead of cpqHeResMem
+ new parameter --protocol (default: 2c)
+ cpqHeComponents are fetched with get-next instead of get-bulk (Net::SNMP grr)
+* 3.0.2 2008-08-01
+ skip memory checking if snmp returns garbage
+ bugfix in numbering of snmp table indexes
+* 3.0.1 2008-07-31
+ bugfix in customthresholds&snmp (thanks TheCry)
+ broke up the snmpwalk into smaller pieces.
+* 3.0 2008-07-20
+ first release with snmp support for remote checks (thanks Matthias Flacke)
+ simulation is possible with --snmpwalk or --hpasmcli
+* 2.0.3.3 - 2008-05-22 Brangerdog
+ support fan partner# 0 with proliant support pack 8.0 (thanks Mark Wagner)
+* 2.0.3.2 - 2008-05-03
+ fixed a typo in README
+* 2.0.3.1 - 2008-04-16
+ fixed a bug in path to perl binary
+ fixed a bug in --enable-perfdata (thanks Birk Bohne)
+* 2.0.3 - 2008-04-09
+ fixed a bug in dimm code
+ added blacklisting for raid controllers (thanks Andreas Schrogl)
+ added blacklisting for cache&battery (thanks Harrold Nabben)
+* 2.0.2 - 2008-02-11
+ empty cpu&fan sockets are now properly handled
+* 2.0.1 - 2008-02-08
+ multiline output for nagios 3.x
+* 2.0 - 2008-02-08
+ complete code redesign
+ integrated raid checking with hpacucli
+ (thanks Kelly Kristiaan van Vliet who was the first to propose this feature)
+ (thanks Mess for calling me "FAULE SAU!!!")
+* 1.6.2.2 - 2008-01-18
+ added debian 3.1 to the osses where multiple hpasmd are considered normal.
+* 1.6.2.1 - 2007-12-12
+ fixed a bug which caused overlooked fans. Thanks Michael Krebs.
+ such unknown patterns which might be important will be reported now.
+* 1.6.2 - 2007-11-16
+ Marcus Fleige contributed the -i and a more meaningful ok output
+* 1.6.1 - 2007-11-07
+ fixed a bug which caused overlooked failed fans
+* 1.6 - 2007-07-27
+ added performance data for fan speed and temperatures
+* 1.5.1 - 2007-07-11
+ hpasmcli can also be a link
+ fixed a bug, so more fan locations can be found
+* 1.5 - 2007-06-14
+ added support for userdefined temperature thresholds (Kelly Kristiaan van Vliet)
+* 1.4 - 2007-05-22
+ added support for hpasmxld und hpasmlited
+* 1.3 - 2007-04-17
+ added --with-degree to configure (celsius or fahrenheit output)
+ added -b/--blacklist
+ added trustix 2.2 to the osses where multipel hpasmd are considered normal.
+* 1.2 - 2007-04-16
+ added --with-noinst-level
+* 1.1 - 2007-04-14
+ First public release
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/INSTALL b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/INSTALL
new file mode 100755
index 0000000..54caf7c
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/INSTALL
@@ -0,0 +1,229 @@
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
+Foundation, Inc.
+
+ This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+ These are generic installation instructions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. (Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.)
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You only need
+`configure.ac' if you want to change it or regenerate `configure' using
+a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system. If you're
+ using `csh' on an old version of System V, you might need to type
+ `sh ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes awhile. While running, it prints some
+ messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 5. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ If you have to use a `make' that does not support the `VPATH'
+variable, you have to compile the package for one architecture at a
+time in the source code directory. After you have installed the
+package for one architecture, use `make distclean' before reconfiguring
+for another architecture.
+
+Installation Names
+==================
+
+ By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc. You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the `--target=TYPE' option to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+ Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+will cause the specified gcc to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+`configure' Invocation
+======================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+ Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/Makefile.am b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/Makefile.am
new file mode 100755
index 0000000..23522dc
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/Makefile.am
@@ -0,0 +1,6 @@
+## Process this file with automake to produce Makefile.in
+
+SUBDIRS = plugins-scripts
+
+dist-hook:
+ make
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/Makefile.in b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/Makefile.in
new file mode 100644
index 0000000..2a5a026
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/Makefile.in
@@ -0,0 +1,764 @@
+# Makefile.in generated by automake 1.15 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+ $(am__configure_deps) $(am__DIST_COMMON)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ cscope distdir dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+CSCOPE = cscope
+DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in AUTHORS COPYING ChangeLog \
+ INSTALL NEWS README TODO config.guess config.sub install-sh \
+ missing
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ if test -d "$(distdir)"; then \
+ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -rf "$(distdir)" \
+ || { sleep 5 && rm -rf "$(distdir)"; }; \
+ else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+DIST_TARGETS = dist-gzip
+distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CELSIUS = @CELSIUS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EXTENDEDINFO = @EXTENDEDINFO@
+HPACUCLI = @HPACUCLI@
+HWINFO = @HWINFO@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_OPTS = @INSTALL_OPTS@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NOINSTLEVEL = @NOINSTLEVEL@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERFDATA = @PERFDATA@
+PERL = @PERL@
+RELEASE = @RELEASE@
+SET_MAKE = @SET_MAKE@
+SH = @SH@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SUPPORT = @SUPPORT@
+VERSION = @VERSION@
+WARRANTY = @WARRANTY@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+with_nagios_group = @with_nagios_group@
+with_nagios_user = @with_nagios_user@
+SUBDIRS = plugins-scripts
+all: all-recursive
+
+.SUFFIXES:
+am--refresh: Makefile
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+ test ! -s cscope.files \
+ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+ -rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+ -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ test -d "$(distdir)" || mkdir "$(distdir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" distdir="$(distdir)" \
+ dist-hook
+ -test -n "$(am__skip_mode_fix)" \
+ || find "$(distdir)" -type d ! -perm -755 \
+ -exec chmod u+rwx,go+rx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__post_remove_distdir)
+
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+ $(am__post_remove_distdir)
+
+dist-lzip: distdir
+ tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+ $(am__post_remove_distdir)
+
+dist-xz: distdir
+ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+ $(am__post_remove_distdir)
+
+dist-tarZ: distdir
+ @echo WARNING: "Support for distribution archives compressed with" \
+ "legacy program 'compress' is deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__post_remove_distdir)
+
+dist-shar: distdir
+ @echo WARNING: "Support for shar distribution archives is" \
+ "deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__post_remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__post_remove_distdir)
+
+dist dist-all:
+ $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+ $(am__post_remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lz*) \
+ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+ *.tar.xz*) \
+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir)
+ chmod u+w $(distdir)
+ mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
+ chmod a-w $(distdir)
+ test -d $(distdir)/_build || exit 0; \
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && am__cwd=`pwd` \
+ && $(am__cd) $(distdir)/_build/sub \
+ && ../../configure \
+ $(AM_DISTCHECK_CONFIGURE_FLAGS) \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ --srcdir=../.. --prefix="$$dc_install_base" \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+ && cd "$$am__cwd" \
+ || exit 1
+ $(am__post_remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+ @test -n '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: trying to run $@ with an empty' \
+ '$$(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ $(am__cd) '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+ am--refresh check check-am clean clean-cscope clean-generic \
+ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
+ dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \
+ dist-zip distcheck distclean distclean-generic distclean-tags \
+ distcleancheck distdir distuninstallcheck dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
+
+
+dist-hook:
+ make
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/NEWS b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/NEWS
new file mode 100755
index 0000000..e69de29
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/NEWS
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/README b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/README
new file mode 100755
index 0000000..43fceac
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/README
@@ -0,0 +1,346 @@
+check_hpasm Nagios Plugin README
+---------------------
+
+This plugin checks the hardware health of HP Proliant servers with the
+hpasm software installed. It uses the hpasmcli command to acquire the
+condition of the system's critical components like cpus, power supplies,
+temperatures, fans and memory modules. Newer versions also use SNMP.
+
+* For instructions on installing this plugin for use with Nagios,
+ see below. In addition, generic instructions for the GNU toolchain
+ can be found in the INSTALL file.
+
+* For major changes between releases, read the CHANGES file.
+
+* For information on detailed changes that have been made,
+ read the Changelog file.
+
+* This plugins is self documenting. All plugins that comply with
+ the basic guidelines for development will provide detailed help when
+ invoked with the '-h' or '--help' options.
+
+You can check for the latest plugin at:
+ http://www.consol.de/opensource/nagios/check-hpasm
+
+Send mail to gerhard.lausser@consol.de for assistance.
+Please include the OS type and version that you are using.
+Also, run the plugin with the '-v' option and provide the resulting
+version information. Of course, there may be additional diagnostic information
+required as well. Use good judgment.
+
+
+How to "compile" the check_hpasm script.
+--------------------------------------------------------
+
+1) Run the configure script to initialize variables and create a Makefile, etc.
+
+ ./configure --prefix=BASEDIRECTORY --with-nagios-user=SOMEUSER --with-nagios-group=SOMEGROUP --with-perl=PATH_TO_PERL --with-noinst-level=LEVEL --with-degrees=UNIT --with-perfdata --with-hpacucli
+
+ a) Replace BASEDIRECTORY with the path of the directory under which Nagios
+ is installed (default is '/usr/local/nagios')
+ b) Replace SOMEUSER with the name of a user on your system that will be
+ assigned permissions to the installed plugins (default is 'nagios')
+ c) Replace SOMEGRP with the name of a group on your system that will be
+ assigned permissions to the installed plugins (default is 'nagios')
+ d) Replace PATH_TO_PERL with the path where a perl binary can be found.
+ Besides the system wide perl you might have installed a private perl
+ just for the nagios plugins (default is the perl in your path).
+ e) Replace LEVEL with one of ok, warning, critical or unknown.
+ If the required hpasm-rpm is not installed, the check_hpasm plugin
+ will exit with the level specified. If you chose ok, the message
+ will say "ok - .... hpasm is not installed". This is different from
+ the "ok - hardware working fine" if hpasm was found.
+ The default is to treat a missing hpasm package as ok.
+ f) Replace UNIT with one of celsius or fahrenheit. The hpasmcli "show temp"
+ prints temperatures both in units of celsius and fahrenheit. With the
+ --with-degrees option you can decide which units will be shown in an
+ alarm message.
+ The default is "celsius".
+ g) You can tell check_hpasm to output performance data by default if
+ you call configure with the --enable-perfdata option.
+ h) You can tell check_hpasm to check the raid status with the hpacucli command
+ if you call configure with the --enable-hpacucli option.
+ You need the hpacucli rpm.
+
+2) "Compile" the plugin with the following command:
+
+ make
+
+ This will produce a "check_hpasm" script. You will also find
+ a "check_hpasm.pl" which you better ignore. It is the base for
+ the compilation filled with placeholders. These will be replaced during
+ the make process.
+
+
+3) Install the compiled plugin script with the following command:
+
+ make install
+
+ The installation procedure will attempt to place the plugin in a
+ 'libexec/' subdirectory in the base directory you specified with
+ the --prefix argument to the configure script.
+
+
+4) Verify that your configuration files for Nagios contains
+ the correct paths to the new plugin.
+
+
+5) Add this line to /etc/sudoers:
+ nagios ALL=NOPASSWD: /sbin/hpasmcli
+ or ths, if you also installed the hpacu package
+ nagios ALL=NOPASSWD: /sbin/hpasmcli, /usr/sbin/hpacucli
+
+
+
+Command line parameters
+-----------------------
+
+-v, --verbose
+ Increased verbosity will print how check_hpasm communicates with the
+ hpasm daemon and which values were acquired.
+
+-t, --timeout
+ The number of seconds after which the plugin will abort.
+
+-b, --blacklist
+ If some components of your system are missing (mostly the secondary
+ power supply bay is empty) and you tolerate this, then blacklist the
+ missing/failed component to avoid false alarms.
+ The value for this option is a slash-separated list of components to
+ ignore.
+ Example: -b p:1,2/f:2/t:3,4/c:1/d:0-1,0-2
+ means: ignore power supplies #1 and #2, fan #2, temperature #3 and #4,
+ cpu #1 and dimms #1 and #2 in cartridge #0.
+
+-c, --customthresh
+ Override the machine-default temperature thresholds.
+ Example: -c 1:60/4:80/5:50
+ Sets limit for temperature 1 to 60 degrees, temperature 4 to 80 degrees
+ and temperature 5 to 50 degrees. You get the consecutive numbers by
+ calling check_hpasm -v
+ ...
+ checking temperatures
+ 1 processor_zone temperature is 46 (62 max)
+ 2 cpu#1 temperature is 43 (73 max)
+ 3 i/o_zone temperature is 54 (68 max)
+ 4 cpu#2 temperature is 46 (73 max)
+ 5 power_supply_bay temperature is 38 (55 max)
+
+-p, --perfdata
+ Add performance data to the output even if you did not compile check_hpasm
+ with --with-perfdata in step 1.
+
+
+
+SNMP and Memory Modules
+-----------------------
+Older hardware does not always show valuable information when queried for
+the health of memory modules. Maybe it's because older modules do not support
+error checking at all.
+
+
+1. no cpqHeResMemModule
+---------------------------------------------------------------------------
+
+2. collapsed cpqHeResMemModule
+---------------------------------------------------------------------------
+
+Some (older) systems do not support the cpqHeResMemModuleEntry table.
+Either there is no oid with 1.3.6.1.4.1.232.6.2.14.11.1 at all
+or there is a single oid like
+
+Example:
+iso.3.6.1.4.1.232.2.2.4.5.1.3.0.1 = INTEGER: 524288
+iso.3.6.1.4.1.232.2.2.4.5.1.3.0.2 = INTEGER: 262144
+iso.3.6.1.4.1.232.2.2.4.5.1.3.0.3 = INTEGER: 0
+iso.3.6.1.4.1.232.2.2.4.5.1.3.0.4 = INTEGER: 524288
+iso.3.6.1.4.1.232.2.2.4.5.1.3.0.5 = INTEGER: 262144
+iso.3.6.1.4.1.232.2.2.4.5.1.3.0.6 = INTEGER: 0
+
+ ^-- module number
+ ^-- cartridge number (0 = system board)
+ ^-- size
+
+iso.3.6.1.4.1.232.6.2.14.11.1.1.0.6 = INTEGER: 0
+
+I compared 300 systems and found out that with
+1.3.6.1.4.1.232.6.2.14.11.1.<no1>.<no2>.<no3> = <no4>
+no1 is always 1
+no2 is always 0
+no3 is the number of memory slots (including the empty ones).
+no4 is always 0. It is probably the health status of the
+overall memory subsystem. I don't know.
+I will implement 0 = ok, not 0 = ask compaq
+
+cpqSiMemECCStatus provides no usable information. All my test systems
+showed 0 which is an undocumented value.
+
+function get_size(cpqHeResMemModuleEntry) will return 1.
+
+3. cpqHeResMemModule containing crap
+---------------------------------------------------------------------------
+
+grepping for cpqSiMemBoardSize shows 4 modules
+iso.3.6.1.4.1.232.2.2.4.5.1.3.0.1 = INTEGER: 262144
+iso.3.6.1.4.1.232.2.2.4.5.1.3.0.2 = INTEGER: 262144
+iso.3.6.1.4.1.232.2.2.4.5.1.3.0.3 = INTEGER: 0
+iso.3.6.1.4.1.232.2.2.4.5.1.3.0.4 = INTEGER: 262144
+iso.3.6.1.4.1.232.2.2.4.5.1.3.0.5 = INTEGER: 262144
+iso.3.6.1.4.1.232.2.2.4.5.1.3.0.6 = INTEGER: 0
+
+grepping for cpqHeResMemEntry shows one module with zero values
+iso.3.6.1.4.1.232.6.2.14.11.1.1.0.0 = INTEGER: 0
+iso.3.6.1.4.1.232.6.2.14.11.1.2.0.0 = INTEGER: 0
+iso.3.6.1.4.1.232.6.2.14.11.1.3.0.0 = ""
+iso.3.6.1.4.1.232.6.2.14.11.1.4.0.0 = INTEGER: 0
+iso.3.6.1.4.1.232.6.2.14.11.1.5.0.0 = INTEGER: 0
+iso.3.6.1.4.1.232.6.2.14.11.1.6.0.0 = Hex-STRING: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+
+
+4. cpqHeResMemModuleEntry and cpqSiMemModuleEntry use different table indexes
+---------------------------------------------------------------------------
+
+cpqSiMemBoardIndex 1.3.6.1.4.1.232.2.2.4.5.1.1
+cpqSiMemModuleIndex 1.3.6.1.4.1.232.2.2.4.5.1.2
+
+cpqHeResMemBoardIndex 1.3.6.1.4.1.232.6.2.14.11.1.1
+cpqHeResMemModuleIndex 1.3.6.1.4.1.232.6.2.14.11.1.2
+
+
+cpqSiMemBoardIndex
+SNMPv2-SMI::enterprises.232.2.2.4.5.1.1.0.1 = INTEGER: 0
+SNMPv2-SMI::enterprises.232.2.2.4.5.1.1.0.2 = INTEGER: 0
+SNMPv2-SMI::enterprises.232.2.2.4.5.1.1.0.3 = INTEGER: 0
+SNMPv2-SMI::enterprises.232.2.2.4.5.1.1.0.4 = INTEGER: 0
+SNMPv2-SMI::enterprises.232.2.2.4.5.1.1.0.5 = INTEGER: 0
+SNMPv2-SMI::enterprises.232.2.2.4.5.1.1.0.6 = INTEGER: 0
+
+cpqHeResMemBoardIndex
+SNMPv2-SMI::enterprises.232.6.2.14.11.1.1.1.1 = INTEGER: 0
+SNMPv2-SMI::enterprises.232.6.2.14.11.1.1.1.2 = INTEGER: 0
+SNMPv2-SMI::enterprises.232.6.2.14.11.1.1.1.3 = INTEGER: 0
+SNMPv2-SMI::enterprises.232.6.2.14.11.1.1.1.4 = INTEGER: 0
+SNMPv2-SMI::enterprises.232.6.2.14.11.1.1.1.5 = INTEGER: 0
+SNMPv2-SMI::enterprises.232.6.2.14.11.1.1.1.6 = INTEGER: 0
+
+It is not possible to use the SNMP-table-indices to identify the
+corresponding he-entry. Matching is done with nested loops.
+
+5. even worse: cpqHeResMemBoardIndex and cpqSiMemBoardIndex don't match
+---------------------------------------------------------------------------
+
+cpqSiMemBoardIndex
+iso.3.6.1.4.1.232.2.2.4.5.1.1.1.1 = INTEGER: 1
+iso.3.6.1.4.1.232.2.2.4.5.1.1.1.2 = INTEGER: 1
+iso.3.6.1.4.1.232.2.2.4.5.1.1.1.3 = INTEGER: 1
+iso.3.6.1.4.1.232.2.2.4.5.1.1.1.4 = INTEGER: 1
+iso.3.6.1.4.1.232.2.2.4.5.1.1.1.5 = INTEGER: 1
+iso.3.6.1.4.1.232.2.2.4.5.1.1.1.6 = INTEGER: 1
+iso.3.6.1.4.1.232.2.2.4.5.1.1.1.7 = INTEGER: 1
+iso.3.6.1.4.1.232.2.2.4.5.1.1.1.8 = INTEGER: 1
+iso.3.6.1.4.1.232.2.2.4.5.1.1.2.1 = INTEGER: 2
+iso.3.6.1.4.1.232.2.2.4.5.1.1.2.2 = INTEGER: 2
+iso.3.6.1.4.1.232.2.2.4.5.1.1.2.3 = INTEGER: 2
+iso.3.6.1.4.1.232.2.2.4.5.1.1.2.4 = INTEGER: 2
+iso.3.6.1.4.1.232.2.2.4.5.1.1.2.5 = INTEGER: 2
+iso.3.6.1.4.1.232.2.2.4.5.1.1.2.6 = INTEGER: 2
+iso.3.6.1.4.1.232.2.2.4.5.1.1.2.7 = INTEGER: 2
+iso.3.6.1.4.1.232.2.2.4.5.1.1.2.8 = INTEGER: 2
+iso.3.6.1.4.1.232.2.2.4.5.1.1.3.1 = INTEGER: 3
+
+cpqHeResMemBoardIndex
+iso.3.6.1.4.1.232.6.2.14.11.1.1.0.1 = INTEGER: 0
+iso.3.6.1.4.1.232.6.2.14.11.1.1.0.2 = INTEGER: 0
+iso.3.6.1.4.1.232.6.2.14.11.1.1.0.3 = INTEGER: 0
+iso.3.6.1.4.1.232.6.2.14.11.1.1.0.4 = INTEGER: 0
+iso.3.6.1.4.1.232.6.2.14.11.1.1.0.5 = INTEGER: 0
+iso.3.6.1.4.1.232.6.2.14.11.1.1.0.6 = INTEGER: 0
+iso.3.6.1.4.1.232.6.2.14.11.1.1.0.7 = INTEGER: 0
+iso.3.6.1.4.1.232.6.2.14.11.1.1.0.8 = INTEGER: 0
+iso.3.6.1.4.1.232.6.2.14.11.1.1.1.1 = INTEGER: 1
+iso.3.6.1.4.1.232.6.2.14.11.1.1.1.2 = INTEGER: 1
+iso.3.6.1.4.1.232.6.2.14.11.1.1.1.3 = INTEGER: 1
+iso.3.6.1.4.1.232.6.2.14.11.1.1.1.4 = INTEGER: 1
+iso.3.6.1.4.1.232.6.2.14.11.1.1.1.5 = INTEGER: 1
+iso.3.6.1.4.1.232.6.2.14.11.1.1.1.6 = INTEGER: 1
+iso.3.6.1.4.1.232.6.2.14.11.1.1.1.7 = INTEGER: 1
+iso.3.6.1.4.1.232.6.2.14.11.1.1.1.8 = INTEGER: 1
+iso.3.6.1.4.1.232.6.2.14.11.1.1.2.1 = INTEGER: 2
+
+
+Redundant fans
+-----------------------
+I saw one old server which had only half of the possible fans installed.
+
+Fan# 1 2 3 4 5 6
+
+cpqHeFltTolFanPresent yes no yes no yes no
+cpqHeFltTolFanRedundant no no no no no no
+cpqHeFltTolFanRedundantPartner 2 1 4 3 6 5
+cpqHeFltTolFanCondition ok other ok other ok other
+cpqHeFltTolFanLocation cpu cpu cpu cpu io io
+
+Normally this would result in
+...
+fan #1 (cpu) is not redundant
+fan #2 (cpu) is not redundant
+fan #3 (cpu) is not redundant
+fan #4 (cpu) is not redundant
+fan #5 (ioboard) is not redundant
+fan #6 (ioboard) is not redundant
+WARNING - fan #1 (cpu) is not redundant, fan #2 (cpu) is not redundant, fan #3 (cpu) is not redundant, fan #4 (cpu) is not redundant, fan #5 (ioboard) is not redundant, fan #6 (ioboard) is not redundant
+
+However it was the server's owner decision not to install fan pairs but only one fan per location, so for him this is a false alert.
+
+By using --ignore-fan-redundancy check_hpasm only looks at the cpqHeFltTolFanCondition and ignores dependencies between two fans, so the result is:
+
+fan 1 speed is normal, pctmax is 50%, location is cpu, redundance is no, partner is 2
+fan 3 speed is normal, pctmax is 50%, location is cpu, redundance is no, partner is 4
+fan 5 speed is normal, pctmax is 50%, location is ioboard, redundance is no, partner is 6
+OK - System: 'proliant ml370 g3', ...
+
+
+A snmp forwarding trick
+-----------------------
+local - where check_hpasm runs
+remote - where a proliant can be reached
+proliant - where the snmp agent runs
+
+remote:
+ssh -R6667:localhost:6667 local
+socat tcp4-listen:6667,reuseaddr,fork UDP:proliant:161
+
+local:
+socat udp4-listen:161,reuseaddr,fork tcp:localhost:6667
+check_hpasm --hostname 127.0.0.1
+
+
+Sample data from real machines
+------------------------------
+
+hpasmcli=$(which hpasmcli)
+hpacucli=$(which hpacucli)
+for i in server powersupply fans temp dimm
+do
+ $hpasmcli -s "show $i" | while read line
+ do
+ printf "%s %s\n" $i "$line"
+ done
+done
+if [ -x "$hpacucli" ]; then
+ for i in config status
+ do
+ $hpacucli ctrl all show $i | while read line
+ do
+ printf "%s %s\n" $i "$line"
+ done
+ done
+fi
+
+If you think check_hpasm is not working correctly, please run the above script
+and send me the output. It's also helpful to see the output of snmpwalk
+snmpwalk .... 1.3.6.1.4.1.232
+
+
+--
+Gerhard Lausser <gerhard.lausser@consol.de>
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/TODO b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/TODO
new file mode 100755
index 0000000..64291ca
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/TODO
@@ -0,0 +1,71 @@
+"1.3.6.1.4.1.232.6.2.9.3.1.4.0"; /* PSU Table */
+warning = 3, critical = 4
+
+"1.3.6.1.4.1.232.6.2.6.4.0"; /* Fan status */
+oder auch .... 7
+warning = 3, critical = 4
+3=non-required fan im arsch
+4=required fan im arsch
+
+
+"1.3.6.1.4.1.232.3.2.5.1.1.5"; /* Location Table */
+"1.3.6.1.4.1.232.3.2.5.1.1.6"; /* Drive Table */
+"1.3.6.1.4.1.232.3.2.5.1.1.50"; /* Drive Bus */
+
+
+"1.3.6.1.4.1.232.6.2.6.8.1.4.1"; /* Temperature table */
+
+ml370g4
+ "Processor zone",
+ "CPU 1",
+ "I/O zone",
+ "CPU 2"
+ 57.0, 80.0, 53.0, 80.0
+
+dl385g1
+ "CPU 1",
+ "I/O zone",
+ "CPU 2",
+ "Processor zone",
+ "PSU bay"
+ 100.0, 62.0, 100.0, 60.0, 51.0
+
+dl380g4
+ "Processor zone",
+ "CPU 1",
+ "I/O zone",
+ "CPU 2",
+ "PSU bay"
+ 62.0, 80.0, 60.0, 80.0, 50.0
+
+dl380g3
+ "Processor zone",
+ "CPU 1",
+ "I/O zone",
+ "CPU 2",
+ "PSU bay"
+ 62.0, 73.0, 68.0, 73.0, 53.0
+
+dl360g4
+ "I/O zone",
+ "CPU 1",
+ "CPU 2",
+ "PSU bay",
+ "System board"
+ 63.0, 85.0, 85.0, 48.0, 41.0
+
+dl360g3
+ "Processor zone",
+ "CPU 1",
+ "I/O zone",
+ "CPU 2"
+ 56.0, 67.0, 57.0, 67.0
+
+dl329g3
+ "Processor zone",
+ "CPU 1",
+ "I/O zone"
+ 41.0, 85.0, 52.0
+
+
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/acinclude.m4 b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/acinclude.m4
new file mode 100755
index 0000000..788d68e
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/acinclude.m4
@@ -0,0 +1,78 @@
+dnl @synopsis ACX_WHICH_GETHOSTBYNAME_R
+dnl
+dnl Provides a test to determine the correct way to call gethostbyname_r
+dnl
+dnl defines HAVE_GETHOSTBYNAME_R to the number of arguments required
+dnl
+dnl e.g. 6 arguments (linux)
+dnl e.g. 5 arguments (solaris)
+dnl e.g. 3 arguments (osf/1)
+dnl
+dnl @version $Id: acinclude.m4,v 1.5 2004/02/18 14:56:34 kdebisschop Exp $
+dnl @author Brian Stafford <brian@stafford.uklinux.net>
+dnl
+dnl based on version by Caolan McNamara <caolan@skynet.ie>
+dnl based on David Arnold's autoconf suggestion in the threads faq
+dnl
+AC_DEFUN([ACX_WHICH_GETHOSTBYNAME_R],
+[AC_CACHE_CHECK(number of arguments to gethostbyname_r,
+ acx_which_gethostbyname_r, [
+ AC_TRY_COMPILE([
+# include <netdb.h>
+ ], [
+
+ char *name;
+ struct hostent *he;
+ struct hostent_data data;
+ (void) gethostbyname_r(name, he, &data);
+
+ ],acx_which_gethostbyname_r=3,
+ [
+dnl acx_which_gethostbyname_r=0
+ AC_TRY_COMPILE([
+# include <netdb.h>
+ ], [
+ char *name;
+ struct hostent *he, *res;
+ char *buffer = NULL;
+ int buflen = 2048;
+ int h_errnop;
+ (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
+ ],acx_which_gethostbyname_r=6,
+
+ [
+dnl acx_which_gethostbyname_r=0
+ AC_TRY_COMPILE([
+# include <netdb.h>
+ ], [
+ char *name;
+ struct hostent *he;
+ char *buffer = NULL;
+ int buflen = 2048;
+ int h_errnop;
+ (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
+ ],acx_which_gethostbyname_r=5,acx_which_gethostbyname_r=0)
+
+ ]
+
+ )
+ ]
+ )
+ ])
+
+if test $acx_which_gethostbyname_r -gt 0 ; then
+ AC_DEFINE_UNQUOTED([HAVE_GETHOSTBYNAME_R], $acx_which_gethostbyname_r,
+ [Number of parameters to gethostbyname_r or 0 if not available])
+fi
+
+])
+
+dnl @synopsis ACX_HELP_STRING(OPTION,DESCRIPTION)
+AC_DEFUN([ACX_HELP_STRING],
+ [ $1 builtin([substr],[ ],len($1))[$2]])
+
+
+dnl @synopsis ACX_FEATURE(ENABLE_OR_WITH,NAME[,VALUE])
+AC_DEFUN([ACX_FEATURE],
+ [echo "builtin([substr],[ ],len(--$1-$2))--$1-$2: ifelse($3,,[$]translit($1-$2,-,_),$3)"])
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/aclocal.m4 b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/aclocal.m4
new file mode 100644
index 0000000..247ef18
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/aclocal.m4
@@ -0,0 +1,758 @@
+# generated automatically by aclocal 1.15 -*- Autoconf -*-
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
+[m4_warning([this file was generated for autoconf 2.69.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
+
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.15'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.15], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.15])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
+# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is '.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.65])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[AC_DIAGNOSE([obsolete],
+ [$0: two- and three-arguments forms are deprecated.])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(
+ m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+ [ok:ok],,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES([CC])],
+ [m4_define([AC_PROG_CC],
+ m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES([CXX])],
+ [m4_define([AC_PROG_CXX],
+ m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES([OBJC])],
+ [m4_define([AC_PROG_OBJC],
+ m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+ [_AM_DEPENDENCIES([OBJCXX])],
+ [m4_define([AC_PROG_OBJCXX],
+ m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
+])
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
+dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+ fi
+fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
+])
+
+dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST([install_sh])])
+
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
+else
+ am_missing_run=
+ AC_MSG_WARN(['missing' script is too old or missing])
+fi
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ (exit $ac_status); }])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+ alias in your environment])
+ fi
+ if test "$[2]" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+ [AC_MSG_CHECKING([that generated files are newer than configure])
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
+
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# ("yes" being less verbose, "no" or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules], [dnl
+AS_HELP_STRING(
+ [--enable-silent-rules],
+ [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+ [--disable-silent-rules],
+ [verbose build output (undo: "make V=0")])dnl
+])
+case $enable_silent_rules in @%:@ (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+dnl
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+ [am_cv_make_support_nested_variables],
+ [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+ dnl Using '$V' instead of '$(V)' breaks IRIX make.
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor 'install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in "make install-strip", and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of 'v7', 'ustar', or 'pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+#
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+ [m4_case([$1],
+ [ustar],
+ [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+ # There is notably a 21 bits limit for the UID and the GID. In fact,
+ # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+ # and bug#13588).
+ am_max_uid=2097151 # 2^21 - 1
+ am_max_gid=$am_max_uid
+ # The $UID and $GID variables are not portable, so we need to resort
+ # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
+ # below are definitely unexpected, so allow the users to see them
+ # (that is, avoid stderr redirection).
+ am_uid=`id -u || echo unknown`
+ am_gid=`id -g || echo unknown`
+ AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+ if test $am_uid -le $am_max_uid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi
+ AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+ if test $am_gid -le $am_max_gid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi],
+
+ [pax],
+ [],
+
+ [m4_fatal([Unknown tar format])])
+
+ AC_MSG_CHECKING([how to create a $1 tar archive])
+
+ # Go ahead even if we have the value already cached. We do so because we
+ # need to set the values for the 'am__tar' and 'am__untar' variables.
+ _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+ for _am_tool in $_am_tools; do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar; do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ AM_RUN_LOG([cat conftest.dir/file])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+ done
+ rm -rf conftest.dir
+
+ AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+ AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([acinclude.m4])
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/config.guess b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/config.guess
new file mode 100755
index 0000000..b79252d
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/config.guess
@@ -0,0 +1,1558 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright 1992-2013 Free Software Foundation, Inc.
+
+timestamp='2013-06-10'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2013 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ eval $set_cc_for_build
+ cat <<-EOF > $dummy.c
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ ;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ exitcode=$?
+ trap '' 0
+ exit $exitcode ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case ${UNAME_PROCESSOR} in
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ cris:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ crisv32:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ frv:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ hexagon:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:Linux:*:*)
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ ;;
+ or1k:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ or32:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-${LIBC}
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-${LIBC}
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-${LIBC}
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-${LIBC}
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ tile*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ exit ;;
+ x86_64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ eval $set_cc_for_build
+ if test "$UNAME_PROCESSOR" = unknown ; then
+ UNAME_PROCESSOR=powerpc
+ fi
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ fi
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NEO-?:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSE-*:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
+ exit ;;
+esac
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/config.sub b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/config.sub
new file mode 100755
index 0000000..8b612ab
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/config.sub
@@ -0,0 +1,1788 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright 1992-2013 Free Software Foundation, Inc.
+
+timestamp='2013-04-24'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2013 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ android-linux)
+ os=-linux-android
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray | -microblaze*)
+ os=
+ basic_machine=$1
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*178)
+ os=-lynxos178
+ ;;
+ -lynx*5)
+ os=-lynxos5
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | aarch64 | aarch64_be \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arceb \
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+ | avr | avr32 \
+ | be32 | be64 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | epiphany \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | le32 | le64 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nios | nios2 | nios2eb | nios2el \
+ | ns16k | ns32k \
+ | open8 \
+ | or1k | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pyramid \
+ | rl78 | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu \
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | we32k \
+ | x86 | xc16x | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ strongarm | thumb | xscale)
+ basic_machine=arm-unknown
+ ;;
+ xgate)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ xscaleeb)
+ basic_machine=armeb-unknown
+ ;;
+
+ xscaleel)
+ basic_machine=armel-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | aarch64-* | aarch64_be-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | be32-* | be64-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | hexagon-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | le32-* | le64-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | microblaze-* | microblazeel-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipsr5900-* | mipsr5900el-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nds32-* | nds32le-* | nds32be-* \
+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | open8-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pyramid-* \
+ | rl78-* | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | tahoe-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile*-* \
+ | tron-* \
+ | ubicom32-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16 | cr16-*)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ microblaze*)
+ basic_machine=microblaze-xilinx
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ msys)
+ basic_machine=i386-pc
+ os=-msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ os=-nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc | ppcbe) basic_machine=powerpc-unknown
+ ;;
+ ppc-* | ppcbe-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=-rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ strongarm-* | thumb-*)
+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tile*)
+ basic_machine=$basic_machine-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ xscale-* | xscalee[bl]-*)
+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -auroraux)
+ os=-auroraux
+ ;;
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* | -plan9* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -nacl*)
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ hexagon-*)
+ os=-elf
+ ;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or1k-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -cnk*|-aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/configure b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/configure
new file mode 100755
index 0000000..821e463
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/configure
@@ -0,0 +1,4028 @@
+#! /bin/sh
+# From configure.in .
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.69 for check_hpasm 4.8.
+#
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='check_hpasm'
+PACKAGE_TARNAME='check_hpasm'
+PACKAGE_VERSION='4.8'
+PACKAGE_STRING='check_hpasm 4.8'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+ac_default_prefix=/usr/local/nagios
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+PERL
+SH
+HPACUCLI
+HWINFO
+EXTENDEDINFO
+PERFDATA
+CELSIUS
+NOINSTLEVEL
+INSTALL_OPTS
+with_nagios_group
+with_nagios_user
+SUPPORT
+WARRANTY
+INSTALL
+RELEASE
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+runstatedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_silent_rules
+with_nagios_user
+with_nagios_group
+with_noinst_level
+with_degrees
+enable_perfdata
+enable_extendedinfo
+enable_hwinfo
+enable_hpacucli
+with_perl
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir runstatedir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures check_hpasm 4.8 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/check_hpasm]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of check_hpasm 4.8:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-silent-rules less verbose build output (undo: "make V=1")
+ --disable-silent-rules verbose build output (undo: "make V=0")
+ --enable-perfdata wether to output perfdata (default=no)
+ --enable-extendedinfo wether to output extended info (default=no)
+ --disable-hwinfo wether to output model desc., serial no., bios version (default=yes)
+ --enable-hpacucli wether to check raid status with hpacucli (default=no)
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-nagios-user=USER set user name to run nagios
+ --with-nagios-group=GROUP set group name to run nagios
+ --with-noinst-level=LEVEL error level if hpasm is not installed
+ --with-degrees=UNIT which temperature unit to use. (celsius or fahrenheit)
+ --with-perl=PATH sets path to perl executable
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+check_hpasm configure 4.8
+generated by GNU Autoconf 2.69
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by check_hpasm $as_me 4.8, which was
+generated by GNU Autoconf 2.69. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+am__api_version='1.15'
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+ alias in your environment" "$LINENO" 5
+ fi
+ if test "$2" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if ${ac_cv_path_mkdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=1;;
+esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='check_hpasm'
+ VERSION='4.8'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar pax cpio none'
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a pax tar archive" >&5
+$as_echo_n "checking how to create a pax tar archive... " >&6; }
+
+ # Go ahead even if we have the value already cached. We do so because we
+ # need to set the values for the 'am__tar' and 'am__untar' variables.
+ _am_tools=${am_cv_prog_tar_pax-$_am_tools}
+
+ for _am_tool in $_am_tools; do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar; do
+ { echo "$as_me:$LINENO: $_am_tar --version" >&5
+ ($_am_tar --version) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && break
+ done
+ am__tar="$_am_tar --format=posix -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=posix -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x pax -w "$$tardir"'
+ am__tar_='pax -L -x pax -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H pax -L'
+ am__tar_='find "$tardir" -print | cpio -o -H pax -L'
+ am__untar='cpio -i -H pax -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_pax}" && break
+
+ # tar/untar a dummy directory, and stop if the command works.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
+ (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
+ ($am__untar <conftest.tar) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ { echo "$as_me:$LINENO: cat conftest.dir/file" >&5
+ (cat conftest.dir/file) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+ done
+ rm -rf conftest.dir
+
+ if ${am_cv_prog_tar_pax+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ am_cv_prog_tar_pax=$_am_tool
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_pax" >&5
+$as_echo "$am_cv_prog_tar_pax" >&6; }
+
+
+
+
+
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
+ fi
+fi
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+
+RELEASE=1
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+
+WARRANTY="This plugin comes with ABSOLUTELY NO WARRANTY. You may redistribute\ncopies of the plugin under the terms of the GNU General Public License.\nFor more information about these matters, see the file named COPYING.\n"
+
+
+SUPPORT="Send email to gerhard.lausser@consol.de if you have questions\nregarding use of this software.\nPlease include version information with all correspondence (when possible,\nuse output from the --version option of the plugin itself).\n"
+
+
+
+# Check whether --with-nagios_user was given.
+if test "${with_nagios_user+set}" = set; then :
+ withval=$with_nagios_user; with_nagios_user=$withval
+else
+ with_nagios_user=nagios
+fi
+
+
+# Check whether --with-nagios_group was given.
+if test "${with_nagios_group+set}" = set; then :
+ withval=$with_nagios_group; with_nagios_group=$withval
+else
+ with_nagios_group=nagios
+fi
+
+
+
+INSTALL_OPTS="-o $with_nagios_user -g $with_nagios_group"
+
+
+# Check whether --with-noinst_level was given.
+if test "${with_noinst_level+set}" = set; then :
+ withval=$with_noinst_level; with_noinst_level=$withval
+else
+ with_noinst_level=unknown
+fi
+
+NOINSTLEVEL=$with_noinst_level
+
+
+# Check whether --with-degrees was given.
+if test "${with_degrees+set}" = set; then :
+ withval=$with_degrees; with_degrees=$withval
+else
+ with_degrees=unknown
+fi
+
+case "$with_degrees" in
+ fahrenheit)
+ CELSIUS=0
+
+ ;;
+ *)
+ CELSIUS=1
+
+ ;;
+esac
+# Check whether --enable-perfdata was given.
+if test "${enable_perfdata+set}" = set; then :
+ enableval=$enable_perfdata;
+else
+ enable_perfdata=no
+fi
+
+if test x"$enable_perfdata" = xyes ; then
+ PERFDATA=1
+
+else
+ PERFDATA=0
+
+fi
+# Check whether --enable-extendedinfo was given.
+if test "${enable_extendedinfo+set}" = set; then :
+ enableval=$enable_extendedinfo;
+else
+ enable_extendedinfo=no
+fi
+
+if test x"$enable_extendedinfo" = xyes ; then
+ EXTENDEDINFO=1
+
+else
+ EXTENDEDINFO=0
+
+fi
+# Check whether --enable-hwinfo was given.
+if test "${enable_hwinfo+set}" = set; then :
+ enableval=$enable_hwinfo;
+else
+ enable_hwinfo=yes
+fi
+
+
+if test x"$enable_hwinfo" = xyes ; then
+ HWINFO=1
+
+else
+ HWINFO=0
+
+fi
+# Check whether --enable-hpacucli was given.
+if test "${enable_hpacucli+set}" = set; then :
+ enableval=$enable_hpacucli;
+else
+ enable_hpacucli=no
+fi
+
+
+if test x"$enable_hpacucli" = xyes ; then
+ HPACUCLI=1
+
+elif test x"$enable_hpacucli" = xmaybe ; then
+ HPACUCLI=2
+
+else
+ HPACUCLI=0
+
+fi
+
+
+
+
+
+case "$host_os" in
+ *hp*)
+ defaulttrustedpath=/bin:/sbin:/usr/bin:/usr/sbin:/usr/contrib/bin
+ ;;
+ *)
+ defaulttrustedpath=/bin:/sbin:/usr/bin:/usr/sbin
+ ;;
+esac
+
+EXTRAS=
+
+# Extract the first word of "sh", so it can be a program name with args.
+set dummy sh; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_SH+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $SH in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_SH="$SH" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+SH=$ac_cv_path_SH
+if test -n "$SH"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
+$as_echo "$SH" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PERL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PERL in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PERL=$ac_cv_path_PERL
+if test -n "$PERL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
+$as_echo "$PERL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+# Check whether --with-perl was given.
+if test "${with_perl+set}" = set; then :
+ withval=$with_perl; with_perl=$withval
+else
+ with_perl=$PERL
+fi
+
+PERL=$with_perl
+
+
+ac_config_files="$ac_config_files Makefile plugins-scripts/Makefile plugins-scripts/subst"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
+
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by check_hpasm $as_me 4.8, which was
+generated by GNU Autoconf 2.69. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+check_hpasm config.status 4.8
+configured by $0, generated by GNU Autoconf 2.69,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "plugins-scripts/Makefile") CONFIG_FILES="$CONFIG_FILES plugins-scripts/Makefile" ;;
+ "plugins-scripts/subst") CONFIG_FILES="$CONFIG_FILES plugins-scripts/subst" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X " :F $CONFIG_FILES "
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+
+
+
+ esac
+
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+
+echo " --with-perl: $with_perl"
+echo " --with-nagios-user: $with_nagios_user"
+echo " --with-nagios-group: $with_nagios_group"
+echo " --with-noinst-level: $with_noinst_level"
+echo " --with-degrees: $with_degrees"
+echo " --enable-perfdata: $enable_perfdata"
+echo " --enable-extendedinfo: $enable_extendedinfo"
+echo " --enable-hwinfo: $enable_hwinfo"
+echo " --enable-hpacucli: $enable_hpacucli"
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/configure.in b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/configure.in
new file mode 100755
index 0000000..ba41d6e
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/configure.in
@@ -0,0 +1,133 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_REVISION ($Revision: 1.150 $)
+AC_PREREQ(2.58)
+AC_INIT(check_hpasm,4.8)
+AM_INIT_AUTOMAKE([1.9 tar-pax])
+AC_CANONICAL_HOST
+
+RELEASE=1
+AC_SUBST(RELEASE)
+
+AC_PREFIX_DEFAULT(/usr/local/nagios)
+
+dnl Figure out how to invoke "install" and what install options to use.
+AC_PROG_INSTALL
+AC_SUBST(INSTALL)
+
+AC_PROG_MAKE_SET
+AC_PROG_AWK
+
+WARRANTY="This plugin comes with ABSOLUTELY NO WARRANTY. You may redistribute\ncopies of the plugin under the terms of the GNU General Public License.\nFor more information about these matters, see the file named COPYING.\n"
+AC_SUBST(WARRANTY)
+
+SUPPORT="Send email to gerhard.lausser@consol.de if you have questions\nregarding use of this software.\nPlease include version information with all correspondence (when possible,\nuse output from the --version option of the plugin itself).\n"
+AC_SUBST(SUPPORT)
+
+AC_ARG_WITH(nagios_user,
+ ACX_HELP_STRING([--with-nagios-user=USER],
+ [set user name to run nagios]),
+ with_nagios_user=$withval,
+ with_nagios_user=nagios)
+AC_ARG_WITH(nagios_group,
+ ACX_HELP_STRING([--with-nagios-group=GROUP],
+ [set group name to run nagios]),
+ with_nagios_group=$withval,
+ with_nagios_group=nagios)
+AC_SUBST(with_nagios_user)
+AC_SUBST(with_nagios_group)
+INSTALL_OPTS="-o $with_nagios_user -g $with_nagios_group"
+AC_SUBST(INSTALL_OPTS)
+AC_ARG_WITH(noinst_level,
+ ACX_HELP_STRING([--with-noinst-level=LEVEL],
+ [error level if hpasm is not installed]),
+ with_noinst_level=$withval,
+ with_noinst_level=unknown)
+AC_SUBST(NOINSTLEVEL, $with_noinst_level)
+AC_ARG_WITH(degrees,
+ ACX_HELP_STRING([--with-degrees=UNIT],
+ [which temperature unit to use. (celsius or fahrenheit)]),
+ with_degrees=$withval,
+ with_degrees=unknown)
+case "$with_degrees" in
+ fahrenheit)
+ AC_SUBST(CELSIUS, 0)
+ ;;
+ *)
+ AC_SUBST(CELSIUS, 1)
+ ;;
+esac
+AC_ARG_ENABLE([perfdata],
+[ --enable-perfdata wether to output perfdata (default=no)], ,enable_perfdata=no)
+if test x"$enable_perfdata" = xyes ; then
+ AC_SUBST(PERFDATA, 1)
+else
+ AC_SUBST(PERFDATA, 0)
+fi
+AC_ARG_ENABLE([extendedinfo],
+[ --enable-extendedinfo wether to output extended info (default=no)], ,enable_extendedinfo=no)
+if test x"$enable_extendedinfo" = xyes ; then
+ AC_SUBST(EXTENDEDINFO, 1)
+else
+ AC_SUBST(EXTENDEDINFO, 0)
+fi
+AC_ARG_ENABLE([hwinfo],
+[ --disable-hwinfo wether to output model desc., serial no., bios version (default=yes)], ,enable_hwinfo=yes)
+
+if test x"$enable_hwinfo" = xyes ; then
+ AC_SUBST(HWINFO, 1)
+else
+ AC_SUBST(HWINFO, 0)
+fi
+AC_ARG_ENABLE([hpacucli],
+[ --enable-hpacucli wether to check raid status with hpacucli (default=no)], ,enable_hpacucli=no)
+
+if test x"$enable_hpacucli" = xyes ; then
+ AC_SUBST(HPACUCLI, 1)
+elif test x"$enable_hpacucli" = xmaybe ; then
+ AC_SUBST(HPACUCLI, 2)
+else
+ AC_SUBST(HPACUCLI, 0)
+fi
+
+
+
+
+
+case "$host_os" in
+ *hp*)
+ defaulttrustedpath=/bin:/sbin:/usr/bin:/usr/sbin:/usr/contrib/bin
+ ;;
+ *)
+ defaulttrustedpath=/bin:/sbin:/usr/bin:/usr/sbin
+ ;;
+esac
+
+EXTRAS=
+dnl PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/etc:/usr/local/bin:/usr/local/sbin:$PATH
+
+dnl Checks for programs.
+AC_PATH_PROG(SH,sh)
+AC_PATH_PROG(PERL,perl)
+
+dnl allow them to override the path of perl
+AC_ARG_WITH(perl,
+ ACX_HELP_STRING([--with-perl=PATH],
+ [sets path to perl executable]),
+ with_perl=$withval,with_perl=$PERL)
+AC_SUBST(PERL, $with_perl)
+
+AC_OUTPUT(
+ Makefile
+ plugins-scripts/Makefile
+ plugins-scripts/subst
+)
+
+ACX_FEATURE([with],[perl])
+ACX_FEATURE([with],[nagios-user])
+ACX_FEATURE([with],[nagios-group])
+ACX_FEATURE([with],[noinst-level])
+ACX_FEATURE([with],[degrees])
+ACX_FEATURE([enable],[perfdata])
+ACX_FEATURE([enable],[extendedinfo])
+ACX_FEATURE([enable],[hwinfo])
+ACX_FEATURE([enable],[hpacucli])
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/install-sh b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/install-sh
new file mode 100755
index 0000000..377bb86
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/install-sh
@@ -0,0 +1,527 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2011-11-20.07; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# 'make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" "" $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+ test "$posix_glob" != "?" || {
+ if (set -f) 2>/dev/null; then
+ posix_glob=
+ else
+ posix_glob=:
+ fi
+ }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve the last data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -s $stripprog installed files.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
+
+ -C) copy_on_change=true;;
+
+ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
+
+ -o) chowncmd="$chownprog $2"
+ shift;;
+
+ -s) stripcmd=$stripprog;;
+
+ -t) dst_arg=$2
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
+
+ -T) no_target_directory=true;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+ shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ done
+fi
+
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call 'install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+if test -z "$dir_arg"; then
+ do_exit='(exit $ret); exit $ret'
+ trap "ret=129; $do_exit" 1
+ trap "ret=130; $do_exit" 2
+ trap "ret=141; $do_exit" 13
+ trap "ret=143; $do_exit" 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
+for src
+do
+ # Protect names problematic for 'test' and other utilities.
+ case $src in
+ -* | [=\(\)!]) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dst_arg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+ dst=$dst_arg
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dst=$dstdir/`basename "$src"`
+ dstdir_status=0
+ else
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix='/';;
+ [-=\(\)!]*) prefix='./';;
+ *) prefix='';;
+ esac
+
+ eval "$initialize_posix_glob"
+
+ oIFS=$IFS
+ IFS=/
+ $posix_glob set -f
+ set fnord $dstdir
+ shift
+ $posix_glob set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test X"$d" = X && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+ eval "$initialize_posix_glob" &&
+ $posix_glob set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ $posix_glob set +f &&
+
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/missing b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/missing
new file mode 100755
index 0000000..cdea514
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/missing
@@ -0,0 +1,215 @@
+#! /bin/sh
+# Common wrapper for a few potentially missing GNU programs.
+
+scriptversion=2012-06-26.16; # UTC
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try '$0 --help' for more information"
+ exit 1
+fi
+
+case $1 in
+
+ --is-lightweight)
+ # Used by our autoconf macros to check whether the available missing
+ # script is modern enough.
+ exit 0
+ ;;
+
+ --run)
+ # Back-compat with the calling convention used by older automake.
+ shift
+ ;;
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+
+Supported PROGRAM values:
+ aclocal autoconf autoheader autom4te automake makeinfo
+ bison yacc flex lex help2man
+
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
+
+Send bug reports to <bug-automake@gnu.org>."
+ exit $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ echo 1>&2 "$0: unknown '$1' option"
+ echo 1>&2 "Try '$0 --help' for more information"
+ exit 1
+ ;;
+
+esac
+
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch. This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+ msg="probably too old"
+elif test $st -eq 127; then
+ # Program was missing.
+ msg="missing on your system"
+else
+ # Program was found and executed, but failed. Give up.
+ exit $st
+fi
+
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+ case $1 in
+ aclocal|automake)
+ echo "The '$1' program is part of the GNU Automake package:"
+ echo "<$gnu_software_URL/automake>"
+ echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/autoconf>"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ autoconf|autom4te|autoheader)
+ echo "The '$1' program is part of the GNU Autoconf package:"
+ echo "<$gnu_software_URL/autoconf/>"
+ echo "It also requires GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ esac
+}
+
+give_advice ()
+{
+ # Normalize program name to check for.
+ normalized_program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+ printf '%s\n' "'$1' is $msg."
+
+ configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+ case $normalized_program in
+ autoconf*)
+ echo "You should only need it if you modified 'configure.ac',"
+ echo "or m4 files included by it."
+ program_details 'autoconf'
+ ;;
+ autoheader*)
+ echo "You should only need it if you modified 'acconfig.h' or"
+ echo "$configure_deps."
+ program_details 'autoheader'
+ ;;
+ automake*)
+ echo "You should only need it if you modified 'Makefile.am' or"
+ echo "$configure_deps."
+ program_details 'automake'
+ ;;
+ aclocal*)
+ echo "You should only need it if you modified 'acinclude.m4' or"
+ echo "$configure_deps."
+ program_details 'aclocal'
+ ;;
+ autom4te*)
+ echo "You might have modified some maintainer files that require"
+ echo "the 'automa4te' program to be rebuilt."
+ program_details 'autom4te'
+ ;;
+ bison*|yacc*)
+ echo "You should only need it if you modified a '.y' file."
+ echo "You may want to install the GNU Bison package:"
+ echo "<$gnu_software_URL/bison/>"
+ ;;
+ lex*|flex*)
+ echo "You should only need it if you modified a '.l' file."
+ echo "You may want to install the Fast Lexical Analyzer package:"
+ echo "<$flex_URL>"
+ ;;
+ help2man*)
+ echo "You should only need it if you modified a dependency" \
+ "of a man page."
+ echo "You may want to install the GNU Help2man package:"
+ echo "<$gnu_software_URL/help2man/>"
+ ;;
+ makeinfo*)
+ echo "You should only need it if you modified a '.texi' file, or"
+ echo "any other file indirectly affecting the aspect of the manual."
+ echo "You might want to install the Texinfo package:"
+ echo "<$gnu_software_URL/texinfo/>"
+ echo "The spurious makeinfo call might also be the consequence of"
+ echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+ echo "want to install GNU make:"
+ echo "<$gnu_software_URL/make/>"
+ ;;
+ *)
+ echo "You might have modified some files without having the proper"
+ echo "tools for further handling them. Check the 'README' file, it"
+ echo "often tells you about the needed prerequisites for installing"
+ echo "this package. You may also peek at any GNU archive site, in"
+ echo "case some other package contains this missing '$1' program."
+ ;;
+ esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+ -e '2,$s/^/ /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem.pm
new file mode 100755
index 0000000..64e69e6
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem.pm
@@ -0,0 +1,240 @@
+package HP::BladeSystem;
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+use Data::Dumper;
+
+our @ISA = qw(HP::Server HP::Proliant::Component::SNMP);
+
+sub init {
+ my $self = shift;
+ $self->{components} = {
+ common_enclosure_subsystem => undef,
+ power_enclosure_subsystem => undef,
+ power_supply_subsystem => undef,
+ net_connector_subsystem => undef,
+ server_blade_subsystem => undef,
+ };
+ $self->{serial} = 'unknown';
+ $self->{product} = 'unknown';
+ $self->{romversion} = 'unknown';
+ $self->trace(3, 'BladeSystem identified');
+ $self->collect();
+ if (! $self->{runtime}->{plugin}->check_messages()) {
+ $self->set_serial();
+ $self->analyze_common_enclosures();
+ $self->analyze_power_enclosures();
+ $self->analyze_power_supplies();
+ $self->analyze_net_connectors();
+ $self->analyze_server_blades();
+ $self->check_common_enclosures();
+ $self->check_power_enclosures();
+ $self->check_power_supplies();
+ $self->check_net_connectors();
+ $self->check_server_blades();
+ }
+}
+
+sub identify {
+ my $self = shift;
+ return sprintf "System: '%s', S/N: '%s'",
+ $self->{product}, $self->{serial};
+}
+
+sub dump {
+ my $self = shift;
+ printf STDERR "serial %s\n", $self->{serial};
+ printf STDERR "product %s\n", $self->{product};
+ printf STDERR "romversion %s\n", $self->{romversion};
+ printf STDERR "%s\n", Data::Dumper::Dumper($self->{enclosures});
+}
+
+sub analyze_common_enclosures {
+ my $self = shift;
+ $self->{components}->{common_enclosure_subsystem} =
+ HP::BladeSystem::Component::CommonEnclosureSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_power_enclosures {
+ my $self = shift;
+ $self->{components}->{power_enclosure_subsystem} =
+ HP::BladeSystem::Component::PowerEnclosureSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_power_supplies {
+ my $self = shift;
+ $self->{components}->{power_supply_subsystem} =
+ HP::BladeSystem::Component::PowerSupplySubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_net_connectors {
+ my $self = shift;
+ $self->{components}->{net_connector_subsystem} =
+ HP::BladeSystem::Component::NetConnectorSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_server_blades {
+ my $self = shift;
+ $self->{components}->{server_blade_subsystem} =
+ HP::BladeSystem::Component::ServerBladeSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub check_common_enclosures {
+ my $self = shift;
+ $self->{components}->{common_enclosure_subsystem}->check();
+ $self->{components}->{common_enclosure_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_power_enclosures {
+ my $self = shift;
+ $self->{components}->{power_enclosure_subsystem}->check();
+ $self->{components}->{power_enclosure_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_power_supplies {
+ my $self = shift;
+ $self->{components}->{power_supply_subsystem}->check();
+ $self->{components}->{power_supply_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_net_connectors {
+ my $self = shift;
+ $self->{components}->{net_connector_subsystem}->check();
+ $self->{components}->{net_connector_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_server_blades {
+ my $self = shift;
+ $self->{components}->{server_blade_subsystem}->check();
+ $self->{components}->{server_blade_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub collect {
+ my $self = shift;
+ if ($self->{runtime}->{plugin}->opts->snmpwalk) {
+ my $cpqRackMibCondition = '1.3.6.1.4.1.232.22.1.3.0';
+ $self->trace(3, 'getting cpqRackMibCondition');
+ if (! exists $self->{rawdata}->{$cpqRackMibCondition}) {
+ $self->add_message(CRITICAL,
+ 'snmpwalk returns no health data (cpqrack-mib)');
+ }
+ } else {
+ my $net_snmp_version = Net::SNMP->VERSION(); # 5.002000 or 6.000000
+ #$params{'-translate'} = [
+ # -all => 0x0
+ #];
+ my ($session, $error) =
+ Net::SNMP->session(%{$self->{runtime}->{snmpparams}});
+ if (! defined $session) {
+ $self->{plugin}->add_message(CRITICAL, 'cannot create session object');
+ $self->trace(1, Data::Dumper::Dumper($self->{runtime}->{snmpparams}));
+ } else {
+ # revMajor is often used for discovery of hp devices
+ my $cpqSeMibRev = '1.3.6.1.4.1.232.22.1';
+ my $cpqSeMibRevMajor = '1.3.6.1.4.1.232.22.1.1.0';
+ my $cpqRackMibCondition = '1.3.6.1.4.1.232.22.1.3.0';
+ $self->trace(3, 'getting cpqRackMibCondition');
+ my $result = $session->get_request(
+ -varbindlist => [$cpqRackMibCondition]
+ );
+ if (!defined($result) ||
+ $result->{$cpqRackMibCondition} eq 'noSuchInstance' ||
+ $result->{$cpqRackMibCondition} eq 'noSuchObject' ||
+ $result->{$cpqRackMibCondition} eq 'endOfMibView') {
+ $self->add_message(CRITICAL,
+ 'snmpwalk returns no health data (cpqrack-mib)');
+ $session->close;
+ } else {
+ $self->trace(3, 'getting cpqRackMibCondition done');
+ }
+ }
+ if (! $self->{runtime}->{plugin}->check_messages()) {
+ # snmp peer is alive
+ $self->trace(2, sprintf "Protocol is %s",
+ $self->{runtime}->{snmpparams}->{'-version'});
+ my $oidtrees = [
+ ["cpqSiComponent", "1.3.6.1.4.1.232.2.2"],
+ ["cpqSiAsset", "1.3.6.1.4.1.232.2.2.2"],
+ #["cpqRackInfo", "1.3.6.1.4.1.232.22"],
+ ['cpqRackCommonEnclosureEntry', '1.3.6.1.4.1.232.22.2.3.1.1.1'],
+ ['cpqRackCommonEnclosureTempEntry', '1.3.6.1.4.1.232.22.2.3.1.2.1'],
+ ['cpqRackCommonEnclosureFanEntry', '1.3.6.1.4.1.232.22.2.3.1.3.1'],
+ ['cpqRackCommonEnclosureFuseEntry', '1.3.6.1.4.1.232.22.2.3.1.4.1'],
+ ['cpqRackCommonEnclosureManagerEntry', '1.3.6.1.4.1.232.22.2.3.1.6.1'],
+ ['cpqRackPowerEnclosureEntry', '1.3.6.1.4.1.232.22.2.3.3.1.1'],
+ ['cpqRackServerBladeEntry', '1.3.6.1.4.1.232.22.2.4.1.1.1'],
+ ['cpqRackPowerSupplyEntry', '1.3.6.1.4.1.232.22.2.5.1.1.1'],
+ ['cpqRackNetConnectorEntry', '1.3.6.1.4.1.232.22.2.6.1.1.1'],
+ ['cpqRackMibCondition', '1.3.6.1.4.1.232.22.1.3.0'],
+ ];
+ my $cpqSiComponent = "1.3.6.1.4.1.232.2.2";
+ my $cpqSiAsset = "1.3.6.1.4.1.232.2.2.2";
+ my $cpqRackInfo = "1.3.6.1.4.1.232.22";
+ $session->translate;
+ my $response = {}; #break the walk up in smaller pieces
+ foreach my $subtree (@{$oidtrees}) {
+ my $tic = time; my $tac = $tic;
+ my $response0 = $session->get_table(
+ -baseoid => $subtree->[1]);
+ if (scalar (keys %{$response0}) == 0) {
+ $self->trace(2, sprintf "maxrepetitions failed. fallback");
+ $response0 = $session->get_table(
+ -maxrepetitions => 1,
+ -baseoid => $subtree->[1]);
+ }
+ $tac = time;
+ $self->trace(2, sprintf "%03d seconds for walk %s (%d oids)",
+ $tac - $tic, $subtree->[0], scalar(keys %{$response0}));
+ map { $response->{$_} = $response0->{$_} } keys %{$response0};
+ }
+ $session->close;
+ map { $response->{$_} =~ s/^\s+//; $response->{$_} =~ s/\s+$//; }
+ keys %$response;
+ $self->{rawdata} = $response;
+ }
+ }
+ return $self->{runtime}->{plugin}->check_messages();
+}
+
+sub set_serial {
+ my $self = shift;
+
+ my $cpqSiSysSerialNum = "1.3.6.1.4.1.232.2.2.2.1.0";
+ my $cpqSiProductName = "1.3.6.1.4.1.232.2.2.4.2.0";
+
+ $self->{serial} =
+ SNMP::Utils::get_object($self->{rawdata}, $cpqSiSysSerialNum);
+ $self->{product} =
+ SNMP::Utils::get_object($self->{rawdata}, $cpqSiProductName);
+ $self->{serial} = $self->{serial};
+ $self->{product} = lc $self->{product};
+ $self->{romversion} = 'unknown';
+#####################################################################
+$self->{runtime}->{product} = $self->{product};
+}
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component.pm
new file mode 100755
index 0000000..15fa213
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component.pm
@@ -0,0 +1,7 @@
+package HP::BladeSystem::Component;
+
+use strict;
+
+our @ISA = qw(HP::BladeSystem);
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem.pm
new file mode 100755
index 0000000..37cec73
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem.pm
@@ -0,0 +1,176 @@
+package HP::BladeSystem::Component::CommonEnclosureSubsystem;
+our @ISA = qw(HP::BladeSystem::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ common_enclosures => [],
+ common_enclosure_temp_subsys => undef,
+ common_enclosure_fan_subsys => undef,
+ common_enclosure_fuse_subsys => undef,
+ common_enclosure_manager_subsys => undef,
+ common_enclosure_frus => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init();
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ # jeweils ein block fuer
+ # enclosures, temps, fans, fuses
+ # loop ueber oids und entspr. new
+ my $oids = {
+ cpqRackCommonEnclosureEntry => '1.3.6.1.4.1.232.22.2.3.1.1.1',
+ cpqRackCommonEnclosureRack => '1.3.6.1.4.1.232.22.2.3.1.1.1.1',
+ cpqRackCommonEnclosureIndex => '1.3.6.1.4.1.232.22.2.3.1.1.1.2',
+ cpqRackCommonEnclosureModel => '1.3.6.1.4.1.232.22.2.3.1.1.1.3',
+ cpqRackCommonEnclosureSparePartNumber => '1.3.6.1.4.1.232.22.2.3.1.1.1.6',
+ cpqRackCommonEnclosureSerialNum => '1.3.6.1.4.1.232.22.2.3.1.1.1.7',
+ cpqRackCommonEnclosureFWRev => '1.3.6.1.4.1.232.22.2.3.1.1.1.8',
+ cpqRackCommonEnclosureName => '1.3.6.1.4.1.232.22.2.3.1.1.1.9',
+ cpqRackCommonEnclosureCondition => '1.3.6.1.4.1.232.22.2.3.1.1.1.16',
+ cpqRackCommonEnclosureHasServerBlades => '1.3.6.1.4.1.232.22.2.3.1.1.1.17',
+ cpqRackCommonEnclosureHasPowerBlades => '1.3.6.1.4.1.232.22.2.3.1.1.1.18',
+ cpqRackCommonEnclosureHasNetConnectors => '1.3.6.1.4.1.232.22.2.3.1.1.1.19',
+ cpqRackCommonEnclosureHasTempSensors => '1.3.6.1.4.1.232.22.2.3.1.1.1.20',
+ cpqRackCommonEnclosureHasFans => '1.3.6.1.4.1.232.22.2.3.1.1.1.21',
+ cpqRackCommonEnclosureHasFuses => '1.3.6.1.4.1.232.22.2.3.1.1.1.22',
+ cpqRackCommonEnclosureConditionValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ },
+ cpqRackCommonEnclosureHasServerBladesValue => {
+ 1 => 'false',
+ 2 => 'true',
+ },
+ };
+ $oids->{cpqRackCommonEnclosureHasPowerBladesValue} =
+ $oids->{cpqRackCommonEnclosureHasServerBladesValue};
+ $oids->{cpqRackCommonEnclosureHasNetConnectorsValue} =
+ $oids->{cpqRackCommonEnclosureHasServerBladesValue};
+ $oids->{cpqRackCommonEnclosureHasTempSensorsValue} =
+ $oids->{cpqRackCommonEnclosureHasServerBladesValue};
+ $oids->{cpqRackCommonEnclosureHasFansValue} =
+ $oids->{cpqRackCommonEnclosureHasServerBladesValue};
+ $oids->{cpqRackCommonEnclosureHasServerBladesValue} =
+ $oids->{cpqRackCommonEnclosureHasServerBladesValue};
+ # INDEX { cpqRackCommonEnclosureRack cpqRackCommonEnclosureIndex }
+ foreach ($self->get_entries($oids, 'cpqRackCommonEnclosureEntry')) {
+ push(@{$self->{common_enclosures}},
+ HP::BladeSystem::Component::CommonEnclosureSubsystem::CommonEnclosure->new(%{$_}));
+ }
+
+ $self->{common_enclosure_fan_subsys} = HP::BladeSystem::Component::CommonEnclosureSubsystem::FanSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+ $self->{common_enclosure_temp_subsys} = HP::BladeSystem::Component::CommonEnclosureSubsystem::TempSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+ $self->{common_enclosure_fuse_subsys} = HP::BladeSystem::Component::CommonEnclosureSubsystem::FuseSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+ $self->{common_enclosure_manager_subsys} = HP::BladeSystem::Component::CommonEnclosureSubsystem::ManagerSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub check {
+ my $self = shift;
+ foreach (@{$self->{common_enclosures}}) {
+ $_->check();
+ }
+ $self->{common_enclosure_fan_subsys}->check();
+ $self->{common_enclosure_temp_subsys}->check();
+ $self->{common_enclosure_fuse_subsys}->check();
+ $self->{common_enclosure_manager_subsys}->check();
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{common_enclosures}}) {
+ $_->dump();
+ }
+ $self->{common_enclosure_fan_subsys}->dump();
+ $self->{common_enclosure_temp_subsys}->dump();
+ $self->{common_enclosure_fuse_subsys}->dump();
+ $self->{common_enclosure_manager_subsys}->dump();
+}
+
+
+package HP::BladeSystem::Component::CommonEnclosureSubsystem::CommonEnclosure;
+our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqRackCommonEnclosure/, keys %params;
+ $self->{name} = $self->{cpqRackCommonEnclosureRack}.':'.$self->{cpqRackCommonEnclosureIndex};
+ $self->{serfw} = sprintf "Ser: %s, FW: %s", $self->{cpqRackCommonEnclosureSerialNum},
+ $self->{cpqRackCommonEnclosureFWRev};
+ bless $self, $class;
+ return $self;
+}
+
+
+sub check {
+ my $self = shift;
+ $self->blacklist('ce', $self->{cpqRackCommonEnclosureName});
+ my $info = sprintf 'common enclosure %s condition is %s (%s)',
+ $self->{cpqRackCommonEnclosureName}, $self->{cpqRackCommonEnclosureCondition}, $self->{serfw};
+ $self->add_info($info);
+ if ($self->{cpqRackCommonEnclosureCondition} eq 'failed') {
+ $info .= sprintf " (SparePartNum %s)", $self->{cpqRackCommonEnclosureSparePartNumber};
+ $self->add_message(CRITICAL, $info);
+ } elsif ($self->{cpqRackCommonEnclosureCondition} eq 'degraded') {
+ $info .= sprintf " (SparePartNum %s)", $self->{cpqRackCommonEnclosureSparePartNumber};
+ $self->add_message(WARNING, $info);
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[COMMON_ENCLOSURE_%s]\n", $self->{cpqRackCommonEnclosureName};
+ foreach (qw(cpqRackCommonEnclosureRack cpqRackCommonEnclosureIndex cpqRackCommonEnclosureModel
+ cpqRackCommonEnclosureSerialNum cpqRackCommonEnclosureFWRev cpqRackCommonEnclosureFWRev
+ cpqRackCommonEnclosureName
+ cpqRackCommonEnclosureCondition cpqRackCommonEnclosureHasServerBlades
+ cpqRackCommonEnclosureHasPowerBlades cpqRackCommonEnclosureHasNetConnectors
+ cpqRackCommonEnclosureHasTempSensors cpqRackCommonEnclosureHasFans cpqRackCommonEnclosureHasFuses)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/FanSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/FanSubsystem.pm
new file mode 100755
index 0000000..c28b921
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/FanSubsystem.pm
@@ -0,0 +1,139 @@
+package HP::BladeSystem::Component::CommonEnclosureSubsystem::FanSubsystem;
+our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ blacklisted => 0,
+ fans => [],
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init();
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my $oids = {
+ cpqRackCommonEnclosureFanEntry => '1.3.6.1.4.1.232.22.2.3.1.3.1',
+ cpqRackCommonEnclosureFanRack => '1.3.6.1.4.1.232.22.2.3.1.3.1.1',
+ cpqRackCommonEnclosureFanChassis => '1.3.6.1.4.1.232.22.2.3.1.3.1.2',
+ cpqRackCommonEnclosureFanIndex => '1.3.6.1.4.1.232.22.2.3.1.3.1.3',
+ cpqRackCommonEnclosureFanEnclosureName => '1.3.6.1.4.1.232.22.2.3.1.3.1.4',
+ cpqRackCommonEnclosureFanLocation => '1.3.6.1.4.1.232.22.2.3.1.3.1.5',
+ cpqRackCommonEnclosureFanPartNumber => '1.3.6.1.4.1.232.22.2.3.1.3.1.6',
+ cpqRackCommonEnclosureFanSparePartNumber => '1.3.6.1.4.1.232.22.2.3.1.3.1.7',
+ cpqRackCommonEnclosureFanPresent => '1.3.6.1.4.1.232.22.2.3.1.3.1.8',
+ cpqRackCommonEnclosureFanRedundant => '1.3.6.1.4.1.232.22.2.3.1.3.1.9',
+ cpqRackCommonEnclosureFanRedundantGroupId => '1.3.6.1.4.1.232.22.2.3.1.3.1.10',
+ cpqRackCommonEnclosureFanCondition => '1.3.6.1.4.1.232.22.2.3.1.3.1.11',
+ cpqRackCommonEnclosureFanEnclosureSerialNum => '1.3.6.1.4.1.232.22.2.3.1.3.1.12',
+ cpqRackCommonEnclosureFanPresentValue => {
+ 1 => 'other',
+ 2 => 'absent',
+ 3 => 'present',
+ },
+ cpqRackCommonEnclosureFanRedundantValue => {
+ 0 => 'other', # meiner phantasie entsprungen, da sich hp nicht aeussert
+ 1 => 'other',
+ 2 => 'notRedundant',
+ 3 => 'redundant',
+ },
+ cpqRackCommonEnclosureFanConditionValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ }
+ };
+ # INDEX { cpqRackCommonEnclosureFanRack, cpqRackCommonEnclosureFanChassis, cpqRackCommonEnclosureFanIndex }
+ foreach ($self->get_entries($oids, 'cpqRackCommonEnclosureFanEntry')) {
+ push(@{$self->{fans}},
+ HP::BladeSystem::Component::CommonEnclosureSubsystem::FanSubsystem::Fan->new(%{$_}));
+ }
+
+}
+
+sub check {
+ my $self = shift;
+ foreach (@{$self->{fans}}) {
+ $_->check() if $_->{cpqRackCommonEnclosureFanPresent} eq 'present' ||
+ $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{fans}}) {
+ $_->dump() if $_->{cpqRackCommonEnclosureFanPresent} eq 'present' ||
+ $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv
+ }
+}
+
+
+package HP::BladeSystem::Component::CommonEnclosureSubsystem::FanSubsystem::Fan;
+
+our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem::FanSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqRackCommonEnclosureFan/, keys %params;
+ $self->{name} = $self->{cpqRackCommonEnclosureFanRack}.':'.$self->{cpqRackCommonEnclosureFanChassis}.':'.$self->{cpqRackCommonEnclosureFanIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('f', $self->{name});
+ $self->add_info(sprintf 'fan %s is %s, location is %s, redundance is %s, condition is %s',
+ $self->{name}, $self->{cpqRackCommonEnclosureFanPresent},
+ $self->{cpqRackCommonEnclosureFanLocation},
+ $self->{cpqRackCommonEnclosureFanRedundant},
+ $self->{cpqRackCommonEnclosureFanCondition});
+ if ($self->{cpqRackCommonEnclosureFanCondition} eq 'degraded') {
+ $self->{info} .= sprintf ", (SparePartNum: %s)", $self->{cpqRackCommonEnclosureFanSparePartNumber};
+ $self->add_message(WARNING, $self->{info});
+ } elsif ($self->{cpqRackCommonEnclosureFanCondition} eq 'failed') {
+ $self->{info} .= sprintf ", (SparePartNum: %s)", $self->{cpqRackCommonEnclosureFanSparePartNumber};
+ $self->add_message(CRITICAL, $self->{info});
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[FAN_%s]\n", $self->{name};
+ foreach (qw(cpqRackCommonEnclosureFanRack cpqRackCommonEnclosureFanChassis
+ cpqRackCommonEnclosureFanIndex cpqRackCommonEnclosureFanEnclosureName
+ cpqRackCommonEnclosureFanLocation cpqRackCommonEnclosureFanPartNumber
+ cpqRackCommonEnclosureFanSparePartNumber cpqRackCommonEnclosureFanPresent
+ cpqRackCommonEnclosureFanRedundant cpqRackCommonEnclosureFanRedundantGroupId
+ cpqRackCommonEnclosureFanCondition cpqRackCommonEnclosureFanEnclosureSerialNum)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "info: %s\n", $self->{info};
+ printf "\n";
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/FuseSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/FuseSubsystem.pm
new file mode 100755
index 0000000..bc67e3b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/FuseSubsystem.pm
@@ -0,0 +1,121 @@
+package HP::BladeSystem::Component::CommonEnclosureSubsystem::FuseSubsystem;
+our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ blacklisted => 0,
+ fuses => [],
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init();
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my $oids = {
+ cpqRackCommonEnclosureFuseEntry => '1.3.6.1.4.1.232.22.2.3.1.4.1',
+ cpqRackCommonEnclosureFuseRack => '1.3.6.1.4.1.232.22.2.3.1.4.1.1',
+ cpqRackCommonEnclosureFuseChassis => '1.3.6.1.4.1.232.22.2.3.1.4.1.2',
+ cpqRackCommonEnclosureFuseIndex => '1.3.6.1.4.1.232.22.2.3.1.4.1.3',
+ cpqRackCommonEnclosureFuseEnclosureName => '1.3.6.1.4.1.232.22.2.3.1.4.1.4',
+ cpqRackCommonEnclosureFuseLocation => '1.3.6.1.4.1.232.22.2.3.1.4.1.5',
+ cpqRackCommonEnclosureFusePresent => '1.3.6.1.4.1.232.22.2.3.1.4.1.8',
+ cpqRackCommonEnclosureFuseCondition => '1.3.6.1.4.1.232.22.2.3.1.4.1.11',
+ cpqRackCommonEnclosureFusePresentValue => {
+ 1 => 'other',
+ 2 => 'absent',
+ 3 => 'present',
+ },
+ cpqRackCommonEnclosureFuseConditionValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 4 => 'failed',
+ }
+ };
+ # INDEX { cpqRackCommonEnclosureFuseRack, cpqRackCommonEnclosureFuseChassis, cpqRackCommonEnclosureFuseIndex }
+ foreach ($self->get_entries($oids, 'cpqRackCommonEnclosureFuseEntry')) {
+ push(@{$self->{fuses}},
+ HP::BladeSystem::Component::CommonEnclosureSubsystem::FuseSubsystem::Fuse->new(%{$_}));
+ }
+
+}
+
+sub check {
+ my $self = shift;
+ foreach (@{$self->{fuses}}) {
+ $_->check() if $_->{cpqRackCommonEnclosureFusePresent} eq 'present' ||
+ $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{fuses}}) {
+ $_->dump() if $_->{cpqRackCommonEnclosureFusePresent} eq 'present' ||
+ $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv
+ }
+}
+
+
+package HP::BladeSystem::Component::CommonEnclosureSubsystem::FuseSubsystem::Fuse;
+
+our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem::FuseSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqRackCommonEnclosureFuse/, keys %params;
+ $self->{name} = $self->{cpqRackCommonEnclosureFuseRack}.':'.$self->{cpqRackCommonEnclosureFuseChassis}.':'.$self->{cpqRackCommonEnclosureFuseIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('fu', $self->{name});
+ $self->add_info(sprintf 'fuse %s is %s, location is %s, condition is %s',
+ $self->{name}, $self->{cpqRackCommonEnclosureFusePresent},
+ $self->{cpqRackCommonEnclosureFuseLocation}, $self->{cpqRackCommonEnclosureFuseCondition});
+ if ($self->{cpqRackCommonEnclosureFuseCondition} eq 'failed') {
+ $self->add_message(CRITICAL, $self->{info});
+ } elsif ($self->{cpqRackCommonEnclosureFuseCondition} ne 'ok') {
+ $self->add_message(WARNING, $self->{info});
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[FUSE_%s]\n", $self->{name};
+ foreach (qw(cpqRackCommonEnclosureFuseRack cpqRackCommonEnclosureFuseChassis
+ cpqRackCommonEnclosureFuseIndex cpqRackCommonEnclosureFuseEnclosureName
+ cpqRackCommonEnclosureFuseLocation cpqRackCommonEnclosureFusePresent
+ cpqRackCommonEnclosureFuseCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "info: %s\n", $self->{info};
+ printf "\n";
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/ManagerSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/ManagerSubsystem.pm
new file mode 100755
index 0000000..1c2e15b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/ManagerSubsystem.pm
@@ -0,0 +1,154 @@
+package HP::BladeSystem::Component::CommonEnclosureSubsystem::ManagerSubsystem;
+our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ blacklisted => 0,
+ managers => [],
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init();
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my $oids = {
+ cpqRackCommonEnclosureManagerEntry => '1.3.6.1.4.1.232.22.2.3.1.6.1',
+ cpqRackCommonEnclosureManagerRack => '1.3.6.1.4.1.232.22.2.3.1.6.1.1',
+ cpqRackCommonEnclosureManagerChassis => '1.3.6.1.4.1.232.22.2.3.1.6.1.2',
+ cpqRackCommonEnclosureManagerIndex => '1.3.6.1.4.1.232.22.2.3.1.6.1.3',
+ cpqRackCommonEnclosureManagerEnclosureName => '1.3.6.1.4.1.232.22.2.3.1.6.1.4',
+ cpqRackCommonEnclosureManagerLocation => '1.3.6.1.4.1.232.22.2.3.1.6.1.5',
+ cpqRackCommonEnclosureManagerPartNumber => '1.3.6.1.4.1.232.22.2.3.1.6.1.6',
+ cpqRackCommonEnclosureManagerSparePartNumber => '1.3.6.1.4.1.232.22.2.3.1.6.1.7',
+ cpqRackCommonEnclosureManagerSerialNum => '1.3.6.1.4.1.232.22.2.3.1.6.1.8',
+ cpqRackCommonEnclosureManagerRole => '1.3.6.1.4.1.232.22.2.3.1.6.1.9',
+ cpqRackCommonEnclosureManagerPresent => '1.3.6.1.4.1.232.22.2.3.1.6.1.10',
+ cpqRackCommonEnclosureManagerRedundant => '1.3.6.1.4.1.232.22.2.3.1.6.1.11',
+ cpqRackCommonEnclosureManagerCondition => '1.3.6.1.4.1.232.22.2.3.1.6.1.12',
+ cpqRackCommonEnclosureManagerFWRev => '1.3.6.1.4.1.232.22.2.3.1.6.1.15',
+ cpqRackCommonEnclosureManagerRoleValue => {
+ 1 => 'standby',
+ 2 => 'active',
+ },
+ cpqRackCommonEnclosureManagerPresentValue => {
+ 1 => 'other',
+ 2 => 'absent', # mit vorsicht zu geniessen!
+ 3 => 'present',
+ },
+ cpqRackCommonEnclosureManagerRedundantValue => {
+ 0 => 'other', # meiner phantasie entsprungen, da sich hp nicht aeussert
+ 1 => 'other',
+ 2 => 'notRedundant',
+ 3 => 'redundant',
+ },
+ cpqRackCommonEnclosureManagerConditionValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ }
+ };
+ # INDEX { cpqRackCommonEnclosureManagerRack, cpqRackCommonEnclosureManagerChassis, cpqRackCommonEnclosureManagerIndex }
+ foreach ($self->get_entries($oids, 'cpqRackCommonEnclosureManagerEntry')) {
+ push(@{$self->{managers}},
+ HP::BladeSystem::Component::CommonEnclosureSubsystem::ManagerSubsystem::Manager->new(%{$_}));
+ }
+}
+
+sub check {
+ my $self = shift;
+ foreach (@{$self->{managers}}) {
+ $_->check() if $_->{cpqRackCommonEnclosureManagerPresent} eq 'present' ||
+ $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{managers}}) {
+ $_->dump() if $_->{cpqRackCommonEnclosureManagerPresent} eq 'present' ||
+ $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv
+ }
+}
+
+
+package HP::BladeSystem::Component::CommonEnclosureSubsystem::ManagerSubsystem::Manager;
+
+our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem::ManagerSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqRackCommonEnclosureManager/, keys %params;
+ $self->{name} = $self->{cpqRackCommonEnclosureManagerRack}.
+ ':'.$self->{cpqRackCommonEnclosureManagerChassis}.
+ ':'.$self->{cpqRackCommonEnclosureManagerIndex};
+ if ($self->{cpqRackCommonEnclosureManagerPresent} eq "absent" &&
+ defined $self->{cpqRackCommonEnclosureManagerEnclosureName}) {
+ $self->{cpqRackCommonEnclosureManagerPresent} = "present";
+ }
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('em', $self->{name});
+ my $info = sprintf 'manager %s is %s, location is %s, redundance is %s, condition is %s, role is %s',
+ $self->{name}, $self->{cpqRackCommonEnclosureManagerPresent},
+ $self->{cpqRackCommonEnclosureManagerLocation},
+ $self->{cpqRackCommonEnclosureManagerRedundant},
+ $self->{cpqRackCommonEnclosureManagerCondition},
+ $self->{cpqRackCommonEnclosureManagerRole};
+ $self->add_info($info) if $self->{cpqRackCommonEnclosureManagerPresent} eq 'present' ||
+ $self->{runtime}->{options}->{verbose} >= 3; # absent managers nur bei -vvv
+ if ($self->{cpqRackCommonEnclosureManagerCondition} eq 'degraded') {
+ $self->{info} .= sprintf ' (SparePartNum: %s)',
+ $self->{cpqRackCommonEnclosureManagerSparePartNumber};
+ $self->add_message(WARNING, $self->{info});
+ } elsif ($self->{cpqRackCommonEnclosureManagerCondition} eq 'failed') {
+ $self->{info} .= sprintf ' (SparePartNum: %s)',
+ $self->{cpqRackCommonEnclosureManagerSparePartNumber};
+ $self->add_message(CRITICAL, $self->{info});
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[ENCLOSURE_MANAGER_%s]\n", $self->{name};
+ foreach (qw(cpqRackCommonEnclosureManagerRack cpqRackCommonEnclosureManagerChassis
+ cpqRackCommonEnclosureManagerIndex cpqRackCommonEnclosureManagerEnclosureName
+ cpqRackCommonEnclosureManagerLocation cpqRackCommonEnclosureManagerPartNumber
+ cpqRackCommonEnclosureManagerSparePartNumber cpqRackCommonEnclosureManagerPresent
+ cpqRackCommonEnclosureManagerRedundant
+ cpqRackCommonEnclosureManagerCondition cpqRackCommonEnclosureManagerFWRev)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "info: %s\n", $self->{info};
+ printf "\n";
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/TempSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/TempSubsystem.pm
new file mode 100755
index 0000000..3e004f1
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/CommonEnclosureSubsystem/TempSubsystem.pm
@@ -0,0 +1,177 @@
+package HP::BladeSystem::Component::CommonEnclosureSubsystem::TempSubsystem;
+our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ condition => $params{condition},
+ status => $params{status},
+ temperatures => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ if ($params{runtime}->{options}->{customthresholds}) {
+ if (-f $params{runtime}->{options}->{customthresholds}) {
+ open CT, $params{runtime}->{options}->{customthresholds};
+ $params{runtime}->{options}->{customthresholds} = <CT>;
+ close CT;
+ }
+ foreach my $ct_items
+ (split(/\//, $params{runtime}->{options}->{customthresholds})) {
+ if ($ct_items =~ /^(\d+):(\d+)$/) {
+ my $temp = $2;
+ $params{runtime}->{options}->{thresholds}->{$1} = $temp;
+ } else {
+ die sprintf "invalid threshold %s", $ct_items;
+ }
+ }
+ }
+ $self->init();
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ my $snmpwalk = $self->{rawdata};
+ my $oids = {
+ cpqRackCommonEnclosureTempEntry => '1.3.6.1.4.1.232.22.2.3.1.2.1',
+ cpqRackCommonEnclosureTempRack => '1.3.6.1.4.1.232.22.2.3.1.2.1.1',
+ cpqRackCommonEnclosureTempChassis => '1.3.6.1.4.1.232.22.2.3.1.2.1.2',
+ cpqRackCommonEnclosureTempSensorIndex => '1.3.6.1.4.1.232.22.2.3.1.2.1.3',
+ cpqRackCommonEnclosureTempSensorEnclosureName => '1.3.6.1.4.1.232.22.2.3.1.2.1.4',
+ cpqRackCommonEnclosureTempLocation => '1.3.6.1.4.1.232.22.2.3.1.2.1.5',
+ cpqRackCommonEnclosureTempCurrent => '1.3.6.1.4.1.232.22.2.3.1.2.1.6',
+ cpqRackCommonEnclosureTempThreshold => '1.3.6.1.4.1.232.22.2.3.1.2.1.7',
+ cpqRackCommonEnclosureTempCondition => '1.3.6.1.4.1.232.22.2.3.1.2.1.8',
+ cpqRackCommonEnclosureTempType => '1.3.6.1.4.1.232.22.2.3.1.2.1.9',
+ cpqRackCommonEnclosureTempConditionValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ },
+ cpqRackCommonEnclosureTempTypeValue => {
+ 1 => 'other',
+ 5 => 'blowout',
+ 9 => 'caution',
+ 15 => 'critical',
+ },
+ };
+ # INDEX { cpqRackCommonEnclosureTempRack cpqRackCommonEnclosureTempChassis
+ # cpqRackCommonEnclosureTempSensorIndex }
+ foreach ($self->get_entries($oids, 'cpqRackCommonEnclosureTempEntry')) {
+ push(@{$self->{temperatures}},
+ HP::BladeSystem::Component::CommonEnclosureSubsystem::TempSubsystem::Temp->new(%{$_})) if (($_->{cpqRackCommonEnclosureTempCurrent} != -1 && $_->{cpqRackCommonEnclosureTempThreshold} != -1) && ($_->{cpqRackCommonEnclosureTempThreshold} != 0));
+ }
+
+}
+
+
+sub check {
+ my $self = shift;
+ my $errorfound = 0;
+ if (scalar (@{$self->{temperatures}}) == 0) {
+ #$self->overall_check();
+ } else {
+ foreach (@{$self->{temperatures}}) {
+ $_->check();
+ }
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{temperatures}}) {
+ $_->dump();
+ }
+}
+
+
+package HP::BladeSystem::Component::CommonEnclosureSubsystem::TempSubsystem::Temp;
+our @ISA = qw(HP::BladeSystem::Component::CommonEnclosureSubsystem::TempSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqRackCommonEnclosureTemp/, keys %params;
+ $self->{name} = $params{cpqRackCommonEnclosureTempRack}.':'.
+ $params{cpqRackCommonEnclosureTempChassis}.':'.
+ $params{cpqRackCommonEnclosureTempSensorIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('t', $self->{name});
+ if ($self->{cpqRackCommonEnclosureTempCurrent} > $self->{cpqRackCommonEnclosureTempThreshold}) {
+ $self->add_info(sprintf "%s temperature too high (%d%s)",
+ $self->{cpqRackCommonEnclosureTempLocation},
+ $self->{cpqRackCommonEnclosureTempCurrent},
+ $self->{runtime}->{options}->{celsius} ? "C" : "F");
+ $self->add_message(CRITICAL, $self->{info});
+ } else {
+ $self->add_info(sprintf "%s temperature is %d%s (%d max)",
+ $self->{cpqRackCommonEnclosureTempLocation},
+ $self->{cpqRackCommonEnclosureTempCurrent},
+ $self->{runtime}->{options}->{celsius} ? "C" : "F",
+ $self->{cpqRackCommonEnclosureTempThreshold});
+ }
+ if ($self->{runtime}->{options}->{perfdata} == 2) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => sprintf('temp_%s', $self->{name}),
+ value => $self->{cpqRackCommonEnclosureTempCurrent},
+ warning => $self->{cpqRackCommonEnclosureTempThreshold},
+ critical => $self->{cpqRackCommonEnclosureTempThreshold}
+ );
+ } elsif ($self->{runtime}->{options}->{perfdata} == 1) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => sprintf('temp_%s_%s', $self->{name},
+ $self->{cpqRackCommonEnclosureTempLocation}),
+ value => $self->{cpqRackCommonEnclosureTempCurrent},
+ warning => $self->{cpqRackCommonEnclosureTempThreshold},
+ critical => $self->{cpqRackCommonEnclosureTempThreshold}
+ );
+ }
+ $self->add_extendedinfo(sprintf "temp_%s=%d",
+ $self->{name}, $self->{cpqRackCommonEnclosureTempCurrent});
+
+}
+
+
+sub dump {
+ my $self = shift;
+ printf "[TEMP_%s]\n", $self->{name};
+ foreach (qw(cpqRackCommonEnclosureTempRack cpqRackCommonEnclosureTempChassis
+ cpqRackCommonEnclosureTempSensorIndex cpqRackCommonEnclosureTempSensorEnclosureName
+ cpqRackCommonEnclosureTempLocation
+ cpqRackCommonEnclosureTempCurrent cpqRackCommonEnclosureTempThreshold
+ cpqRackCommonEnclosureTempCondition cpqRackCommonEnclosureTempType)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "info: %s\n\n", $self->{info};
+}
+
+1;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/NetConnectorSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/NetConnectorSubsystem.pm
new file mode 100755
index 0000000..9fbd4d0
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/NetConnectorSubsystem.pm
@@ -0,0 +1,134 @@
+package HP::BladeSystem::Component::NetConnectorSubsystem;
+our @ISA = qw(HP::BladeSystem::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ net_connectors => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init();
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my $oids = {
+ cpqRackNetConnectorEntry => '1.3.6.1.4.1.232.22.2.6.1.1.1',
+ cpqRackNetConnectorRack => '1.3.6.1.4.1.232.22.2.6.1.1.1.1',
+ cpqRackNetConnectorChassis => '1.3.6.1.4.1.232.22.2.6.1.1.1.2',
+ cpqRackNetConnectorIndex => '1.3.6.1.4.1.232.22.2.6.1.1.1.3',
+ cpqRackNetConnectorEnclosureName => '1.3.6.1.4.1.232.22.2.6.1.1.1.4',
+ cpqRackNetConnectorName => '1.3.6.1.4.1.232.22.2.6.1.1.1.5',
+ cpqRackNetConnectorModel => '1.3.6.1.4.1.232.22.2.6.1.1.1.6',
+ cpqRackNetConnectorSerialNum => '1.3.6.1.4.1.232.22.2.6.1.1.1.7',
+ cpqRackNetConnectorPartNumber => '1.3.6.1.4.1.232.22.2.6.1.1.1.8',
+ cpqRackNetConnectorSparePartNumber => '1.3.6.1.4.1.232.22.2.6.1.1.1.9',
+ cpqRackNetConnectorFWRev => '1.3.6.1.4.1.232.22.2.6.1.1.1.10',
+ cpqRackNetConnectorType => '1.3.6.1.4.1.232.22.2.6.1.1.1.11',
+ cpqRackNetConnectorLocation => '1.3.6.1.4.1.232.22.2.6.1.1.1.12',
+ cpqRackNetConnectorPresent => '1.3.6.1.4.1.232.22.2.6.1.1.1.13',
+ cpqRackNetConnectorHasFuses => '1.3.6.1.4.1.232.22.2.6.1.1.1.14',
+ cpqRackNetConnectorEnclosureSerialNum => '1.3.6.1.4.1.232.22.2.6.1.1.1.15',
+ cpqRackNetConnectorTypeValue => {
+ 0 => 'other', # undefined
+ 1 => 'other',
+ 2 => 'active',
+ 3 => 'passive',
+ },
+ cpqRackNetConnectorPresentValue => {
+ 1 => 'other',
+ 2 => 'absent',
+ 3 => 'present',
+ },
+ cpqRackNetConnectorHasFusesValue => {
+ -1 => 'false', # wird geliefert, also vermute ich false
+ 1 => 'false',
+ 2 => 'true',
+ },
+ };
+
+
+ # INDEX { cpqRackNetConnectorRack, cpqRackNetConnectorChassis, cpqRackNetConnectorIndex }
+ # dreckada dreck, dreckada
+ foreach ($self->get_entries($oids, 'cpqRackNetConnectorEntry')) {
+ push(@{$self->{net_connectors}},
+ HP::BladeSystem::Component::NetConnectorSubsystem::NetConnector->new(%{$_}));
+ }
+}
+
+sub check {
+ my $self = shift;
+ foreach (@{$self->{net_connectors}}) {
+ $_->check() if $_->{cpqRackNetConnectorPresent} eq 'present' ||
+ $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{net_connectors}}) {
+ $_->dump() if $_->{cpqRackNetConnectorPresent} eq 'present' ||
+ $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv
+ }
+}
+
+
+package HP::BladeSystem::Component::NetConnectorSubsystem::NetConnector;
+our @ISA = qw(HP::BladeSystem::Component::NetConnectorSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqRackNetConnector/, keys %params;
+ $self->{name} = $params{cpqRackNetConnectorRack}.
+ ':'.$params{cpqRackNetConnectorChassis}.
+ ':'.$params{cpqRackNetConnectorIndex};
+ $self->{serfw} = sprintf "Ser: %s, FW: %s", $self->{cpqRackNetConnectorSerialNum}, $self->{cpqRackNetConnectorFWRev};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('nc', $self->{name});
+ my $info = sprintf 'net connector %s is %s, model is %s (%s)',
+ $self->{name}.($self->{cpqRackNetConnectorName} ? ' \''.$self->{cpqRackNetConnectorName}.'\'' : ''),
+ $self->{cpqRackNetConnectorPresent}, $self->{cpqRackNetConnectorModel}, $self->{serfw};
+ $self->add_info($info);
+ # hat weder status noch condition, vielleicht spaeter mal
+ $info .= sprintf " (SparePartNum %s)", $self->{cpqRackNetConnectorSparePartNumber};
+}
+
+sub dump {
+ my $self = shift;
+ printf "[NET_CONNECTOR_%s]\n", $self->{cpqRackNetConnectorName};
+ foreach (qw(cpqRackNetConnectorRack cpqRackNetConnectorChassis cpqRackNetConnectorIndex cpqRackNetConnectorEnclosureName cpqRackNetConnectorName cpqRackNetConnectorModel cpqRackNetConnectorSerialNum cpqRackNetConnectorPartNumber cpqRackNetConnectorSparePartNumber cpqRackNetConnectorFWRev cpqRackNetConnectorType cpqRackNetConnectorLocation cpqRackNetConnectorPresent cpqRackNetConnectorHasFuses cpqRackNetConnectorEnclosureSerialNum)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/PowerEnclosureSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/PowerEnclosureSubsystem.pm
new file mode 100755
index 0000000..82445d3
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/PowerEnclosureSubsystem.pm
@@ -0,0 +1,136 @@
+package HP::BladeSystem::Component::PowerEnclosureSubsystem;
+our @ISA = qw(HP::BladeSystem::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ power_enclosures => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init();
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+
+# cpqRackPowerEnclosureTable
+ my $oids = {
+ cpqRackPowerEnclosureEntry => '1.3.6.1.4.1.232.22.2.3.3.1.1',
+ cpqRackPowerEnclosureRack => '1.3.6.1.4.1.232.22.2.3.3.1.1.1',
+ cpqRackPowerEnclosureIndex => '1.3.6.1.4.1.232.22.2.3.3.1.1.2',
+ cpqRackPowerEnclosureName => '1.3.6.1.4.1.232.22.2.3.3.1.1.3',
+ cpqRackPowerEnclosureMgmgtBoardSerialNum => '1.3.6.1.4.1.232.22.2.3.3.1.1.4',
+ cpqRackPowerEnclosureRedundant => '1.3.6.1.4.1.232.22.2.3.3.1.1.5',
+ cpqRackPowerEnclosureLoadBalanced => '1.3.6.1.4.1.232.22.2.3.3.1.1.6',
+ cpqRackPowerEnclosureInputPwrType => '1.3.6.1.4.1.232.22.2.3.3.1.1.7',
+ cpqRackPowerEnclosurePwrFeedMax => '1.3.6.1.4.1.232.22.2.3.3.1.1.8',
+ cpqRackPowerEnclosureCondition => '1.3.6.1.4.1.232.22.2.3.3.1.1.9',
+ cpqRackPowerEnclosureRedundantValue => {
+ 1 => 'other',
+ 2 => 'notRedundant',
+ 3 => 'redundant',
+ },
+ cpqRackPowerEnclosureLoadBalancedValue => {
+ 0 => 'aechz',
+ 1 => 'other',
+ 2 => 'notLoadBalanced',
+ 3 => 'loadBalanced',
+ },
+ cpqRackPowerEnclosureInputPwrTypeValue => {
+ 1 => 'other',
+ 2 => 'singlePhase',
+ 3 => 'threePhase',
+ 4 => 'directCurrent',
+ },
+ cpqRackPowerEnclosureConditionValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ },
+ };
+
+
+ # INDEX { cpqRackPowerEnclosureRack, cpqRackPowerEnclosureIndex }
+ # dreckada dreck, dreckada
+ foreach ($self->get_entries($oids, 'cpqRackPowerEnclosureEntry')) {
+ push(@{$self->{power_enclosures}},
+ HP::BladeSystem::Component::PowerEnclosureSubsystem::PowerEnclosure->new(%{$_}));
+ }
+}
+
+sub check {
+ my $self = shift;
+ foreach (@{$self->{power_enclosures}}) {
+ $_->check();
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{power_enclosures}}) {
+ $_->dump();
+ }
+}
+
+
+package HP::BladeSystem::Component::PowerEnclosureSubsystem::PowerEnclosure;
+our @ISA = qw(HP::BladeSystem::Component::PowerEnclosureSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqRackPowerEnclosure/, keys %params;
+ $self->{name} = $self->{cpqRackPowerEnclosureRack}.':'.$self->{cpqRackPowerEnclosureIndex};
+ bless $self, $class;
+ $self->init();
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('pe', $self->{name});
+ my $info = sprintf 'power enclosure %s \'%s\' condition is %s',
+ $self->{name}, $self->{cpqRackPowerEnclosureName}, $self->{cpqRackPowerEnclosureCondition};
+ $self->add_info($info);
+ if ($self->{cpqRackPowerEnclosureCondition} eq 'degraded') {
+ $self->add_message(WARNING, $info);
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[POWER_ENCLOSURE_%s]\n", $self->{cpqRackPowerEnclosureName};
+ foreach (qw(cpqRackPowerEnclosureRack cpqRackPowerEnclosureIndex
+ cpqRackPowerEnclosureName cpqRackPowerEnclosureMgmgtBoardSerialNum
+ cpqRackPowerEnclosureRedundant cpqRackPowerEnclosureLoadBalanced
+ cpqRackPowerEnclosureInputPwrType cpqRackPowerEnclosurePwrFeedMax
+ cpqRackPowerEnclosureCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/PowerSupplySubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/PowerSupplySubsystem.pm
new file mode 100755
index 0000000..261ce19
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/PowerSupplySubsystem.pm
@@ -0,0 +1,238 @@
+package HP::BladeSystem::Component::PowerSupplySubsystem;
+our @ISA = qw(HP::BladeSystem::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ power_supplies => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init();
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my $oids = {
+ cpqRackPowerSupplyEntry => '1.3.6.1.4.1.232.22.2.5.1.1.1',
+ cpqRackPowerSupplyRack => '1.3.6.1.4.1.232.22.2.5.1.1.1.1',
+ cpqRackPowerSupplyChassis => '1.3.6.1.4.1.232.22.2.5.1.1.1.2',
+ cpqRackPowerSupplyIndex => '1.3.6.1.4.1.232.22.2.5.1.1.1.3',
+ cpqRackPowerSupplyEnclosureName => '1.3.6.1.4.1.232.22.2.5.1.1.1.4',
+ cpqRackPowerSupplySerialNum => '1.3.6.1.4.1.232.22.2.5.1.1.1.5',
+ cpqRackPowerSupplySparePartNumber => '1.3.6.1.4.1.232.22.2.5.1.1.1.7',
+ cpqRackPowerSupplyFWRev => '1.3.6.1.4.1.232.22.2.5.1.1.1.8',
+ cpqRackPowerSupplyMaxPwrOutput => '1.3.6.1.4.1.232.22.2.5.1.1.1.9',
+ cpqRackPowerSupplyCurPwrOutput => '1.3.6.1.4.1.232.22.2.5.1.1.1.10',
+ cpqRackPowerSupplyIntakeTemp => '1.3.6.1.4.1.232.22.2.5.1.1.1.12',
+ cpqRackPowerSupplyExhaustTemp => '1.3.6.1.4.1.232.22.2.5.1.1.1.13',
+ cpqRackPowerSupplyStatus => '1.3.6.1.4.1.232.22.2.5.1.1.1.14',
+ cpqRackPowerSupplySupplyInputLineStatus => '1.3.6.1.4.1.232.22.2.5.1.1.1.15',
+ cpqRackPowerSupplyPresent => '1.3.6.1.4.1.232.22.2.5.1.1.1.16',
+ cpqRackPowerSupplyCondition => '1.3.6.1.4.1.232.22.2.5.1.1.1.17',
+ cpqRackPowerSupplySupplyInputLineStatusValue => {
+ 1 => 'noError',
+ 2 => 'lineOverVoltage',
+ 3 => 'lineUnderVoltage',
+ 4 => 'lineHit',
+ 5 => 'brownOut',
+ 6 => 'linePowerLoss',
+ },
+ cpqRackPowerSupplyStatusValue => {
+ 1 => 'noError',
+ 2 => 'generalFailure',
+ 3 => 'bistFailure',
+ 4 => 'fanFailure',
+ 5 => 'tempFailure',
+ 6 => 'interlockOpen',
+ 7 => 'epromFailed',
+ 8 => 'vrefFailed',
+ 9 => 'dacFailed',
+ 10 => 'ramTestFailed',
+ 11 => 'voltageChannelFailed',
+ 12 => 'orringdiodeFailed',
+ 13 => 'brownOut',
+ 14 => 'giveupOnStartup',
+ 15 => 'nvramInvalid',
+ 16 => 'calibrationTableInvalid',
+ },
+ cpqRackPowerSupplyPresentValue => {
+ 1 => 'other',
+ 2 => 'absent',
+ 3 => 'present',
+ },
+ cpqRackPowerSupplyConditionValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ },
+ };
+
+
+ # INDEX { cpqRackPowerSupplyRack, cpqRackPowerSupplyChassis, cpqRackPowerSupplyIndex }
+ foreach ($self->get_entries($oids, 'cpqRackPowerSupplyEntry')) {
+ push(@{$self->{power_supplies}},
+ HP::BladeSystem::Component::PowerSupplySubsystem::PowerSupply->new(%{$_}));
+ }
+}
+
+sub check {
+ my $self = shift;
+ my $total_current_watt = 0;
+ my $total_max_watt = 0;
+ my $total_in_temp = 0;
+ my $total_out_temp = 0;
+ my $num_ps = 0;
+ foreach (@{$self->{power_supplies}}) {
+ $_->check() if $_->{cpqRackPowerSupplyPresent} eq 'present' ||
+ $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv
+ if ($_->{cpqRackPowerSupplyPresent} eq 'present') {
+ $total_max_watt += $_->{cpqRackPowerSupplyMaxPwrOutput};
+ $total_current_watt += $_->{cpqRackPowerSupplyCurPwrOutput};
+ $total_in_temp += $_->{cpqRackPowerSupplyIntakeTemp}
+ if $_->{cpqRackPowerSupplyIntakeTemp} != -1;
+ $total_out_temp += $_->{cpqRackPowerSupplyExhaustTemp}
+ if $_->{cpqRackPowerSupplyExhaustTemp} != -1;
+ $num_ps++;
+ }
+ }
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => 'watt_total',
+ value => $total_current_watt,
+ warning => $total_max_watt,
+ critical => $total_max_watt,
+ );
+ #$self->{runtime}->{plugin}->add_perfdata(
+ # label => 'watt_total_pct',
+ # value => ($total_current_watt == 0 ? 0 :
+ # sprintf("%.2f",
+ # ($total_current_watt / $total_max_watt * 100))),
+ # warning => 100,
+ # critical => 100,
+ # uom => '%',
+ #);
+ if ($total_in_temp) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => 'in_temp',
+ value => $total_in_temp / $num_ps,
+ );
+ }
+ if ($total_out_temp) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => 'out_temp',
+ value => $total_out_temp / $num_ps,
+ );
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{power_supplies}}) {
+ $_->dump() if $_->{cpqRackPowerSupplyPresent} eq 'present' ||
+ $self->{runtime}->{options}->{verbose} >= 3; # absent nur bei -vvv
+ }
+}
+
+
+package HP::BladeSystem::Component::PowerSupplySubsystem::PowerSupply;
+our @ISA = qw(HP::BladeSystem::Component::PowerSupplySubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqRackPowerSupply/, keys %params;
+ $self->{name} = $params{cpqRackPowerSupplyRack}.
+ ':'.$params{cpqRackPowerSupplyChassis}.
+ ':'.$params{cpqRackPowerSupplyIndex};
+ $self->{serfw} = sprintf "Ser: %s, FW: %s", $self->{cpqRackPowerSupplySerialNum}, $self->{cpqRackPowerSupplyFWRev};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('ps', $self->{name});
+ my $info = sprintf 'power supply %s is %s, condition is %s (%s)',
+ $self->{name}, $self->{cpqRackPowerSupplyPresent},
+ $self->{cpqRackPowerSupplyCondition}, $self->{serfw};
+ $self->add_info($info);
+ if ($self->{cpqRackPowerSupplyPresent} eq 'present') {
+ if ($self->{cpqRackPowerSupplyCondition} eq 'degraded') {
+ $info .= sprintf " (SparePartNum %s)", $self->{cpqRackPowerSupplySparePartNumber};
+ $self->add_message(WARNING, $info);
+ $self->add_info(sprintf 'power supply %s status is %s, inp.line status is %s',
+ $self->{name}, $self->{cpqRackPowerSupplyStatus},
+ $self->{cpqRackPowerSupplySupplyInputLineStatus});
+ } elsif ($self->{cpqRackPowerSupplyCondition} eq 'failed') {
+ $info .= sprintf " (SparePartNum %s)", $self->{cpqRackPowerSupplySparePartNumber};
+ $self->add_message(CRITICAL, $info);
+ $self->add_info(sprintf 'power supply %s status is %s, inp.line status is %s',
+ $self->{name}, $self->{cpqRackPowerSupplyStatus},
+ $self->{cpqRackPowerSupplySupplyInputLineStatus});
+ }
+ if ($self->{runtime}->{options}->{perfdata} != 2) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => sprintf('watt_%s', $self->{name}),
+ value => $self->{cpqRackPowerSupplyCurPwrOutput},
+ warning => $self->{cpqRackPowerSupplyMaxPwrOutput},
+ critical => $self->{cpqRackPowerSupplyMaxPwrOutput}
+ );
+ #$self->{runtime}->{plugin}->add_perfdata(
+ # label => sprintf('watt_pct_%s', $self->{name}),
+ # value => ($self->{cpqRackPowerSupplyCurPwrOutput} == 0 ? 0 :
+ # sprintf ("%.2f",
+ # ($self->{cpqRackPowerSupplyCurPwrOutput} /
+ # $self->{cpqRackPowerSupplyMaxPwrOutput} * 100))),
+ # warning => 100,
+ # critical => 100,
+ # uom => '%',
+ #);
+ if ($self->{cpqRackPowerSupplyIntakeTemp} != -1) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => sprintf('in_temp_%s', $self->{name}),
+ value => $self->{cpqRackPowerSupplyIntakeTemp},
+ );
+ }
+ if ($self->{cpqRackPowerSupplyExhaustTemp} != -1) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => sprintf('out_temp_%s', $self->{name}),
+ value => $self->{cpqRackPowerSupplyExhaustTemp},
+ );
+ }
+ }
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[POWER_SUPPLY%s]\n", $self->{name};
+ foreach (qw(cpqRackPowerSupplyRack cpqRackPowerSupplyChassis cpqRackPowerSupplyIndex cpqRackPowerSupplyEnclosureName cpqRackPowerSupplySerialNum cpqRackPowerSupplySparePartNumber cpqRackPowerSupplyFWRev cpqRackPowerSupplyMaxPwrOutput cpqRackPowerSupplyCurPwrOutput cpqRackPowerSupplyIntakeTemp cpqRackPowerSupplyExhaustTemp cpqRackPowerSupplyStatus cpqRackPowerSupplySupplyInputLineStatus cpqRackPowerSupplyPresent cpqRackPowerSupplyCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/ServerBladeSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/ServerBladeSubsystem.pm
new file mode 100755
index 0000000..2b41f7c
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/BladeSystem/Component/ServerBladeSubsystem.pm
@@ -0,0 +1,158 @@
+package HP::BladeSystem::Component::ServerBladeSubsystem;
+our @ISA = qw(HP::BladeSystem::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ server_blades => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init();
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my $oids = {
+ cpqRackServerBladeEntry => '1.3.6.1.4.1.232.22.2.4.1.1.1',
+ cpqRackServerBladeRack => '1.3.6.1.4.1.232.22.2.4.1.1.1.1',
+ cpqRackServerBladeChassis => '1.3.6.1.4.1.232.22.2.4.1.1.1.2',
+ cpqRackServerBladeIndex => '1.3.6.1.4.1.232.22.2.4.1.1.1.3',
+ cpqRackServerBladeName => '1.3.6.1.4.1.232.22.2.4.1.1.1.4',
+ cpqRackServerBladeEnclosureName => '1.3.6.1.4.1.232.22.2.4.1.1.1.5',
+ cpqRackServerBladePartNumber => '1.3.6.1.4.1.232.22.2.4.1.1.1.6',
+ cpqRackServerBladeSparePartNumber => '1.3.6.1.4.1.232.22.2.4.1.1.1.7',
+ cpqRackServerBladePosition => '1.3.6.1.4.1.232.22.2.4.1.1.1.8',
+ cpqRackServerBladeHeight => '1.3.6.1.4.1.232.22.2.4.1.1.1.9',
+ cpqRackServerBladeWidth => '1.3.6.1.4.1.232.22.2.4.1.1.1.10',
+ cpqRackServerBladeDepth => '1.3.6.1.4.1.232.22.2.4.1.1.1.11',
+ cpqRackServerBladePresent => '1.3.6.1.4.1.232.22.2.4.1.1.1.12',
+ cpqRackServerBladeHasFuses => '1.3.6.1.4.1.232.22.2.4.1.1.1.13',
+ cpqRackServerBladeEnclosureSerialNum => '1.3.6.1.4.1.232.22.2.4.1.1.1.14',
+ cpqRackServerBladeSlotsUsed => '1.3.6.1.4.1.232.22.2.4.1.1.1.15',
+ cpqRackServerBladeStatus => '1.3.6.1.4.1.232.22.2.4.1.1.1.21',
+ cpqRackServerBladeDiagnosticString => '1.3.6.1.4.1.232.22.2.4.1.1.1.24',
+ cpqRackServerBladePowered => '1.3.6.1.4.1.232.22.2.4.1.1.1.25',
+ cpqRackServerBladePOSTStatus => '1.3.6.1.4.1.232.22.2.4.1.1.1.35',
+ cpqRackServerBladePresentValue => {
+ 1 => 'other',
+ 2 => 'absent',
+ 3 => 'present',
+ },
+ cpqRackServerBladeStatusValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ },
+ cpqRackServerBladePoweredValue => {
+ 0 => 'aechz',
+ 1 => 'other',
+ 2 => 'on',
+ 3 => 'off',
+ 4 => 'powerStagedOff',
+ 5 => 'reboot',
+ },
+ cpqRackServerBladePOSTStatusValue => {
+ 1 => 'other',
+ 2 => 'started',
+ 3 => 'completed',
+ 4 => 'failed',
+ },
+ };
+
+
+ # INDEX { cpqRackServerBladeRack, cpqRackServerBladeChassis, cpqRackServerBladeIndex }
+ # dreckada dreck, dreckada
+ foreach ($self->get_entries($oids, 'cpqRackServerBladeEntry')) {
+ push(@{$self->{server_blades}},
+ HP::BladeSystem::Component::ServerBladeSubsystem::ServerBlade->new(%{$_}));
+ }
+}
+
+sub check {
+ my $self = shift;
+ foreach (@{$self->{server_blades}}) {
+ $_->check() if $_->{cpqRackServerBladePresent} eq 'present' ||
+ $self->{runtime}->{options}->{verbose} >= 3; # absent blades nur bei -vvv
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{server_blades}}) {
+ $_->dump() if $_->{cpqRackServerBladePresent} eq 'present' ||
+ $self->{runtime}->{options}->{verbose} >= 3; # absent blades nur bei -vvv
+ }
+}
+
+
+package HP::BladeSystem::Component::ServerBladeSubsystem::ServerBlade;
+our @ISA = qw(HP::BladeSystem::Component::ServerBladeSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqRackServerBlade/, keys %params;
+ $self->{cpqRackServerBladeDiagnosticString} ||= '';
+ $self->{name} = $self->{cpqRackServerBladeRack}.
+ ':'.$self->{cpqRackServerBladeChassis}.
+ ':'.$self->{cpqRackServerBladeIndex};
+ bless $self, $class;
+ $self->init();
+#printf "%s\n", Data::Dumper::Dumper(\%params);
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('sb', $self->{name});
+ my $info = sprintf 'server blade %s \'%s\' is %s, status is %s, powered is %s',
+ $self->{name}, $self->{cpqRackServerBladeName}, $self->{cpqRackServerBladePresent},
+ $self->{cpqRackServerBladeStatus}, $self->{cpqRackServerBladePowered};
+ $self->add_info($info);
+ if ($self->{cpqRackServerBladePowered} eq 'on') {
+ if ($self->{cpqRackServerBladeStatus} eq 'degraded') {
+ $self->add_message(WARNING, sprintf 'server blade %s diag is \'%s\', post status is %s',
+ $self->{cpqRackServerBladeName}, $self->{cpqRackServerBladeDiagnosticString},
+ $self->{cpqRackServerBladePOSTStatus});
+ } elsif ($self->{cpqRackServerBladeStatus} eq 'failed') {
+ $self->add_message(CRITICAL, sprintf 'server blade %s diag is \'%s\', post status is %s',
+ $self->{cpqRackServerBladeName}, $self->{cpqRackServerBladeDiagnosticString},
+ $self->{cpqRackServerBladePOSTStatus});
+ }
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[SERVER_BLADE_%s]\n", $self->{cpqRackServerBladeName};
+ foreach (qw(cpqRackServerBladeRack cpqRackServerBladeChassis cpqRackServerBladeIndex cpqRackServerBladeName cpqRackServerBladeEnclosureName cpqRackServerBladePartNumber cpqRackServerBladeSparePartNumber cpqRackServerBladePosition cpqRackServerBladeHeight cpqRackServerBladeWidth cpqRackServerBladeDepth cpqRackServerBladePresent cpqRackServerBladeHasFuses cpqRackServerBladeEnclosureSerialNum cpqRackServerBladeSlotsUsed cpqRackServerBladeStatus cpqRackServerBladeDiagnosticString cpqRackServerBladePowered cpqRackServerBladePOSTStatus)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant.pm
new file mode 100755
index 0000000..6b0f1ac
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant.pm
@@ -0,0 +1,771 @@
+package HP::Proliant;
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+use Data::Dumper;
+
+our @ISA = qw(HP::Server);
+
+sub init {
+ my $self = shift;
+ $self->{components} = {
+ powersupply_subsystem => undef,
+ fan_subsystem => undef,
+ temperature_subsystem => undef,
+ cpu_subsystem => undef,
+ memory_subsystem => undef,
+ nic_subsystem => undef,
+ disk_subsystem => undef,
+ asr_subsystem => undef,
+ event_subsystem => undef,
+ battery_subsystem => undef,
+ };
+ $self->{serial} = 'unknown';
+ $self->{product} = 'unknown';
+ $self->{romversion} = 'unknown';
+ $self->collect();
+ if (! $self->{runtime}->{plugin}->check_messages() &&
+ ! exists $self->{noinst_hint}) {
+ $self->set_serial();
+ $self->check_for_buggy_firmware();
+ $self->analyze_cpus();
+ $self->analyze_powersupplies();
+ $self->analyze_fan_subsystem();
+ $self->analyze_temperatures();
+ $self->analyze_memory_subsystem();
+ $self->analyze_nic_subsystem();
+ $self->analyze_disk_subsystem();
+ $self->analyze_asr_subsystem();
+ $self->analyze_event_subsystem();
+ $self->analyze_battery_subsystem();
+ $self->auto_blacklist();
+ $self->check_cpus();
+ $self->check_powersupplies();
+ $self->check_fan_subsystem();
+ $self->check_temperatures();
+ $self->check_memory_subsystem();
+ $self->check_nic_subsystem();
+ $self->check_disk_subsystem();
+ $self->check_asr_subsystem();
+ $self->check_event_subsystem();
+ $self->check_battery_subsystem();
+ }
+}
+
+sub identify {
+ my $self = shift;
+ foreach (qw(product serial romversion)) {
+ $self->{$_} =~ s/^\s+//;
+ $self->{$_} =~ s/\s+$//;
+ }
+ return sprintf "System: '%s', S/N: '%s', ROM: '%s'",
+ $self->{product}, $self->{serial}, $self->{romversion};
+}
+
+sub check_for_buggy_firmware {
+ my $self = shift;
+ my @buggyfirmwares = (
+ "P24 12/11/2001",
+ "P24 11/15/2002",
+ "D13 06/03/2003",
+ "D13 09/15/2004",
+ "P20 12/17/2002"
+ );
+ if ($self->{romversion} =~ /^\w+ \d+\/\d+\/\d+$/) {
+ $self->{runtime}->{options}->{buggy_firmware} =
+ grep /^$self->{romversion}/, @buggyfirmwares;
+ } else {
+ # nicht parsbarer schrott in cpqSeSysRomVer, gesehen bei Gen9
+ $self->{runtime}->{options}->{buggy_firmware} = undef;
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf STDERR "serial %s\n", $self->{serial};
+ printf STDERR "product %s\n", $self->{product};
+ printf STDERR "romversion %s\n", $self->{romversion};
+ printf STDERR "%s\n", Data::Dumper::Dumper($self->{components});
+}
+
+sub analyze_powersupplies {
+ my $self = shift;
+ $self->{components}->{powersupply_subsystem} =
+ HP::Proliant::Component::PowersupplySubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_fan_subsystem {
+ my $self = shift;
+ $self->{components}->{fan_subsystem} =
+ HP::Proliant::Component::FanSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_temperatures {
+ my $self = shift;
+ $self->{components}->{temperature_subsystem} =
+ HP::Proliant::Component::TemperatureSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_cpus {
+ my $self = shift;
+ $self->{components}->{cpu_subsystem} =
+ HP::Proliant::Component::CpuSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_memory_subsystem {
+ my $self = shift;
+ $self->{components}->{memory_subsystem} =
+ HP::Proliant::Component::MemorySubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_nic_subsystem {
+ my $self = shift;
+ return if $self->{method} ne "snmp";
+ $self->{components}->{nic_subsystem} =
+ HP::Proliant::Component::NicSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_disk_subsystem {
+ my $self = shift;
+ $self->{components}->{disk_subsystem} =
+ HP::Proliant::Component::DiskSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_asr_subsystem {
+ my $self = shift;
+ $self->{components}->{asr_subsystem} =
+ HP::Proliant::Component::AsrSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_event_subsystem {
+ my $self = shift;
+ $self->{components}->{event_subsystem} =
+ HP::Proliant::Component::EventSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_battery_subsystem {
+ my $self = shift;
+ $self->{components}->{battery_subsystem} =
+ HP::Proliant::Component::BatterySubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub check_cpus {
+ my $self = shift;
+ $self->{components}->{cpu_subsystem}->check();
+ $self->{components}->{cpu_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_powersupplies {
+ my $self = shift;
+ $self->{components}->{powersupply_subsystem}->check();
+ $self->{components}->{powersupply_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_fan_subsystem {
+ my $self = shift;
+ $self->{components}->{fan_subsystem}->check();
+ $self->{components}->{fan_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_temperatures {
+ my $self = shift;
+ $self->{components}->{temperature_subsystem}->check();
+ $self->{components}->{temperature_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_memory_subsystem {
+ my $self = shift;
+ $self->{components}->{memory_subsystem}->check();
+ $self->{components}->{memory_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_nic_subsystem {
+ my $self = shift;
+ return if $self->{method} ne "snmp";
+ if ($self->{runtime}->{plugin}->{opts}->get('eval-nics')) {
+ $self->{components}->{nic_subsystem}->check();
+ $self->{components}->{nic_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+ }
+}
+sub check_disk_subsystem {
+ my $self = shift;
+ $self->{components}->{disk_subsystem}->check();
+ $self->{components}->{disk_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+ # zum anhaengen an die normale ausgabe... da: 2 logical drives, 5 physical...
+ $self->{runtime}->{plugin}->add_message(OK,
+ $self->{components}->{disk_subsystem}->{summary})
+ if $self->{components}->{disk_subsystem}->{summary};
+}
+
+sub check_asr_subsystem {
+ my $self = shift;
+ $self->{components}->{asr_subsystem}->check();
+ $self->{components}->{asr_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_event_subsystem {
+ my $self = shift;
+ $self->{components}->{event_subsystem}->check();
+ $self->{components}->{event_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_battery_subsystem {
+ my $self = shift;
+ $self->{components}->{battery_subsystem}->check();
+ $self->{components}->{battery_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub auto_blacklist() {
+ my $self = shift;
+ if ($self->{product} =~ /380 g6/) {
+ # http://bizsupport1.austin.hp.com/bc/docs/support/SupportManual/c01723408/c01723408.pdf seite 19
+ if ($self->{components}->{cpu_subsystem}->num_cpus() == 1) {
+ $self->add_blacklist('ff/f:5,6');
+ }
+ } elsif ($self->{product} =~ /380 g6/) {
+ # http://bizsupport1.austin.hp.com/bc/docs/support/SupportManual/c01704762/c01704762.pdf Fan 2 is only required when processor 2 is installed in the server.
+ }
+}
+
+
+package HP::Proliant::CLI;
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+our @ISA = qw(HP::Proliant);
+
+sub collect {
+ my $self = shift;
+ my $hpasmcli = undef;
+ if (($self->{runtime}->{plugin}->opts->hpasmcli) &&
+ (-f $self->{runtime}->{plugin}->opts->hpasmcli) &&
+ (! -x $self->{runtime}->{plugin}->opts->hpasmcli)) {
+ no strict 'refs';
+ open(BIRK, $self->{runtime}->{plugin}->opts->hpasmcli);
+ # all output in one file prefixed with server|powersupply|fans|temp|dimm
+ while(<BIRK>) {
+ chomp;
+ $self->{rawdata} .= $_."\n";
+ }
+ close BIRK;
+ # If you run this script and redirect it's output to a file
+ # you can use it for testing purposes with
+ # --hpasmcli <output>
+ # It must not be executable. (chmod 644)
+ my $diag = <<'EOEO';
+ hpasmcli=$(which hpasmcli)
+ hpacucli=$(which hpacucli)
+ for i in server powersupply fans temp dimm
+ do
+ $hpasmcli -s "show $i" | while read line
+ do
+ printf "%s %s\n" $i "$line"
+ done
+ done
+ if [ -x "$hpacucli" ]; then
+ for i in config status
+ do
+ $hpacucli ctrl all show $i | while read line
+ do
+ printf "%s %s\n" $i "$line"
+ done
+ done
+ fi
+EOEO
+ } else {
+ #die "exec hpasmcli";
+ # alles einsammeln und in rawdata stecken
+ my $hpasmcli = undef;
+ $hpasmcli = $self->{runtime}->{plugin}->opts->hpasmcli ?
+ $self->{runtime}->{plugin}->opts->hpasmcli : '/sbin/hpasmcli';
+# check if this exists at all
+# descend the directory
+ if ($self->{runtime}->{plugin}->opts->hpasmcli &&
+ -e $self->{runtime}->{plugin}->opts->hpasmcli) {
+ $hpasmcli = $self->{runtime}->{plugin}->opts->hpasmcli;
+ } elsif (-e '/sbin/hpasmcli') {
+ $hpasmcli = '/sbin/hpasmcli';
+ } else {
+ $hpasmcli = undef;
+ }
+ if ($hpasmcli) {
+ if ($< != 0) {
+ close STDIN;
+ $hpasmcli = "sudo -S ".$hpasmcli;
+ }
+ $self->trace(2, sprintf "calling %s\n", $hpasmcli);
+ $self->check_daemon();
+ if (! $self->{runtime}->{plugin}->check_messages()) {
+ $self->check_hpasm_client($hpasmcli);
+ if (! $self->{runtime}->{plugin}->check_messages()) {
+ foreach my $component (qw(server fans temp dimm powersupply iml)) {
+ if (open HPASMCLI, "$hpasmcli -s \"show $component\" </dev/null |") {
+ my @output = <HPASMCLI>;
+ close HPASMCLI;
+ $self->{rawdata} .= join("\n", map {
+ $component.' '.$_;
+ } @output);
+ }
+ }
+ if ($self->{runtime}->{options}->{hpacucli}) {
+ #1 oder 0. pfad selber finden
+ my $hpacucli = undef;
+ if (-e '/usr/sbin/hpssacli') {
+ $hpacucli = '/usr/sbin/hpssacli';
+ } elsif (-e '/usr/local/sbin/hpssacli') {
+ $hpacucli = '/usr/local/sbin/hpssacli';
+ } elsif (-e '/usr/sbin/hpacucli') {
+ $hpacucli = '/usr/sbin/hpacucli';
+ } elsif (-e '/usr/local/sbin/hpacucli') {
+ $hpacucli = '/usr/local/sbin/hpacucli';
+ } elsif (-e '/usr/sbin/hpssacli') {
+ $hpacucli = '/usr/sbin/hpssacli';
+ } elsif (-e '/usr/local/sbin/hpssacli') {
+ $hpacucli = '/usr/local/sbin/hpssacli';
+ } else {
+ $hpacucli = $hpasmcli;
+ $hpacucli =~ s/^sudo\s*//;
+ $hpacucli =~ s/hpasmcli/hpacucli/;
+ $hpacucli = -e $hpacucli ? $hpacucli : undef;
+ if (! $hpacucli) {
+ $hpacucli = $hpasmcli;
+ $hpacucli =~ s/^sudo\s*//;
+ $hpacucli =~ s/hpasmcli/hpssacli/;
+ $hpacucli = -e $hpacucli ? $hpacucli : undef;
+ }
+ }
+ if ($hpacucli) {
+ if ($< != 0) {
+ close STDIN;
+ $hpacucli = "sudo -S ".$hpacucli;
+ }
+ $self->trace(2, sprintf "calling %s\n", $hpacucli);
+ $self->check_hpacu_client($hpacucli);
+ if (! $self->{runtime}->{plugin}->check_messages()) {
+ if (open HPACUCLI, "$hpacucli ctrl all show status 2>&1|") {
+ my @output = <HPACUCLI>;
+ close HPACUCLI;
+ $self->{rawdata} .= join("\n", map {
+ 'status '.$_;
+ } @output);
+ }
+ if (open HPACUCLI, "$hpacucli ctrl all show config 2>&1|") {
+ my @output = <HPACUCLI>;
+ close HPACUCLI;
+ $self->{rawdata} .= join("\n", map {
+ 'config '.$_;
+ } @output);
+ if (grep /Syntax error at "config"/, @output) {
+ # older version of hpacucli CLI 7.50.18.0
+ foreach my $slot (0..10) {
+ if (open HPACUCLI, "$hpacucli ctrl slot=$slot logicaldrive all show 2>&1|") {
+ my @output = <HPACUCLI>;
+ close HPACUCLI;
+ $self->{rawdata} .= join("\n", map {
+ 'config '.$_;
+ } @output);
+ }
+ if (open HPACUCLI, "$hpacucli ctrl slot=$slot physicaldrive all show 2>&1|") {
+ my @output = <HPACUCLI>;
+ close HPACUCLI;
+ $self->{rawdata} .= join("\n", map {
+ 'config '.$_;
+ } @output);
+ }
+ }
+ }
+ }
+ } elsif ($self->{runtime}->{options}->{hpacucli} == 2) {
+ # we probably don't have sudo-privileges, but we were compiled with
+ # --enable-hpacucli=maybe
+ # so we cover it up in silence
+ $self->remove_message(UNKNOWN);
+ $self->trace(2, sprintf "calling %s seems to have failed, but nobody cares\n", $hpacucli);
+ }
+ } else {
+ if ($self->{runtime}->{options}->{noinstlevel} eq 'ok') {
+ $self->add_message(OK,
+ 'hpacucli is not installed. let\'s hope the best...');
+ } else {
+ $self->add_message(
+ uc $self->{runtime}->{options}->{noinstlevel},
+ 'hpacucli is not installed.');
+ }
+ }
+ }
+ }
+ }
+ } else {
+ if ($self->{runtime}->{options}->{noinstlevel} eq 'ok') {
+ $self->add_message(OK,
+ 'hpasm is not installed, i can only guess');
+ $self->{noinst_hint} = 1;
+ } else {
+ $self->add_message(
+ uc $self->{runtime}->{options}->{noinstlevel},
+ 'hpasmcli is not installed.');
+ }
+ }
+ }
+}
+
+
+sub check_daemon {
+ my $self = shift;
+ my $multiproc_os_signatures_files = {
+ '/etc/SuSE-release' => 'VERSION\s*=\s*8',
+ '/etc/trustix-release' => '.*',
+ '/etc/redhat-release' => '.*Pensacola.*',
+ '/etc/debian_version' => '3\.1',
+ '/etc/issue' => '.*Kernel 2\.4\.9-vmnix2.*', # VMware ESX Server 2.5.4
+ };
+ if (open PS, "/bin/ps -e -ocmd|") {
+ my $numprocs = 0;
+ my $numcliprocs = 0;
+ my @procs = <PS>;
+ close PS;
+ $numprocs = grep /hpasm.*d$/, map { (split /\s+/, $_)[0] } @procs;
+ $numcliprocs = grep /hpasmcli/, grep !/check_hpasm/, @procs;
+ if (! $numprocs ) {
+ $self->add_message(CRITICAL, 'hpasmd needs to be restarted');
+ } elsif ($numprocs > 1) {
+ my $known = 0;
+ foreach my $osfile (keys %{$multiproc_os_signatures_files}) {
+ if (-f $osfile) {
+ open OSSIG, $osfile;
+ if (grep /$multiproc_os_signatures_files->{$osfile}/, <OSSIG>) {
+ $known = 1;
+ }
+ close OSSIG;
+ }
+ }
+ if (! $known) {
+ $self->add_message(UNKNOWN, 'multiple hpasmd procs');
+ }
+ }
+ if ($numcliprocs == 1) {
+ $self->add_message(UNKNOWN, 'another hpasmcli is running');
+ } elsif ($numcliprocs > 1) {
+ $self->add_message(UNKNOWN, 'hanging hpasmcli processes');
+ }
+ }
+}
+
+sub check_hpasm_client {
+ my $self = shift;
+ my $hpasmcli = shift;
+ if (open HPASMCLI, "$hpasmcli -s help 2>&1 |") {
+ my @output = <HPASMCLI>;
+ close HPASMCLI;
+ if (grep /Could not communicate with hpasmd/, @output) {
+ $self->add_message(CRITICAL, 'hpasmd needs to be restarted');
+ } elsif (grep /(asswor[dt]:)|(You must be root)/, @output) {
+ $self->add_message(UNKNOWN,
+ sprintf "insufficient rights to call %s", $hpasmcli);
+ } elsif (grep /must have a tty/, @output) {
+ $self->add_message(CRITICAL,
+ 'sudo must be configured with requiretty=no (man sudo)');
+ } elsif (grep /ERROR: hpasmcli only runs on HPE Proliant Servers/, @output) {
+ $self->add_message(UNKNOWN, "hpasmcli detected incompatible hardware");
+ } elsif (! grep /CLEAR/, @output) {
+ $self->add_message(UNKNOWN,
+ sprintf "insufficient rights to call %s", $hpasmcli);
+ }
+ } else {
+ $self->add_message(UNKNOWN,
+ sprintf "insufficient rights to call %s", $hpasmcli);
+ }
+}
+
+sub check_hpacu_client {
+ my $self = shift;
+ my $hpacucli = shift;
+ if (open HPACUCLI, "$hpacucli help 2>&1 |") {
+ my @output = <HPACUCLI>;
+ close HPACUCLI;
+ if (grep /Another instance of hpacucli is running/, @output) {
+ $self->add_message(UNKNOWN, 'another hpacucli is running');
+ } elsif (grep /You need to have administrator rights/, @output) {
+ $self->add_message(UNKNOWN,
+ sprintf "insufficient rights to call %s", $hpacucli);
+ } elsif (grep /(asswor[dt]:)|(You must be root)/, @output) {
+ $self->add_message(UNKNOWN,
+ sprintf "insufficient rights to call %s", $hpacucli);
+ } elsif (! grep /(CLI Syntax)|(ACU CLI)/, @output) {
+ $self->add_message(UNKNOWN,
+ sprintf "insufficient rights to call %s", $hpacucli);
+ }
+ } else {
+ $self->add_message(UNKNOWN,
+ sprintf "insufficient rights to call %s", $hpacucli);
+ }
+}
+
+sub set_serial {
+ my $self = shift;
+ foreach (grep(/^server/, split(/\n/, $self->{rawdata}))) {
+ if (/System\s+:\s+(.*[^\s])/) {
+ $self->{product} = lc $1;
+ } elsif (/Serial No\.\s+:\s+(\w+)/) {
+ $self->{serial} = $1;
+ } elsif (/ROM version\s+:\s+(.*[^\s])/) {
+ $self->{romversion} = $1;
+ }
+ }
+ $self->{serial} = $self->{serial};
+ $self->{product} = lc $self->{product};
+ $self->{romversion} = $self->{romversion};
+ foreach (qw(serial product romversion)) {
+ $self->{$_} =~ s/\s+$//g;
+ }
+}
+
+
+package HP::Proliant::SNMP;
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+our @ISA = qw(HP::Proliant);
+
+sub collect {
+ my $self = shift;
+ my %oidtables = (
+ system => "1.3.6.1.2.1.1",
+ cpqSeProcessor => "1.3.6.1.4.1.232.1.2.2",
+ cpqHePWSComponent => "1.3.6.1.4.1.232.6.2.9",
+ cpqHeThermal => "1.3.6.1.4.1.232.6.2.6",
+ cpqHeMComponent => "1.3.6.1.4.1.232.6.2.14",
+ cpqDaComponent => "1.3.6.1.4.1.232.3.2",
+ cpqSiComponent => "1.3.6.1.4.1.232.2.2",
+ cpqSeRom => "1.3.6.1.4.1.232.1.2.6",
+ cpqSasComponent => "1.3.6.1.4.1.232.5",
+ cpqIdeComponent => "1.3.6.1.4.1.232.14",
+ cpqFcaComponent => "1.3.6.1.4.1.232.16.2",
+ cpqHeAsr => "1.3.6.1.4.1.232.6.2.5",
+ cpqNic => "1.3.6.1.4.1.232.18.2",
+ cpqHeEventLog => "1.3.6.1.4.1.232.6.2.11",
+ cpqHeSysBackupBattery => "1.3.6.1.4.1.232.6.2.17",
+
+ # cpqHeComponent => "1.3.6.1.4.1.232.6.2",
+ # cpqHeFComponent => "1.3.6.1.4.1.232.6.2.6.7",
+ # cpqHeTComponent => "1.3.6.1.4.1.232.6.2.6.8",
+ );
+ my %oidvalues = (
+ cpqHeEventLogSupported => "1.3.6.1.4.1.232.6.2.11.1.0",
+ cpqHeEventLogCondition => "1.3.6.1.4.1.232.6.2.11.2.0",
+ cpqNicIfLogMapOverallCondition => "1.3.6.1.4.1.232.18.2.2.2.0",
+ cpqHeThermalTempStatus => "1.3.6.1.4.1.232.6.2.6.3.0",
+ cpqHeThermalSystemFanStatus => "1.3.6.1.4.1.232.6.2.6.4.0",
+ cpqHeThermalCpuFanStatus => "1.3.6.1.4.1.232.6.2.6.5.0",
+ cpqHeAsrStatus => "1.3.6.1.4.1.232.6.2.5.1.0",
+ cpqHeAsrCondition => "1.3.6.1.4.1.232.6.2.5.17.0",
+ );
+ if ($self->{runtime}->{plugin}->opts->snmpwalk) {
+ my $cpqSeMibCondition = '1.3.6.1.4.1.232.1.1.3.0'; # 2=ok
+ my $cpqHeMibCondition = '1.3.6.1.4.1.232.6.1.3.0'; # hat nicht jeder
+ if ($self->{productname} =~ /4LEE/) {
+ # rindsarsch!
+ $self->{rawdata}->{$cpqHeMibCondition} = 0;
+ }
+ if (! exists $self->{rawdata}->{$cpqHeMibCondition} &&
+ ! exists $self->{rawdata}->{$cpqSeMibCondition}) { # vlt. geht doch was
+ $self->add_message(CRITICAL,
+ 'snmpwalk returns no health data (cpqhlth-mib)');
+ }
+ $self->{fullrawdata} = {};
+ %{$self->{fullrawdata}} = %{$self->{rawdata}};
+ $self->{rawdata} = {};
+ if (! $self->{runtime}->{plugin}->check_messages()) {
+ # for a better simulation, only put those oids into
+ # rawdata which would also be put by a real snmp agent.
+ foreach my $table (keys %oidtables) {
+ my $oid = $oidtables{$table};
+ $oid =~ s/\./\\./g;
+ my $tmpoids = {};
+ my $tic = time;
+ map { $tmpoids->{$_} = $self->{fullrawdata}->{$_} }
+ grep /^$oid/, %{$self->{fullrawdata}};
+ my $tac = time;
+ $self->trace(2, sprintf "%03d seconds for walk %s (%d oids)",
+ $tac - $tic, $table, scalar(keys %{$tmpoids}));
+ map { $self->{rawdata}->{$_} = $tmpoids->{$_} } keys %{$tmpoids};
+ }
+ my @oids = values %oidvalues;
+ map { $self->{rawdata}->{$_} = $self->{fullrawdata}->{$_} } @oids;
+ }
+ } else {
+ my $net_snmp_version = Net::SNMP->VERSION(); # 5.002000 or 6.000000
+ #$params{'-translate'} = [
+ # -all => 0x0
+ #];
+ my ($session, $error) =
+ Net::SNMP->session(%{$self->{runtime}->{snmpparams}});
+ if (! defined $session) {
+ $self->{plugin}->add_message(CRITICAL, 'cannot create session object');
+ $self->trace(1, Data::Dumper::Dumper($self->{runtime}->{snmpparams}));
+ } else {
+ $session->translate(['-timeticks' => 0]);
+ # revMajor is often used for discovery of hp devices
+ my $cpqHeMibRev = '1.3.6.1.4.1.232.6.1';
+ my $cpqHeMibRevMajor = '1.3.6.1.4.1.232.6.1.1.0';
+ my $cpqHeMibCondition = '1.3.6.1.4.1.232.6.1.3.0';
+ my $result = $session->get_request(
+ -varbindlist => [$cpqHeMibCondition]
+ );
+ if ($self->{productname} =~ /4LEE/) {
+ # rindsarsch!
+ $result->{$cpqHeMibCondition} = 0;
+ }
+ if (!defined($result) ||
+ $result->{$cpqHeMibCondition} eq 'noSuchInstance' ||
+ $result->{$cpqHeMibCondition} eq 'noSuchObject' ||
+ $result->{$cpqHeMibCondition} eq 'endOfMibView') {
+ $self->add_message(CRITICAL,
+ 'snmpwalk returns no health data (cpqhlth-mib)');
+ $session->close;
+ } else {
+ # this is not reliable. many agents return 4=failed
+ #if ($result->{$cpqHeMibCondition} != 2) {
+ # $obstacle = "cmapeerstart";
+ #}
+ }
+ }
+ if (! $self->{runtime}->{plugin}->check_messages()) {
+ # snmp peer is alive
+ $self->trace(2, sprintf "Protocol is %s",
+ $self->{runtime}->{snmpparams}->{'-version'});
+ $session->translate;
+ my $response = {}; #break the walk up in smaller pieces
+ foreach my $table (keys %oidtables) {
+ my $oid = $oidtables{$table};
+ my $tic = time;
+ my $tmpresponse = $session->get_table(
+ -baseoid => $oid);
+ if (scalar (keys %{$tmpresponse}) == 0) {
+ $self->trace(2, sprintf "maxrepetitions failed. fallback");
+ $tmpresponse = $session->get_table(
+ -maxrepetitions => 1,
+ -baseoid => $oid);
+ }
+ my $tac = time;
+ $self->trace(2, sprintf "%03d seconds for walk %s (%d oids)",
+ $tac - $tic, $table, scalar(keys %{$tmpresponse}));
+ map { $response->{$_} = $tmpresponse->{$_} } keys %{$tmpresponse};
+ }
+ my @oids = values %oidvalues;
+ my $tic = time;
+ my $tmpresponse = $session->get_request(
+ -varbindlist => \@oids,
+ );
+ my $tac = time;
+ $self->trace(2, sprintf "%03d seconds for get various (%d oids)",
+ $tac - $tic, scalar(keys %{$tmpresponse}));
+ map { $response->{$_} = $tmpresponse->{$_} } keys %{$tmpresponse};
+ $session->close();
+ $self->{rawdata} = $response;
+ }
+ }
+ return $self->{runtime}->{plugin}->check_messages();
+}
+
+sub set_serial {
+ my $self = shift;
+
+ my $cpqSiSysSerialNum = "1.3.6.1.4.1.232.2.2.2.1.0";
+ my $cpqSiProductName = "1.3.6.1.4.1.232.2.2.4.2.0";
+ my $cpqSeSysRomVer = "1.3.6.1.4.1.232.1.2.6.1.0";
+ my $cpqSeRedundantSysRomVer = "1.3.6.1.4.1.232.1.2.6.4.0";
+
+ $self->{serial} =
+ SNMP::Utils::get_object($self->{rawdata}, $cpqSiSysSerialNum);
+ $self->{product} =
+ SNMP::Utils::get_object($self->{rawdata}, $cpqSiProductName);
+ $self->{romversion} =
+ SNMP::Utils::get_object($self->{rawdata}, $cpqSeSysRomVer);
+ $self->{redundantromversion} =
+ SNMP::Utils::get_object($self->{rawdata}, $cpqSeRedundantSysRomVer);
+ if ($self->{romversion} && $self->{romversion} =~
+ #/(\d{2}\/\d{2}\/\d{4}).*?([ADP]{1}\d{2}).*/) {
+ /(\d{2}\/\d{2}\/\d{4}).*?Family.*?([A-Z]{1})(\d+).*/) {
+ $self->{romversion} = sprintf("%s%02d %s", $2, $3, $1);
+ } elsif ($self->{romversion} && $self->{romversion} =~
+ /([ADP]{1}\d{2})\-(\d{2}\/\d{2}\/\d{4})/) {
+ $self->{romversion} = sprintf("%s %s", $1, $2);
+ } else {
+ # fallback if romversion is broken, redundantromversion not
+ #.1.3.6.1.4.1.232.1.2.6.1.0 = STRING: "4), Family "
+ #.1.3.6.1.4.1.232.1.2.6.3.0 = ""
+ #.1.3.6.1.4.1.232.1.2.6.4.0 = STRING: "v1.20 (08/26/2014), Family "
+ if ($self->{redundantromversion} && $self->{redundantromversion} =~
+ /(\d{2}\/\d{2}\/\d{4}).*?Family.*?([A-Z]{1})(\d+).*/) {
+ $self->{romversion} = sprintf("%s%02d %s", $2, $3, $1);
+ } elsif ($self->{redundantromversion} && $self->{redundantromversion} =~
+ /([ADP]{1}\d{2})\-(\d{2}\/\d{2}\/\d{4})/) {
+ $self->{romversion} = sprintf("%s %s", $1, $2);
+ }
+ }
+ if (!$self->{serial} && $self->{romversion}) {
+ # this probably is a very, very old server.
+ $self->{serial} = "METHUSALEM";
+ $self->{runtime}->{scrapiron} = 1;
+ }
+ $self->{serial} = $self->{serial};
+ $self->{product} = lc $self->{product};
+ $self->{romversion} = $self->{romversion};
+ $self->{runtime}->{product} = $self->{product};
+}
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component.pm
new file mode 100755
index 0000000..cefab99
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component.pm
@@ -0,0 +1,5 @@
+package HP::Proliant::Component;
+our @ISA = qw(HP::Proliant);
+
+1;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/AsrSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/AsrSubsystem.pm
new file mode 100755
index 0000000..fccfb3d
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/AsrSubsystem.pm
@@ -0,0 +1,45 @@
+package HP::Proliant::Component::AsrSubsystem;
+our @ISA = qw(HP::Proliant::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ condition => $params{condition},
+ status => $params{status},
+ temperatures => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ if ($self->{method} eq 'snmp') {
+ return HP::Proliant::Component::AsrSubsystem::SNMP->new(%params);
+ } elsif ($self->{method} eq 'cli') {
+ return HP::Proliant::Component::AsrSubsystem::CLI->new(%params);
+ } else {
+ die "unknown method";
+ }
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ my $errorfound = 0;
+ $self->add_info('checking ASR');
+ $self->overall_check();
+}
+
+sub dump {
+ my $self = shift;
+}
+
+
+1;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/AsrSubsystem/CLI.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/AsrSubsystem/CLI.pm
new file mode 100755
index 0000000..68dad8a
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/AsrSubsystem/CLI.pm
@@ -0,0 +1,32 @@
+package HP::Proliant::Component::AsrSubsystem::CLI;
+our @ISA = qw(HP::Proliant::Component::AsrSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init(%params);
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+}
+
+sub overall_check {
+ my $self = shift;
+ my %params = @_;
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/AsrSubsystem/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/AsrSubsystem/SNMP.pm
new file mode 100755
index 0000000..823ccf4
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/AsrSubsystem/SNMP.pm
@@ -0,0 +1,68 @@
+package HP::Proliant::Component::AsrSubsystem::SNMP;
+our @ISA = qw(HP::Proliant::Component::AsrSubsystem
+ HP::Proliant::Component::SNMP);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->overall_init(%params);
+ return $self;
+}
+
+sub overall_init {
+ my $self = shift;
+ my %params = @_;
+ my $snmpwalk = $params{rawdata};
+ my $cpqHeAsrStatus = "1.3.6.1.4.1.232.6.2.5.1.0";
+ my $cpqHeAsrStatusValue = {
+ 1 => "other",
+ 2 => "notAvailable",
+ 3 => "disabled",
+ 4 => "enabled",
+ };
+ my $cpqHeAsrCondition = "1.3.6.1.4.1.232.6.2.5.17.0";
+ my $cpqHeAsrConditionValue = {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ };
+ $self->{asrcondition} = SNMP::Utils::get_object_value(
+ $snmpwalk, $cpqHeAsrCondition,
+ $cpqHeAsrConditionValue);
+ $self->{asrstatus} = SNMP::Utils::get_object_value(
+ $snmpwalk, $cpqHeAsrStatus,
+ $cpqHeAsrStatusValue);
+ $self->{asrcondition} |= lc $self->{asrcondition};
+ $self->{asrstatus} |= lc $self->{asrstatus};
+}
+
+sub overall_check {
+ my $self = shift;
+ my $result = 0;
+ $self->blacklist('asr', '');
+ if ($self->{asrstatus} and $self->{asrstatus} eq "enabled") {
+ my $info = sprintf 'ASR overall condition is %s', $self->{asrcondition};
+ if ($self->{asrcondition} eq "degraded") {
+ $self->add_message(WARNING, $info);
+ } elsif ($self->{asrcondition} eq "failed") {
+ $self->add_message(CRITICAL, $info);
+ }
+ $self->add_info($info);
+ } else {
+ $self->add_info('This system does not have ASR.');
+ }
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/BatterySubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/BatterySubsystem.pm
new file mode 100755
index 0000000..82da78d
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/BatterySubsystem.pm
@@ -0,0 +1,124 @@
+package HP::Proliant::Component::BatterySubsystem;
+our @ISA = qw(HP::Proliant::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ condition => $params{condition},
+ status => $params{status},
+ sysbatteries => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ if ($self->{method} eq 'snmp') {
+ return HP::Proliant::Component::BatterySubsystem::SNMP->new(%params);
+ } elsif ($self->{method} eq 'cli') {
+ #return HP::Proliant::Component::BatterySubsystem::CLI->new(%params);
+ } else {
+ die "unknown method";
+ }
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ my $errorfound = 0;
+ $self->add_info('checking sysbatteries');
+ if (scalar (@{$self->{sysbatteries}}) == 0) {
+ #$self->overall_check();
+ $self->add_info('no sysbatteries found');
+ } else {
+ foreach (sort { $a->{cpqHeSysBatteryIndex} <=> $b->{cpqHeSysBatteryIndex}}
+ @{$self->{sysbatteries}}) {
+ $_->check();
+ }
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{sysbatteries}}) {
+ $_->dump();
+ }
+}
+
+
+package HP::Proliant::Component::BatterySubsystem::Battery;
+our @ISA = qw(HP::Proliant::Component::BatterySubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqHeSysBatteryChassis => $params{cpqHeSysBatteryChassis},
+ cpqHeSysBatteryIndex => $params{cpqHeSysBatteryIndex},
+ cpqHeSysBatteryPresent => $params{cpqHeSysBatteryPresent},
+ cpqHeSysBatteryCondition => $params{cpqHeSysBatteryCondition},
+ cpqHeSysBatteryStatus => $params{cpqHeSysBatteryStatus},
+ cpqHeSysBatteryCapacityMaximum => $params{cpqHeSysBatteryCapacityMaximum},
+ cpqHeSysBatteryProductName => $params{cpqHeSysBatteryProductName},
+ cpqHeSysBatteryModel => $params{cpqHeSysBatteryModel},
+ cpqHeSysBatterySerialNumber => $params{cpqHeSysBatterySerialNumber},
+ cpqHeSysBatteryFirmwareRev => $params{cpqHeSysBatteryFirmwareRev},
+ cpqHeSysBatterySparePartNum => $params{cpqHeSysBatterySparePartNum},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ $self->{name} = $params{name} ||
+ $self->{cpqHeSysBatteryChassis}.':'.$self->{cpqHeSysBatteryIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('sba', $self->{name});
+ my $info = sprintf "battery %s/%s has condition %s and status %s",
+ $self->{cpqHeSysBatteryChassis},
+ $self->{cpqHeSysBatteryIndex},
+ $self->{cpqHeSysBatteryCondition},
+ $self->{cpqHeSysBatteryStatus};
+ if ($self->{cpqHeSysBatteryCondition} eq "ok") {
+ } elsif ($self->{cpqHeSysBatteryCondition} eq "degraded") {
+ $self->add_info($info);
+ $self->add_message(WARNING, $self->{info});
+ } elsif ($self->{cpqHeSysBatteryCondition} eq "failed") {
+ $self->add_info($info);
+ $self->add_message(CRITICAL, $self->{info});
+ } else {
+ $self->add_info($info);
+ $self->add_message(UNKNOWN, $self->{info});
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[SYSBATTERY_%s_%s]\n", $self->{cpqHeSysBatteryChassis},
+ $self->{cpqHeSysBatteryIndex};
+ foreach (qw(cpqHeSysBatteryChassis cpqHeSysBatteryIndex
+ cpqHeSysBatteryPresent cpqHeSysBatteryCondition cpqHeSysBatteryStatus
+ cpqHeSysBatteryCapacityMaximum cpqHeSysBatteryProductName
+ cpqHeSysBatteryModel cpqHeSysBatterySerialNumber
+ cpqHeSysBatteryFirmwareRev cpqHeSysBatterySparePartNum)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "info: %s\n\n", $self->{info};
+}
+
+
+1;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/BatterySubsystem/CLI.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/BatterySubsystem/CLI.pm
new file mode 100755
index 0000000..46211e6
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/BatterySubsystem/CLI.pm
@@ -0,0 +1,27 @@
+package HP::Proliant::Component::BatterySubsystem::CLI;
+our @ISA = qw(HP::Proliant::Component::BatterySubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init(%params);
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/BatterySubsystem/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/BatterySubsystem/SNMP.pm
new file mode 100755
index 0000000..2fb23df
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/BatterySubsystem/SNMP.pm
@@ -0,0 +1,78 @@
+package HP::Proliant::Component::BatterySubsystem::SNMP;
+our @ISA = qw(HP::Proliant::Component::BatterySubsystem
+ HP::Proliant::Component::SNMP);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ sysbatteries => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init(%params);
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ my $snmpwalk = $self->{rawdata};
+ my $oids = {
+ cpqHeSysBatteryTable => '1.3.6.1.4.1.232.6.2.17.2',
+ cpqHeSysBatteryEntry => '1.3.6.1.4.1.232.6.2.17.2.1',
+ cpqHeSysBatteryChassis => '1.3.6.1.4.1.232.6.2.17.2.1.1',
+ cpqHeSysBatteryIndex => '1.3.6.1.4.1.232.6.2.17.2.1.2',
+ cpqHeSysBatteryPresent => '1.3.6.1.4.1.232.6.2.17.2.1.3',
+ cpqHeSysBatteryPresentValue => {
+ '1' => 'other',
+ '2' => 'absent',
+ '3' => 'present',
+ },
+ cpqHeSysBatteryCondition => '1.3.6.1.4.1.232.6.2.17.2.1.4',
+ cpqHeSysBatteryConditionValue => {
+ '1' => 'other',
+ '2' => 'ok',
+ '3' => 'degraded',
+ '4' => 'failed',
+ },
+ cpqHeSysBatteryStatus => '1.3.6.1.4.1.232.6.2.17.2.1.5',
+ cpqHeSysBatteryStatusValue => {
+ '1' => 'noError',
+ '2' => 'generalFailure',
+ '3' => 'shutdownHighResistance',
+ '4' => 'shutdownLowVoltage',
+ '5' => 'shutdownShortCircuit',
+ '6' => 'shutdownChargeTimeout',
+ '7' => 'shutdownOverTemperature',
+ '8' => 'shutdownDischargeMinVoltage',
+ '9' => 'shutdownDischargeCurrent',
+ '10' => 'shutdownLoadCountHigh',
+ '11' => 'shutdownEnablePin',
+ '12' => 'shutdownOverCurrent',
+ '13' => 'shutdownPermanentFailure',
+ '14' => 'shutdownBackupTimeExceeded',
+ },
+ cpqHeSysBatteryCapacityMaximum => '1.3.6.1.4.1.232.6.2.17.2.1.6',
+ cpqHeSysBatteryProductName => '1.3.6.1.4.1.232.6.2.17.2.1.7',
+ cpqHeSysBatteryModel => '1.3.6.1.4.1.232.6.2.17.2.1.8',
+ cpqHeSysBatterySerialNumber => '1.3.6.1.4.1.232.6.2.17.2.1.9',
+ cpqHeSysBatteryFirmwareRev => '1.3.6.1.4.1.232.6.2.17.2.1.10',
+ cpqHeSysBatterySparePartNum => '1.3.6.1.4.1.232.6.2.17.2.1.11',
+ };
+ # INDEX { cpqHeSysBatteryChassis, cpqHeSysBatteryIndex }
+ foreach ($self->get_entries($oids, 'cpqHeSysBatteryEntry')) {
+ next if ! $_->{cpqHeSysBatteryPresent} eq "present";
+ push(@{$self->{sysbatteries}},
+ HP::Proliant::Component::BatterySubsystem::Battery->new(%{$_}));
+ }
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/CpuSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/CpuSubsystem.pm
new file mode 100755
index 0000000..0486fd9
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/CpuSubsystem.pm
@@ -0,0 +1,112 @@
+package HP::Proliant::Component::CpuSubsystem;
+our @ISA = qw(HP::Proliant::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+################################## scrapiron ##########
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ condition => $params{condition},
+ status => $params{status},
+ cpus => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ if ($self->{method} eq 'snmp') {
+ return HP::Proliant::Component::CpuSubsystem::SNMP->new(%params);
+ } elsif ($self->{method} eq 'cli') {
+ return HP::Proliant::Component::CpuSubsystem::CLI->new(%params);
+ } else {
+ die "unknown method";
+ }
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ my $errorfound = 0;
+ $self->add_info('checking cpus');
+ if (scalar (@{$self->{cpus}}) == 0) {
+ # sachen gibts.....
+ # $self->overall_check(); # sowas ist mir nur einmal untergekommen
+ } else {
+ foreach (@{$self->{cpus}}) {
+ $_->check();
+ }
+ }
+}
+
+sub num_cpus {
+ my $self = shift;
+ return scalar @{$self->{cpus}};
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{cpus}}) {
+ $_->dump();
+ }
+}
+
+
+package HP::Proliant::Component::CpuSubsystem::Cpu;
+our @ISA = qw(HP::Proliant::Component::CpuSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqSeCpuSlot => $params{cpqSeCpuSlot},
+ cpqSeCpuUnitIndex => $params{cpqSeCpuUnitIndex},
+ cpqSeCpuName => $params{cpqSeCpuName},
+ cpqSeCpuStatus => $params{cpqSeCpuStatus},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('c', $self->{cpqSeCpuUnitIndex});
+ if ($self->{cpqSeCpuStatus} ne "ok") {
+ if ($self->{runtime}->{options}{scrapiron} &&
+ ($self->{cpqSeCpuStatus} eq "unknown")) {
+ $self->add_info(sprintf "cpu %d probably ok (%s)",
+ $self->{cpqSeCpuUnitIndex}, $self->{cpqSeCpuStatus});
+ } else {
+ $self->add_info(sprintf "cpu %d needs attention (%s)",
+ $self->{cpqSeCpuUnitIndex}, $self->{cpqSeCpuStatus});
+ $self->add_message(CRITICAL, $self->{info});
+ }
+ } else {
+ $self->add_info(sprintf "cpu %d is %s",
+ $self->{cpqSeCpuUnitIndex}, $self->{cpqSeCpuStatus});
+ }
+ $self->add_extendedinfo(sprintf "cpu_%s=%s",
+ $self->{cpqSeCpuUnitIndex}, $self->{cpqSeCpuStatus});
+}
+
+sub dump {
+ my $self = shift;
+ printf "[CPU_%s]\n", $self->{cpqSeCpuUnitIndex};
+ foreach (qw(cpqSeCpuSlot cpqSeCpuUnitIndex cpqSeCpuName cpqSeCpuStatus)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "info: %s\n", $self->{info};
+ printf "\n";
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/CpuSubsystem/CLI.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/CpuSubsystem/CLI.pm
new file mode 100755
index 0000000..8953417
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/CpuSubsystem/CLI.pm
@@ -0,0 +1,57 @@
+package HP::Proliant::Component::CpuSubsystem::CLI;
+our @ISA = qw(HP::Proliant::Component::CpuSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ cpus => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init(%params);
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ my %tmpcpu = (
+ runtime => $params{runtime},
+ );
+ my $inblock = 0;
+ foreach (grep(/^server/, split(/\n/, $self->{rawdata}))) {
+ if (/Processor:\s+(\d+)/) {
+ $tmpcpu{cpqSeCpuUnitIndex} = $1;
+ $inblock = 1;
+ } elsif (/Name\s*:\s+(.+?)\s*$/) {
+ $tmpcpu{cpqSeCpuName} = $1;
+ } elsif (/Status\s*:\s+(.+?)\s*$/) {
+ $tmpcpu{cpqSeCpuStatus} = lc $1;
+ } elsif (/Socket\s*:\s+(.+?)\s*$/) {
+ $tmpcpu{cpqSeCpuSlot} = $1;
+ } elsif (/^server\s*$/) {
+ if ($inblock) {
+ $inblock = 0;
+ push(@{$self->{cpus}},
+ HP::Proliant::Component::CpuSubsystem::Cpu->new(%tmpcpu));
+ %tmpcpu = (
+ runtime => $params{runtime},
+ );
+ }
+ }
+ }
+ if ($inblock) {
+ push(@{$self->{cpus}},
+ HP::Proliant::Component::CpuSubsystem::Cpu->new(%tmpcpu));
+ }
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/CpuSubsystem/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/CpuSubsystem/SNMP.pm
new file mode 100755
index 0000000..0824d04
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/CpuSubsystem/SNMP.pm
@@ -0,0 +1,50 @@
+package HP::Proliant::Component::CpuSubsystem::SNMP;
+our @ISA = qw(HP::Proliant::Component::CpuSubsystem
+ HP::Proliant::Component::SNMP);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ cpus => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init();
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+ # CPQSTDEQ-MIB
+ my $oids = {
+ cpqSeCpuEntry => '1.3.6.1.4.1.232.1.2.2.1.1',
+ cpqSeCpuUnitIndex => '1.3.6.1.4.1.232.1.2.2.1.1.1',
+ cpqSeCpuSlot => '1.3.6.1.4.1.232.1.2.2.1.1.2',
+ cpqSeCpuName => '1.3.6.1.4.1.232.1.2.2.1.1.3',
+ cpqSeCpuStatus => '1.3.6.1.4.1.232.1.2.2.1.1.6',
+ cpqSeCpuStatusValue => {
+ 1 => "unknown",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ 5 => "disabled",
+ },
+ };
+
+ # INDEX { cpqSeCpuUnitIndex }
+ foreach ($self->get_entries($oids, 'cpqSeCpuEntry')) {
+ push(@{$self->{cpus}},
+ HP::Proliant::Component::CpuSubsystem::Cpu->new(%{$_}));
+ }
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem.pm
new file mode 100755
index 0000000..bd50a87
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem.pm
@@ -0,0 +1,159 @@
+package HP::Proliant::Component::DiskSubsystem;
+our @ISA = qw(HP::Proliant::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ da_subsystem => undef,
+ sas_da_subsystem => undef,
+ ide_da_subsystem => undef,
+ fca_da_subsystem => undef,
+ scsi_da_subsystem => undef,
+ condition => $params{condition},
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ $self->init();
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ $self->{da_subsystem} = HP::Proliant::Component::DiskSubsystem::Da->new(
+ runtime => $self->{runtime},
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ );
+ $self->{sas_subsystem} = HP::Proliant::Component::DiskSubsystem::Sas->new(
+ runtime => $self->{runtime},
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ );
+ $self->{scsi_subsystem} = HP::Proliant::Component::DiskSubsystem::Scsi->new(
+ runtime => $self->{runtime},
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ );
+ $self->{ide_subsystem} = HP::Proliant::Component::DiskSubsystem::Ide->new(
+ runtime => $self->{runtime},
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ );
+ $self->{fca_subsystem} = HP::Proliant::Component::DiskSubsystem::Fca->new(
+ runtime => $self->{runtime},
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ );
+}
+
+sub check {
+ my $self = shift;
+ $self->add_info('checking disk subsystem');
+ $self->{da_subsystem}->check();
+ $self->{sas_subsystem}->check();
+ $self->{scsi_subsystem}->check();
+ $self->{ide_subsystem}->check();
+ $self->{fca_subsystem}->check();
+ $self->disk_summary();
+}
+
+sub dump {
+ my $self = shift;
+ $self->{da_subsystem}->dump();
+ $self->{sas_subsystem}->dump();
+ $self->{scsi_subsystem}->dump();
+ $self->{ide_subsystem}->dump();
+ $self->{fca_subsystem}->dump();
+}
+
+sub disk_summary {
+ my $self = shift;
+ foreach my $subsys (qw(da sas scsi ide fca)) {
+ if (my $pd = $self->{$subsys.'_subsystem'}->has_physical_drives()) {
+ my $ld = $self->{$subsys.'_subsystem'}->has_logical_drives();
+ $self->add_summary(sprintf '%s: %d logical drives, %d physical drives',
+ $subsys, $ld, $pd);
+ }
+ }
+}
+
+sub assemble {
+ my $self = shift;
+ $self->trace(3, sprintf "%s controllers und platten zusammenfuehren",
+ ref($self));
+ $self->trace(3, sprintf "has %d controllers",
+ scalar(@{$self->{controllers}}));
+ $self->trace(3, sprintf "has %d accelerators",
+ scalar(@{$self->{accelerators}})) if exists $self->{accelerators};
+ $self->trace(3, sprintf "has %d enclosures",
+ scalar(@{$self->{enclosures}}));
+ $self->trace(3, sprintf "has %d physical_drives",
+ scalar(@{$self->{physical_drives}}));
+ $self->trace(3, sprintf "has %d logical_drives",
+ scalar(@{$self->{logical_drives}}));
+ $self->trace(3, sprintf "has %d spare_drives",
+ scalar(@{$self->{spare_drives}}));
+ my $found = {
+ accelerators => {},
+ enclosures => {},
+ logical_drives => {},
+ physical_drives => {},
+ spare_drives => {},
+ };
+ # found->{komponente}->{controllerindex} ist ein array
+ # von teilen, die zu einem controller gehoeren
+ foreach my $item (qw(accelerators enclosures logical_drives physical_drives spare_drives)) {
+ next if ($item eq "enclosures" && ! exists $self->{$item});
+ foreach (@{$self->{$item}}) {
+ $found->{item}->{$_->{controllerindex}} = []
+ unless exists $found->{$item}->{$_->{controllerindex}};
+ push(@{$found->{$item}->{$_->{controllerindex}}}, $_);
+ }
+ }
+ foreach my $item (qw(accelerators enclosures logical_drives physical_drives spare_drives)) {
+ foreach (@{$self->{controllers}}) {
+ if (exists $found->{$item}->{$_->{controllerindex}}) {
+ $_->{$item} = $found->{$item}->{$_->{controllerindex}};
+ delete $found->{$item}->{$_->{controllerindex}};
+ } else {
+ $_->{$item} = []; # z.b. ein leerer controller: physical_drives = []
+ }
+ }
+ }
+ # was jetzt noch in $found uebrig ist, gehoert zu keinem controller
+ # d.h. komponenten mit ungueltigen cnrtlindex wurden gefunden
+}
+
+sub has_controllers {
+ my $self = shift;
+ return scalar(@{$self->{controllers}});
+}
+
+sub has_accelerators {
+ my $self = shift;
+ return exists $self->{accelerators} ? scalar(@{$self->{accelerators}}) : 0;
+}
+
+sub has_physical_drives {
+ my $self = shift;
+ return scalar(@{$self->{physical_drives}});
+}
+
+sub has_logical_drives {
+ my $self = shift;
+ return scalar(@{$self->{logical_drives}});
+}
+
+sub has_enclosures {
+ my $self = shift;
+ return scalar(@{$self->{enclosures}});
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da.pm
new file mode 100755
index 0000000..5dbc5ef
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da.pm
@@ -0,0 +1,407 @@
+package HP::Proliant::Component::DiskSubsystem::Da;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ controllers => [],
+ accelerators => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ condition => undef,
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ if ($self->{method} eq 'snmp') {
+ bless $self, 'HP::Proliant::Component::DiskSubsystem::Da::SNMP';
+ } else {
+ bless $self, 'HP::Proliant::Component::DiskSubsystem::Da::CLI';
+ }
+ $self->init();
+ $self->assemble();
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ foreach (@{$self->{controllers}}) {
+ $_->check();
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{controllers}}) {
+ $_->dump();
+ }
+}
+
+package HP::Proliant::Component::DiskSubsystem::Da::Controller;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Da);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqDaCntlrIndex => $params{cpqDaCntlrIndex},
+ cpqDaCntlrSlot => $params{cpqDaCntlrSlot},
+ cpqDaCntlrModel => $params{cpqDaCntlrModel},
+ cpqDaCntlrCondition => $params{cpqDaCntlrCondition},
+ cpqDaCntlrBoardCondition => $params{cpqDaCntlrBoardCondition},
+ blacklisted => 0,
+ };
+ $self->{name} = $params{name} || $self->{cpqDaCntlrSlot};
+ $self->{controllerindex} = $self->{cpqDaCntlrIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+#$self->dumper($self);
+ $self->blacklist('daco', $self->{cpqDaCntlrIndex});
+ foreach (@{$self->{accelerators}}) {
+ $_->check();
+ }
+ foreach (@{$self->{enclosures}}) {
+ $_->check();
+ }
+ foreach (@{$self->{logical_drives}}) {
+ $_->check();
+ }
+ foreach (@{$self->{physical_drives}}) {
+ $_->check();
+ }
+ foreach (@{$self->{spare_drives}}) {
+ $_->check();
+ }
+ if ($self->{cpqDaCntlrCondition} eq 'other') {
+ if (scalar(@{$self->{physical_drives}})) {
+ $self->add_message(CRITICAL,
+ sprintf 'da controller %s in slot %s needs attention',
+ $self->{cpqDaCntlrIndex}, $self->{cpqDaCntlrSlot});
+ $self->add_info(sprintf 'da controller %s in slot %s needs attention',
+ $self->{cpqDaCntlrIndex}, $self->{cpqDaCntlrSlot});
+ } else {
+ $self->add_info(sprintf 'da controller %s in slot %s is ok and unused',
+ $self->{cpqDaCntlrIndex}, $self->{cpqDaCntlrSlot});
+ $self->{blacklisted} = 1;
+ }
+ } elsif ($self->{cpqDaCntlrCondition} eq 'degraded') {
+ # maybe only the battery has failed and is disabled, no problem
+ if (scalar(grep {
+ $_->has_failed() && $_->is_disabled()
+ } @{$self->{accelerators}})) {
+ # message was already written in the accel code
+ } else {
+ $self->add_message(CRITICAL,
+ sprintf 'da controller %s in slot %s needs attention',
+ $self->{cpqDaCntlrIndex}, $self->{cpqDaCntlrSlot});
+ $self->add_info(sprintf 'da controller %s in slot %s needs attention',
+ $self->{cpqDaCntlrIndex}, $self->{cpqDaCntlrSlot});
+ }
+ } elsif ($self->{cpqDaCntlrCondition} ne 'ok') {
+ $self->add_message(CRITICAL,
+ sprintf 'da controller %s in slot %s needs attention',
+ $self->{cpqDaCntlrIndex}, $self->{cpqDaCntlrSlot});
+ $self->add_info(sprintf 'da controller %s in slot %s needs attention',
+ $self->{cpqDaCntlrIndex}, $self->{cpqDaCntlrSlot});
+ } else {
+ $self->add_info(sprintf 'da controller %s in slot %s is ok',
+ $self->{cpqDaCntlrIndex}, $self->{cpqDaCntlrSlot});
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[DA_CONTROLLER_%s]\n", $self->{name};
+ foreach (qw(cpqDaCntlrSlot cpqDaCntlrIndex cpqDaCntlrCondition
+ cpqDaCntlrModel)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+ foreach (@{$self->{accelerators}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{enclosures}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{logical_drives}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{physical_drives}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{spare_drives}}) {
+ $_->dump();
+ }
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Da::Accelerator;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Da);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqDaAccelCntlrIndex => $params{cpqDaAccelCntlrIndex},
+ cpqDaAccelBattery => $params{cpqDaAccelBattery} || 'notPresent',
+ cpqDaAccelCondition => $params{cpqDaAccelCondition},
+ cpqDaAccelStatus => $params{cpqDaAccelStatus},
+ cpqDaAccelErrCode => $params{cpqDaAccelErrCode},
+ blacklisted => 0,
+ failed => 0,
+ };
+ $self->{controllerindex} = $self->{cpqDaAccelCntlrIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('daac', $self->{cpqDaAccelCntlrIndex});
+ $self->add_info(sprintf 'controller accelerator is %s',
+ $self->{cpqDaAccelCondition});
+ if ($self->{cpqDaAccelCondition} eq "failed" || $self->{cpqDaAccelCondition} eq "degraded") {
+ $self->add_message(CRITICAL, sprintf
+ "controller accelerator is %s (reason: %s) and needs attention",
+ $self->{cpqDaAccelCondition}, $self->{cpqDaAccelErrCode});
+ }
+ $self->blacklist('daacb', $self->{cpqDaAccelCntlrIndex});
+ $self->add_info(sprintf 'controller accelerator battery is %s',
+ $self->{cpqDaAccelBattery});
+ if ($self->{cpqDaAccelBattery} eq "notPresent") {
+ } elsif ($self->{cpqDaAccelBattery} eq "recharging") {
+ $self->add_message(WARNING, "controller accelerator battery recharging");
+ } elsif ($self->{cpqDaAccelBattery} eq "failed" &&
+ $self->{cpqDaAccelStatus} eq "tmpDisabled") {
+ $self->add_message(WARNING, "controller accelerator battery needs attention");
+ } elsif ($self->{cpqDaAccelBattery} ne "ok") {
+ # (other) failed degraded
+ $self->add_message(CRITICAL, "controller accelerator battery needs attention");
+ }
+}
+
+sub has_failed {
+ my $self = shift;
+ return $self->{cpqDaAccelStatus} =~ /Disabled/ ? 1 : 0;
+}
+
+sub is_disabled {
+ my $self = shift;
+ return $self->{cpqDaAccelStatus} =~ /Disabled/ ? 1 : 0;
+}
+
+sub dump {
+ my $self = shift;
+ printf "[ACCELERATOR]\n";
+ foreach (qw(cpqDaAccelCntlrIndex cpqDaAccelBattery
+ cpqDaAccelStatus cpqDaAccelCondition cpqDaAccelErrCode)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+package HP::Proliant::Component::DiskSubsystem::Da::Enclosure;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Da);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ name => $params{name},
+ cpqDaEnclCntlrIndex => $params{cpqDaEnclCntlrIndex},
+ cpqDaEnclIndex => $params{cpqDaEnclIndex},
+ cpqDaEnclPort => $params{cpqDaEnclPort},
+ cpqDaEnclBox => $params{cpqDaEnclBox},
+ cpqDaEnclCondition => $params{cpqDaEnclCondition},
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ $self->{name} = $params{name} ||
+ $self->{cpqDaEnclPort}.':'.$self->{cpqDaEnclBox}; ##vorerst
+ $self->{controllerindex} = $self->{cpqDaEnclCntlrIndex};
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('dae', $self->{name});
+ $self->add_info(
+ sprintf "disk enclosure %s is %s",
+ $self->{name}, $self->{cpqDaEnclCondition});
+ if ($self->{cpqDaEnclCondition} !~ /^OK/) {
+ $self->add_message(CRITICAL,
+ sprintf "disk enclosure %s is %s",
+ $self->{name}, $self->{cpqDaEnclCondition});
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[Disk Enclosure]\n";
+ foreach (qw(cpqDaEnclCntlrIndex cpqDaEnclIndex cpqDaEnclPort
+ cpqDaEnclBox cpqDaEnclCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+package HP::Proliant::Component::DiskSubsystem::Da::LogicalDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Da);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqDaLogDrvIndex => $params{cpqDaLogDrvIndex},
+ cpqDaLogDrvCntlrIndex => $params{cpqDaLogDrvCntlrIndex},
+ cpqDaLogDrvSize => $params{cpqDaLogDrvSize},
+ cpqDaLogDrvFaultTol => $params{cpqDaLogDrvFaultTol},
+ cpqDaLogDrvPercentRebuild => $params{cpqDaLogDrvPercentRebuild},
+ cpqDaLogDrvStatus => $params{cpqDaLogDrvStatus},
+ cpqDaLogDrvCondition => $params{cpqDaLogDrvCondition},
+ cpqDaLogDrvPhyDrvIDs => $params{cpqDaLogDrvPhyDrvIDs},
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ $self->{name} = $params{name} ||
+ $self->{cpqDaLogDrvCntlrIndex}.':'.$self->{cpqDaLogDrvIndex}; ##vorerst
+ $self->{controllerindex} = $self->{cpqDaLogDrvCntlrIndex};
+ if (! $self->{cpqDaLogDrvPercentRebuild} ||
+ $self->{cpqDaLogDrvPercentRebuild} == 4294967295) {
+ $self->{cpqDaLogDrvPercentRebuild} = 100;
+ }
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('dald', $self->{name});
+ $self->add_info(sprintf "logical drive %s is %s (%s)",
+ $self->{name}, $self->{cpqDaLogDrvStatus},
+ $self->{cpqDaLogDrvFaultTol});
+ if ($self->{cpqDaLogDrvCondition} ne "ok") {
+ if ($self->{cpqDaLogDrvStatus} =~
+ /rebuild|recovering|recovery|expanding|queued/) {
+ $self->add_message(WARNING,
+ sprintf "logical drive %s is %s",
+ $self->{name}, $self->{cpqDaLogDrvStatus});
+ } else {
+ $self->add_message(CRITICAL,
+ sprintf "logical drive %s is %s",
+ $self->{name}, $self->{cpqDaLogDrvStatus});
+ }
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[LOGICAL_DRIVE]\n";
+ foreach (qw(cpqDaLogDrvCntlrIndex cpqDaLogDrvIndex cpqDaLogDrvSize
+ cpqDaLogDrvFaultTol cpqDaLogDrvStatus cpqDaLogDrvCondition
+ cpqDaLogDrvPercentRebuild cpqDaLogDrvPhyDrvIDs)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Da::PhysicalDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Da);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ name => $params{name},
+ cpqDaPhyDrvCntlrIndex => $params{cpqDaPhyDrvCntlrIndex},
+ cpqDaPhyDrvIndex => $params{cpqDaPhyDrvIndex},
+ cpqDaPhyDrvBay => $params{cpqDaPhyDrvBay},
+ cpqDaPhyDrvBusNumber => $params{cpqDaPhyDrvBusNumber},
+ cpqDaPhyDrvSize => $params{cpqDaPhyDrvSize},
+ cpqDaPhyDrvStatus => $params{cpqDaPhyDrvStatus},
+ cpqDaPhyDrvCondition => $params{cpqDaPhyDrvCondition},
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ $self->{name} = $params{name} ||
+ $self->{cpqDaPhyDrvCntlrIndex}.':'.$self->{cpqDaPhyDrvIndex}; ##vorerst
+ $self->{controllerindex} = $self->{cpqDaPhyDrvCntlrIndex};
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('dapd', $self->{name});
+ $self->add_info(
+ sprintf "physical drive %s is %s",
+ $self->{name}, $self->{cpqDaPhyDrvCondition});
+ if ($self->{cpqDaPhyDrvCondition} ne 'ok') {
+ $self->add_message(CRITICAL,
+ sprintf "physical drive %s is %s",
+ $self->{name}, $self->{cpqDaPhyDrvCondition});
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[PHYSICAL_DRIVE]\n";
+ foreach (qw(cpqDaPhyDrvCntlrIndex cpqDaPhyDrvIndex cpqDaPhyDrvBay
+ cpqDaPhyDrvBusNumber cpqDaPhyDrvSize cpqDaPhyDrvStatus
+ cpqDaPhyDrvCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Da::SpareDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Da);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub dump {
+ my $self = shift;
+ printf "[SPARE_DRIVE]\n";
+ foreach (qw(cpqDaPhyDrvCntlrIndex cpqDaPhyDrvIndex cpqDaPhyDrvBay
+ cpqDaPhyDrvBusNumber cpqDaPhyDrvSize cpqDaPhyDrvStatus
+ cpqDaPhyDrvCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da/CLI.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da/CLI.pm
new file mode 100755
index 0000000..75d3181
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da/CLI.pm
@@ -0,0 +1,239 @@
+package HP::Proliant::Component::DiskSubsystem::Da::CLI;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Da);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ controllers => [],
+ accelerators => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my $hpacucli = $self->{rawdata};
+ my $slot = 0;
+ my $type = "unkn";
+ my @lines = ();
+ my $thistype = 0;
+ my $tmpcntl = {};
+ my $tmpaccel = {};
+ my $tmpld = {};
+ my $tmppd = {};
+ my $tmpencl = {};
+ my $cntlindex = 0;
+ my $enclosureindex = 0;
+ my $ldriveindex = 0;
+ my $pdriveindex = 0;
+ my $incontroller = 0;
+ foreach (split(/\n/, $hpacucli)) {
+ next unless /^status/;
+ next if /^status\s*$/;
+ s/^status\s*//;
+ if (/(MSA[\s\w]+)\s+in\s+(\w+)/) {
+ $incontroller = 1;
+ $slot = $2;
+ $cntlindex++;
+ $tmpcntl->{$slot}->{cpqDaCntlrIndex} = $cntlindex;
+ $tmpcntl->{$slot}->{cpqDaCntlrModel} = $1;
+ $tmpcntl->{$slot}->{cpqDaCntlrSlot} = $slot;
+ } elsif (/([\s\w]+) in Slot\s+(\d+)/) {
+ $incontroller = 1;
+ $slot = $2;
+ $cntlindex++;
+ $tmpcntl->{$slot}->{cpqDaCntlrIndex} = $cntlindex;
+ $tmpcntl->{$slot}->{cpqDaCntlrModel} = $1;
+ $tmpcntl->{$slot}->{cpqDaCntlrSlot} = $slot;
+ } elsif (/Controller Status: (\w+)/) {
+ $tmpcntl->{$slot}->{cpqDaCntlrBoardCondition} = lc $1;
+ $tmpcntl->{$slot}->{cpqDaCntlrCondition} = lc $1;
+ } elsif (/Cache Status: ([\w\s]+?)\s*$/) {
+ # Cache Status: OK
+ # Cache Status: Not Configured
+ # Cache Status: Temporarily Disabled
+ $tmpaccel->{$slot}->{cpqDaAccelCntlrIndex} = $cntlindex;
+ $tmpaccel->{$slot}->{cpqDaAccelSlot} = $slot;
+ #condition: other,ok,degraded,failed
+ #status: other,invalid,enabled,tmpDisabled,permDisabled
+ $tmpaccel->{$slot}->{cpqDaAccelCondition} = lc $1;
+ if ($tmpaccel->{$slot}->{cpqDaAccelCondition} eq 'ok') {
+ $tmpaccel->{$slot}->{cpqDaAccelStatus} = 'enabled';
+ } elsif ($tmpaccel->{$slot}->{cpqDaAccelCondition} eq 'not configured') {
+ $tmpaccel->{$slot}->{cpqDaAccelCondition} = 'ok';
+ $tmpaccel->{$slot}->{cpqDaAccelStatus} = 'enabled';
+ } elsif ($tmpaccel->{$slot}->{cpqDaAccelCondition} eq 'temporarily disabled') {
+ $tmpaccel->{$slot}->{cpqDaAccelCondition} = 'ok';
+ $tmpaccel->{$slot}->{cpqDaAccelStatus} = 'tmpDisabled';
+ } elsif ($tmpaccel->{$slot}->{cpqDaAccelCondition} eq 'permanently disabled') {
+ $tmpaccel->{$slot}->{cpqDaAccelCondition} = 'ok';
+ $tmpaccel->{$slot}->{cpqDaAccelStatus} = 'permDisabled';
+ } else {
+ $tmpaccel->{$slot}->{cpqDaAccelStatus} = 'enabled';
+ }
+ } elsif (/Battery.* Status: (\w+)/) {
+ # sowas gibts auch Battery/Capacitor Status: OK
+ $tmpaccel->{$slot}->{cpqDaAccelBattery} = lc $1;
+ } elsif (/^\s*$/) {
+ }
+ }
+ $slot = 0;
+ $cntlindex = 0;
+ $enclosureindex = 0;
+ $ldriveindex = 0;
+ $pdriveindex = 0;
+ foreach (split(/\n/, $hpacucli)) {
+ next unless /^config/;
+ next if /^config\s*$/;
+ s/^config\s*//;
+ if (/(MSA[\s\w]+)\s+in\s+(\w+)/) {
+ $slot = $2;
+ $cntlindex++;
+ $pdriveindex = 1;
+ } elsif (/([\s\w]+) in Slot\s+(\d+)/) {
+ #if ($slot ne $2 || ! $slot) {
+ $cntlindex++;
+ # 2012-12-15 das passt nicht zur oberen schleife
+ # ich habe keine ahnung, was der hintergrund fuer dieses if ist
+ #}
+ $slot = $2;
+ $pdriveindex = 1;
+ } elsif (/([\s\w]+) at Port ([\w]+), Box (\d+), (.*)/) {
+ $enclosureindex++;
+ $tmpencl->{$slot}->{$enclosureindex}->{cpqDaEnclCntlrIndex} = $cntlindex;
+ $tmpencl->{$slot}->{$enclosureindex}->{cpqDaEnclIndex} = $enclosureindex;
+ $tmpencl->{$slot}->{$enclosureindex}->{cpqDaEnclPort} = $2;
+ $tmpencl->{$slot}->{$enclosureindex}->{cpqDaEnclBox} = $3;
+ $tmpencl->{$slot}->{$enclosureindex}->{cpqDaEnclCondition} = $4;
+ $tmpencl->{$slot}->{$enclosureindex}->{cpqDaEnclStatus} =
+ $tmpencl->{$slot}->{$enclosureindex}->{cpqDaEnclCondition};
+ $tmpencl->{$slot}->{$enclosureindex}->{cpqDaLogDrvPhyDrvIDs} = 'unknown';
+ } elsif (/logicaldrive\s+(.+?)\s+\((.*)\)/) {
+ # logicaldrive 1 (683.5 GB, RAID 5, OK)
+ # logicaldrive 1 (683.5 GB, RAID 5, OK)
+ # logicaldrive 2 (442 MB, RAID 1+0, OK)
+ $ldriveindex = $1;
+ $tmpld->{$slot}->{$ldriveindex}->{cpqDaLogDrvCntlrIndex} = $cntlindex;
+ $tmpld->{$slot}->{$ldriveindex}->{cpqDaLogDrvIndex} = $ldriveindex;
+ ($tmpld->{$slot}->{$ldriveindex}->{cpqDaLogDrvSize},
+ $tmpld->{$slot}->{$ldriveindex}->{cpqDaLogDrvFaultTol},
+ $tmpld->{$slot}->{$ldriveindex}->{cpqDaLogDrvCondition}) =
+ map { lc $_ } split(/,\s*/, $2);
+ $tmpld->{$slot}->{$ldriveindex}->{cpqDaLogDrvStatus} =
+ $tmpld->{$slot}->{$ldriveindex}->{cpqDaLogDrvCondition};
+ $tmpld->{$slot}->{$ldriveindex}->{cpqDaLogDrvPhyDrvIDs} = 'unknown';
+ } elsif (/physicaldrive\s+(.+?)\s+\((.*)\)/) {
+ # physicaldrive 2:0 (port 2:id 0 , Parallel SCSI, 36.4 GB, OK)
+ # physicaldrive 2I:1:6 (port 2I:box 1:bay 6, SAS, 146 GB, OK)
+ # physicaldrive 1:1 (box 1:bay 1, Parallel SCSI, 146 GB, OK)
+ my $name = $1;
+ my($location, $type, $size, $status) = split(/,/, $2);
+ $status =~ s/^\s+//g;
+ $status =~ s/\s+$//g;
+ $status = lc $status;
+ my %location = ();
+ foreach (split(/:/, $location)) {
+ $location{$1} = $2 if /(\w+)\s+(\w+)/;
+ }
+ $location{box} ||= 0;
+ $location{id} ||= $pdriveindex;
+ $location{bay} ||= $location{id};
+ $location{port} ||= $location{bay};
+ $tmppd->{$slot}->{$name}->{name} = lc $name;
+ $tmppd->{$slot}->{$name}->{cpqDaPhyDrvCntlrIndex} = $cntlindex;
+ $tmppd->{$slot}->{$name}->{cpqDaPhyDrvIndex} = $location{id};
+ $tmppd->{$slot}->{$name}->{cpqDaPhyDrvBay} = $location{bay};
+ $tmppd->{$slot}->{$name}->{cpqDaPhyDrvBusNumber} = $location{port};
+ $tmppd->{$slot}->{$name}->{cpqDaPhyDrvSize} = $size;
+ $tmppd->{$slot}->{$name}->{cpqDaPhyDrvStatus} = $status;
+ $tmppd->{$slot}->{$name}->{cpqDaPhyDrvCondition} = $status;
+ $tmppd->{$slot}->{$name}->{ldriveindex} = $ldriveindex || -1;
+ foreach (keys %{$tmppd->{$slot}->{$name}}) {
+ $tmppd->{$slot}->{$name}->{$_} =~ s/^\s+//g;
+ $tmppd->{$slot}->{$name}->{$_} =~ s/\s+$//g;
+ $tmppd->{$slot}->{$name}->{$_} = lc $tmppd->{$slot}->{$name}->{$_};
+ }
+ $pdriveindex++;
+ }
+ }
+
+ foreach my $slot (keys %{$tmpcntl}) {
+ if (exists $tmpcntl->{$slot}->{cpqDaCntlrModel} &&
+ ! $self->identified($tmpcntl->{$slot}->{cpqDaCntlrModel})) {
+ delete $tmpcntl->{$slot};
+ delete $tmpaccel->{$slot};
+ delete $tmpencl->{$slot};
+ delete $tmpld->{$slot};
+ delete $tmppd->{$slot};
+ }
+ }
+
+#printf "%s\n", Data::Dumper::Dumper($tmpcntl);
+#printf "%s\n", Data::Dumper::Dumper($tmpaccel);
+#printf "%s\n", Data::Dumper::Dumper($tmpld);
+#printf "%s\n", Data::Dumper::Dumper($tmppd);
+ foreach my $slot (sort {
+ $tmpcntl->{$a}->{cpqDaCntlrIndex} <=> $tmpcntl->{$b}->{cpqDaCntlrIndex}
+ }keys %{$tmpcntl}) {
+ $tmpcntl->{$slot}->{runtime} = $self->{runtime};
+ push(@{$self->{controllers}},
+ HP::Proliant::Component::DiskSubsystem::Da::Controller->new(
+ %{$tmpcntl->{$slot}}));
+ }
+ foreach my $slot (sort {
+ $tmpaccel->{$a}->{cpqDaAccelCntlrIndex} <=> $tmpaccel->{$b}->{cpqDaAccelCntlrIndex}
+ } keys %{$tmpaccel}) {
+ $tmpaccel->{$slot}->{runtime} = $self->{runtime};
+ push(@{$self->{accelerators}},
+ HP::Proliant::Component::DiskSubsystem::Da::Accelerator->new(
+ %{$tmpaccel->{$slot}}));
+ }
+ foreach my $slot (keys %{$tmpencl}) {
+ foreach my $enclosureindex (keys %{$tmpencl->{$slot}}) {
+ $tmpencl->{$slot}->{$enclosureindex}->{runtime} = $self->{runtime};
+ push(@{$self->{enclosures}},
+ HP::Proliant::Component::DiskSubsystem::Da::Enclosure->new(
+ %{$tmpencl->{$slot}->{$enclosureindex}}));
+ }
+ }
+ foreach my $slot (keys %{$tmpld}) {
+ foreach my $ldriveindex (keys %{$tmpld->{$slot}}) {
+ $tmpld->{$slot}->{$ldriveindex}->{runtime} = $self->{runtime};
+ push(@{$self->{logical_drives}},
+ HP::Proliant::Component::DiskSubsystem::Da::LogicalDrive->new(
+ %{$tmpld->{$slot}->{$ldriveindex}}));
+ }
+ foreach my $pdriveindex (sort {
+ (split ':', $a, 2)[0] cmp (split ':', $b, 2)[0] ||
+ (split ':', $a, 2)[1] cmp (split ':', $b, 2)[1] ||
+ (split ':', $a, 2)[2] <=> (split ':', $b, 2)[2]
+ } keys %{$tmppd->{$slot}}) {
+ $tmppd->{$slot}->{$pdriveindex}->{runtime} = $self->{runtime};
+ push(@{$self->{physical_drives}},
+ HP::Proliant::Component::DiskSubsystem::Da::PhysicalDrive->new(
+ %{$tmppd->{$slot}->{$pdriveindex}}));
+ }
+ }
+}
+
+sub identified {
+ my $self = shift;
+ my $info = shift;
+ return 1 if $info =~ /Parallel SCSI/;
+ return 1 if $info =~ /Smart Array/; # Trond: works fine on E200i, P400, E400
+ return 1 if $info =~ /MSA500/;
+ #return 1 if $info =~ /Smart Array (5|6)/;
+ #return 1 if $info =~ /Smart Array P400i/; # snmp sagt Da, trotz SAS in cli
+ #return 1 if $info =~ /Smart Array P410i/; # dto
+ return 0;
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da/SNMP.pm
new file mode 100755
index 0000000..629fe29
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Da/SNMP.pm
@@ -0,0 +1,232 @@
+package HP::Proliant::Component::DiskSubsystem::Da::SNMP;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Da
+ HP::Proliant::Component::SNMP);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ controllers => [],
+ accelerators => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+
+ # CPQIDA-MIB
+ my $oids = {
+ cpqDaCntlrEntry => "1.3.6.1.4.1.232.3.2.2.1.1",
+ cpqDaCntlrIndex => "1.3.6.1.4.1.232.3.2.2.1.1.1",
+ cpqDaCntlrModel => "1.3.6.1.4.1.232.3.2.2.1.1.2",
+ cpqDaCntlrSlot => "1.3.6.1.4.1.232.3.2.2.1.1.5",
+ cpqDaCntlrCondition => "1.3.6.1.4.1.232.3.2.2.1.1.6",
+ cpqDaCntlrBoardCondition => "1.3.6.1.4.1.232.3.2.2.1.1.12",
+ cpqDaCntlrModelValue => {
+ 1 => 'other',
+ 2 => 'ida',
+ 3 => 'idaExpansion',
+ 4 => 'ida-2',
+ 5 => 'smart',
+ 6 => 'smart-2e',
+ 7 => 'smart-2p',
+ 8 => 'smart-2sl',
+ 9 => 'smart-3100es',
+ 10 => 'smart-3200',
+ 11 => 'smart-2dh',
+ 12 => 'smart-221',
+ 13 => 'sa-4250es',
+ 14 => 'sa-4200',
+ 15 => 'sa-integrated',
+ 16 => 'sa-431',
+ 17 => 'sa-5300',
+ 18 => 'raidLc2',
+ 19 => 'sa-5i',
+ 20 => 'sa-532',
+ 21 => 'sa-5312',
+ 22 => 'sa-641',
+ 23 => 'sa-642',
+ 24 => 'sa-6400',
+ 25 => 'sa-6400em',
+ 26 => 'sa-6i',
+ },
+ cpqDaCntlrConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqDaCntlrBoardConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ };
+
+ # INDEX { cpqDaCntlrIndex }
+ foreach ($self->get_entries($oids, 'cpqDaCntlrEntry')) {
+ push(@{$self->{controllers}},
+ HP::Proliant::Component::DiskSubsystem::Da::Controller->new(%{$_}));
+ }
+
+ $oids = {
+ cpqDaAccelEntry => "1.3.6.1.4.1.232.3.2.2.2.1",
+ cpqDaAccelCntlrIndex => "1.3.6.1.4.1.232.3.2.2.2.1.1",
+ cpqDaAccelStatus => "1.3.6.1.4.1.232.3.2.2.2.1.2",
+ cpqDaAccelErrCode => "1.3.6.1.4.1.232.3.2.2.2.1.5",
+ cpqDaAccelBattery => "1.3.6.1.4.1.232.3.2.2.2.1.6",
+ cpqDaAccelCondition => "1.3.6.1.4.1.232.3.2.2.2.1.9",
+ cpqDaAccelBatteryValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'recharging',
+ 4 => 'failed',
+ 5 => 'degraded',
+ 6 => 'notPresent',
+ },
+ cpqDaAccelConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqDaAccelStatusValue => {
+ 1 => "other",
+ 2 => "invalid",
+ 3 => "enabled",
+ 4 => "tmpDisabled",
+ 5 => "permDisabled",
+ },
+ cpqDaAccelErrCodeValue => {
+ 1 => 'other',
+ 2 => 'invalid',
+ 3 => 'badConfig',
+ 4 => 'lowBattery',
+ 5 => 'disableCmd',
+ 6 => 'noResources',
+ 7 => 'notConnected',
+ 8 => 'badMirrorData',
+ 9 => 'readErr',
+ 10 => 'writeErr',
+ 11 => 'configCmd',
+ 12 => 'expandInProgress',
+ 13 => 'snapshotInProgress',
+ 14 => 'redundantLowBattery',
+ 15 => 'redundantSizeMismatch',
+ 16 => 'redundantCacheFailure',
+ 17 => 'excessiveEccErrors',
+ 18 => 'adgEnablerMissing',
+ 19 => 'postEccErrors',
+ 20 => 'batteryHotRemoved',
+ 21 => 'capacitorChargeLow',
+ 22 => 'notEnoughBatteries',
+ 23 => 'cacheModuleNotSupported',
+ 24 => 'batteryNotSupported',
+ 25 => 'noCapacitorAttached',
+ 26 => 'capBasedBackupFailed',
+ 27 => 'capBasedRestoreFailed',
+ 28 => 'capBasedModuleHWFailure',
+ 29 => 'capacitorFailedToCharge',
+ 30 => 'capacitorBasedHWMemBeingErased',
+ 31 => 'incompatibleCacheModule',
+ 32 => 'fbcmChargerCircuitFailure',
+ },
+ };
+
+ # INDEX { cpqDaAccelCntlrIndex }
+ foreach ($self->get_entries($oids, 'cpqDaAccelEntry')) {
+ push(@{$self->{accelerators}},
+ HP::Proliant::Component::DiskSubsystem::Da::Accelerator->new(%{$_}));
+ }
+
+ $oids = {
+ cpqDaLogDrvEntry => "1.3.6.1.4.1.232.3.2.3.1.1",
+ cpqDaLogDrvCntlrIndex => "1.3.6.1.4.1.232.3.2.3.1.1.1",
+ cpqDaLogDrvIndex => "1.3.6.1.4.1.232.3.2.3.1.1.2",
+ cpqDaLogDrvFaultTol => "1.3.6.1.4.1.232.3.2.3.1.1.3",
+ cpqDaLogDrvStatus => "1.3.6.1.4.1.232.3.2.3.1.1.4",
+ cpqDaLogDrvSize => "1.3.6.1.4.1.232.3.2.3.1.1.9",
+ cpqDaLogDrvPhyDrvIDs => "1.3.6.1.4.1.232.3.2.3.1.1.10",
+ cpqDaLogDrvCondition => "1.3.6.1.4.1.232.3.2.3.1.1.11",
+ cpqDaLogDrvPercentRebuild => "1.3.6.1.4.1.232.3.2.3.1.1.12",
+ cpqDaLogDrvFaultTolValue => {
+ 1 => "other",
+ 2 => "none",
+ 3 => "mirroring",
+ 4 => "dataGuard",
+ 5 => "distribDataGuard",
+ 7 => "advancedDataGuard",
+ },
+ cpqDaLogDrvConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqDaLogDrvStatusValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "failed",
+ 4 => "unconfigured",
+ 5 => "recovering",
+ 6 => "readyForRebuild",
+ 7 => "rebuilding",
+ 8 => "wrongDrive",
+ 9 => "badConnect",
+ 10 => "overheating",
+ 11 => "shutdown",
+ 12 => "expanding",
+ 13 => "notAvailable",
+ 14 => "queuedForExpansion",
+ },
+ };
+
+ # INDEX { cpqDaLogDrvCntlrIndex, cpqDaLogDrvIndex }
+ foreach ($self->get_entries($oids, 'cpqDaLogDrvEntry')) {
+ $_->{cpqDaLogDrvPhyDrvIDs} ||= 'empty';
+ push(@{$self->{logical_drives}},
+ HP::Proliant::Component::DiskSubsystem::Da::LogicalDrive->new(%{$_}));
+ }
+
+ $oids = {
+ cpqDaPhyDrvEntry => "1.3.6.1.4.1.232.3.2.5.1.1",
+ cpqDaPhyDrvCntlrIndex => "1.3.6.1.4.1.232.3.2.5.1.1.1",
+ cpqDaPhyDrvIndex => "1.3.6.1.4.1.232.3.2.5.1.1.2",
+ cpqDaPhyDrvBay => "1.3.6.1.4.1.232.3.2.5.1.1.5",
+ cpqDaPhyDrvStatus => "1.3.6.1.4.1.232.3.2.5.1.1.6",
+ cpqDaPhyDrvSize => "1.3.6.1.4.1.232.3.2.5.1.1.9",
+ cpqDaPhyDrvCondition => "1.3.6.1.4.1.232.3.2.5.1.1.37",
+ cpqDaPhyDrvBusNumber => "1.3.6.1.4.1.232.3.2.5.1.1.50",
+ cpqDaPhyDrvConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqDaPhyDrvStatusValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "failed",
+ 4 => "predictiveFailure",
+ },
+ };
+
+ # INDEX { cpqDaPhyDrvCntlrIndex, cpqDaPhyDrvIndex }
+ foreach ($self->get_entries($oids, 'cpqDaPhyDrvEntry')) {
+ push(@{$self->{physical_drives}},
+ HP::Proliant::Component::DiskSubsystem::Da::PhysicalDrive->new(%{$_}));
+ }
+
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca.pm
new file mode 100755
index 0000000..2014697
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca.pm
@@ -0,0 +1,433 @@
+package HP::Proliant::Component::DiskSubsystem::Fca;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ host_controllers => [],
+ controllers => [],
+ accelerators => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ global_status => undef,
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ if ($self->{method} eq 'snmp') {
+ bless $self, 'HP::Proliant::Component::DiskSubsystem::Fca::SNMP';
+ } else {
+ bless $self, 'HP::Proliant::Component::DiskSubsystem::Fca::CLI';
+ }
+ $self->init();
+ $self->assemble();
+ return $self;
+}
+
+sub assemble {
+ my $self = shift;
+ $self->trace(3, sprintf "%s controllers und platten zusammenfuehren",
+ ref($self));
+ $self->trace(3, sprintf "has %d host controllers",
+ scalar(@{$self->{host_controllers}}));
+ $self->trace(3, sprintf "has %d controllers",
+ scalar(@{$self->{controllers}}));
+ $self->trace(3, sprintf "has %d physical_drives",
+ scalar(@{$self->{physical_drives}}));
+ $self->trace(3, sprintf "has %d logical_drives",
+ scalar(@{$self->{logical_drives}}));
+ $self->trace(3, sprintf "has %d spare_drives",
+ scalar(@{$self->{spare_drives}}));
+}
+
+sub check {
+ my $self = shift;
+ foreach (@{$self->{host_controllers}}) {
+ $_->check();
+ }
+ foreach (@{$self->{controllers}}) {
+ $_->check();
+ }
+ foreach (@{$self->{accelerators}}) {
+ $_->check();
+ }
+ foreach (@{$self->{logical_drives}}) {
+ $_->check();
+ }
+ foreach (@{$self->{physical_drives}}) {
+ $_->check();
+ }
+ # wozu eigentlich?
+ #if (! $self->has_controllers()) {
+ #$self->{global_status}->check();
+ #}
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{host_controllers}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{controllers}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{accelerators}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{logical_drives}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{physical_drives}}) {
+ $_->dump();
+ }
+ #$self->{global_status}->dump();
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Fca::GlobalStatus;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqFcaMibCondition => $params{cpqFcaMibCondition},
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ if ($self->{cpqFcaMibCondition} eq 'other') {
+ $self->add_message(OK,
+ sprintf 'fcal overall condition is other, update your drivers, please');
+ } elsif ($self->{cpqFcaMibCondition} ne 'ok') {
+ $self->add_message(CRITICAL,
+ sprintf 'fcal overall condition is %s', $self->{cpqFcaMibCondition});
+ }
+ $self->{info} =
+ sprintf 'fcal overall condition is %s', $self->{cpqFcaMibCondition};
+}
+
+sub dump {
+ my $self = shift;
+ printf "[FCAL]\n";
+ foreach (qw(cpqFcaMibCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Fca::HostController;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqFcaHostCntlr/, keys %params;
+ $self->{name} = $params{name} || $self->{cpqFcaHostCntlrIndex};
+ $self->{controllerindex} = $self->{cpqFcaHostCntlrIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('fcahc', $self->{name});
+ my $info = sprintf 'fcal host controller %s in slot %s is %s',
+ $self->{name}, $self->{cpqFcaHostCntlrSlot}, $self->{cpqFcaHostCntlrCondition};
+ if ($self->{cpqFcaHostCntlrCondition} eq 'other') {
+ #$info .= sprintf ' and needs attention (%s)', $self->{cpqFcaHostCntlrStatus};
+ # let's assume other=ok
+ $self->add_message(OK, $info);
+ $self->add_info($info);
+ } elsif ($self->{cpqFcaHostCntlrCondition} ne 'ok') {
+ $self->add_message(CRITICAL, $info);
+ $self->add_info($info);
+ } else {
+ $self->add_info($info);
+ }
+ $self->blacklist('fcahco', $self->{name});
+ $info = sprintf 'fcal host controller %s overall condition is %s',
+ $self->{name}, $self->{cpqFcaHostCntlrOverallCondition};
+ if ($self->{cpqFcaHostCntlrOverallCondition} eq 'other') {
+ $self->add_message(OK, $info);
+ } elsif ($self->{cpqFcaHostCntlrOverallCondition} ne 'ok') {
+ $self->add_message(WARNING, $info);
+ }
+ $self->add_info($info);
+}
+
+sub dump {
+ my $self = shift;
+ printf "[FCAL_HOST_CONTROLLER_%s]\n", $self->{name};
+ foreach (qw(cpqFcaHostCntlrIndex cpqFcaHostCntlrSlot
+ cpqFcaHostCntlrModel cpqFcaHostCntlrStatus cpqFcaHostCntlrCondition
+ cpqFcaHostCntlrOverallCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Fca::Controller;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqFcaCntlr/, keys %params;
+ $self->{name} = $params{name} ||
+ $self->{cpqFcaCntlrBoxIndex}.':'.$self->{cpqFcaCntlrBoxIoSlot};
+ $self->{controllerindex} = $self->{cpqFcaCntlrBoxIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('fcaco', $self->{name});
+ my $info = sprintf 'fcal controller %s in box %s/slot %s is %s',
+ $self->{name}, $self->{cpqFcaCntlrBoxIndex}, $self->{cpqFcaCntlrBoxIoSlot},
+ $self->{cpqFcaCntlrCondition};
+ if ($self->{cpqFcaCntlrCondition} eq 'other') {
+ if (1) { # was ist mit phys. drives?
+ $info .= ' needs attention';
+ $info .= sprintf(' (%s)', $self->{cpqFcaCntlrStatus}) unless $self->{cpqFcaCntlrStatus} eq 'ok';
+ $self->add_message(CRITICAL, $info);
+ $self->add_info($info);
+ } else {
+ $self->add_info($info);
+ $self->{blacklisted} = 1;
+ }
+ } elsif ($self->{cpqFcaCntlrCondition} ne 'ok') {
+ $info .= ' needs attention';
+ $info .= sprintf(' (%s)', $self->{cpqFcaCntlrStatus}) unless $self->{cpqFcaCntlrStatus} eq 'ok';
+ $self->add_message(CRITICAL, $info);
+ $self->add_info($info);
+ } else {
+ $self->add_info($info);
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[FCAL_CONTROLLER_%s]\n", $self->{name};
+ foreach (qw(cpqFcaCntlrBoxIndex cpqFcaCntlrBoxIoSlot cpqFcaCntlrModel
+ cpqFcaCntlrStatus cpqFcaCntlrCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Fca::Accelerator;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqFcaAccel/, keys %params;
+ $self->{name} = $params{name} ||
+ $self->{cpqFcaAccelBoxIndex}.':'.$self->{cpqFcaAccelBoxIoSlot};
+ $self->{controllerindex} = $self->{cpqFcaAccelBoxIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ # !!! cpqFcaAccelStatus
+ $self->blacklist('fcaac', $self->{name});
+ my $info = sprintf 'fcal accelerator %s in box %s/slot %s is ',
+ $self->{name}, $self->{cpqFcaAccelBoxIndex}, $self->{cpqFcaAccelBoxIoSlot};
+ if ($self->{cpqFcaAccelStatus} eq 'invalid') {
+ $info .= 'not installed';
+ $self->add_info($info);
+ } elsif ($self->{cpqFcaAccelStatus} eq 'tmpDisabled') {
+ $info .= 'temp disabled';
+ $self->add_info($info);
+ } elsif ($self->{cpqFcaAccelCondition} eq 'other') {
+ $info .= sprintf '%s and needs attention (%s)',
+ $self->{cpqFcaAccelCondition}, $self->{cpqFcaAccelErrCode};
+ $self->add_message(CRITICAL, $info);
+ $self->add_info($info);
+ } elsif ($self->{cpqFcaAccelCondition} ne 'ok') {
+ $info .= sprintf '%s and needs attention (%s)',
+ $self->{cpqFcaAccelCondition}, $self->{cpqFcaAccelErrCode};
+ $self->add_message(CRITICAL, $info);
+ $self->add_info($info);
+ } else {
+ $info .= sprintf '%s', $self->{cpqFcaAccelCondition};
+ $self->add_info($info);
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[FCAL_ACCELERATOR_%s]\n", $self->{name};
+ foreach (qw(cpqFcaAccelBoxIndex cpqFcaAccelBoxIoSlot cpqFcaAccelStatus
+ cpqFcaAccelErrCode cpqFcaAccelBatteryStatus cpqFcaAccelCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Fca::LogicalDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqFcaLogDrv/, keys %params;
+ bless $self, $class;
+ $self->{name} = $params{name} ||
+ $self->{cpqFcaLogDrvBoxIndex}.':'.
+ $self->{cpqFcaLogDrvIndex};
+ $self->{controllerindex} = $self->{cpqFcaLogDrvBoxIndex};
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('fcald', $self->{name});
+ my $info = sprintf 'logical drive %s (%s) is %s',
+ $self->{name}, $self->{cpqFcaLogDrvFaultTol}, $self->{cpqFcaLogDrvCondition};
+ if ($self->{cpqFcaLogDrvCondition} ne "ok") {
+ $info .= sprintf ' (%s)', $self->{cpqFcaLogDrvStatus};
+ if ($self->{cpqFcaLogDrvStatus} =~
+ /rebuild|recovering|expand/) {
+ $info .= sprintf ' (%s)', $self->{cpqFcaLogDrvStatus};
+ $self->add_message(WARNING, $info);
+ } else {
+ $self->add_message(CRITICAL, $info);
+ }
+ }
+ $self->add_info($info);
+}
+
+sub dump {
+ my $self = shift;
+ printf "[LOGICAL_DRIVE_%s]\n", $self->{name};
+ foreach (qw(cpqFcaLogDrvBoxIndex cpqFcaLogDrvIndex cpqFcaLogDrvFaultTol
+ cpqFcaLogDrvStatus cpqFcaLogDrvPercentRebuild cpqFcaLogDrvSize
+ cpqFcaLogDrvPhyDrvIDs cpqFcaLogDrvCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Fca::PhysicalDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqFcaPhyDrv/, keys %params;
+ $self->{name} = $params{name} ||
+ $self->{cpqFcaPhyDrvBoxIndex}.':'.$self->{cpqFcaPhyDrvIndex}; ####vorerst
+ $self->{controllerindex} = $self->{cpqScsiPhyDrvCntlrIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('fcapd', $self->{name});
+ my $info = sprintf "physical drive %s is %s",
+ $self->{name}, $self->{cpqFcaPhyDrvStatus};
+ if ($self->{cpqFcaPhyDrvStatus} eq 'unconfigured') {
+ # not part of a logical drive
+ # condition will surely be other
+ } elsif ($self->{cpqFcaPhyDrvCondition} ne 'ok') {
+ $self->add_message(CRITICAL, $info);
+ }
+ $self->add_info($info);
+}
+
+sub dump {
+ my $self = shift;
+ printf "[PHYSICAL_DRIVE_%s]\n", $self->{name};
+ foreach (qw(cpqFcaPhyDrvBoxIndex cpqFcaPhyDrvIndex cpqFcaPhyDrvModel
+ cpqFcaPhyDrvBay cpqFcaPhyDrvStatus cpqFcaPhyDrvCondition
+ cpqFcaPhyDrvSize cpqFcaPhyDrvBusNumber)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Fca::SpareDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub dump {
+ my $self = shift;
+ printf "[SPARE_DRIVE]\n";
+}
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca/CLI.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca/CLI.pm
new file mode 100755
index 0000000..fd11dbc
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca/CLI.pm
@@ -0,0 +1,34 @@
+package HP::Proliant::Component::DiskSubsystem::Fca::CLI;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ controllers => [],
+ accelerators => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ # .....
+ $self->{global_status} =
+ HP::Proliant::Component::DiskSubsystem::Fca::GlobalStatus->new(
+ runtime => $self->{runtime},
+ cpqFcaMibCondition => 'n/a',
+ );
+
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca/SNMP.pm
new file mode 100755
index 0000000..fc603e5
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Fca/SNMP.pm
@@ -0,0 +1,303 @@
+package HP::Proliant::Component::DiskSubsystem::Fca::SNMP;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Fca
+ HP::Proliant::Component::SNMP);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ controllers => [],
+ accelerators => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+
+ # CPQFCA-MIB
+ my $oids = {
+ cpqFcaHostCntlrEntry => '1.3.6.1.4.1.232.16.2.7.1.1',
+ cpqFcaHostCntlrIndex => '1.3.6.1.4.1.232.16.2.7.1.1.1',
+ cpqFcaHostCntlrSlot => '1.3.6.1.4.1.232.16.2.7.1.1.2',
+ cpqFcaHostCntlrModel => '1.3.6.1.4.1.232.16.2.7.1.1.3',
+ cpqFcaHostCntlrStatus => '1.3.6.1.4.1.232.16.2.7.1.1.4',
+ cpqFcaHostCntlrCondition => '1.3.6.1.4.1.232.16.2.7.1.1.5',
+ cpqFcaHostCntlrOverallCondition => '1.3.6.1.4.1.232.16.2.7.1.1.8',
+ cpqFcaHostCntlrModelValue => {
+ 1 => "other",
+ # You may need to upgrade your driver software and\or instrument
+ # agent(s). You have a drive array controller in the system
+ # that the instrument agent does not recognize. (other according to CPQFCAL-MIB)
+ 2 => "fchc-p",
+ 3 => "fchc-e",
+ 4 => "fchc64",
+ 5 => "sa-sam",
+ 6 => "fca-2101",
+ 7 => "sw64-33",
+ 8 => "fca-221x",
+ 9 => "dpfcmc",
+ 10 => 'fca-2404',
+ 11 => 'fca-2214',
+ 12 => 'a7298a',
+ 13 => 'fca-2214dc',
+ 14 => 'a6826a',
+ 15 => 'fcmcG3',
+ 16 => 'fcmcG4',
+ 17 => 'ab46xa',
+ 18 => 'fc-generic',
+ 19 => 'fca-1143',
+ 20 => 'fca-1243',
+ 21 => 'fca-2143',
+ 22 => 'fca-2243',
+ 23 => 'fca-1050',
+ 24 => 'fca-lpe1105',
+ 25 => 'fca-qmh2462',
+ 26 => 'fca-1142sr',
+ 27 => 'fca-1242sr',
+ 28 => 'fca-2142sr',
+ 29 => 'fca-2242sr',
+ 30 => 'fcmc20pe',
+ 31 => 'fca-81q',
+ 32 => 'fca-82q',
+ 33 => 'fca-qmh2562',
+ 34 => 'fca-81e',
+ 35 => 'fca-82e',
+ 36 => 'fca-1205',
+ },
+ cpqFcaHostCntlrStatusValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "failed",
+ 4 => "shutdown",
+ 5 => "loopDegraded",
+ 6 => "loopFailed",
+ 7 => "notConnected",
+ },
+ cpqFcaHostCntlrConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqFcaHostCntlrOverallConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ }, # cntrl + alle associated storage boxes
+ };
+
+ # INDEX { cpqFcaHostCntlrIndex }
+ foreach ($self->get_entries($oids, 'cpqFcaHostCntlrEntry')) {
+ push(@{$self->{host_controllers}},
+ HP::Proliant::Component::DiskSubsystem::Fca::HostController->new(%{$_}));
+ }
+
+ $oids = {
+ cpqFcaCntlrEntry => '1.3.6.1.4.1.232.16.2.2.1.1',
+ cpqFcaCntlrBoxIndex => '1.3.6.1.4.1.232.16.2.2.1.1.1',
+ cpqFcaCntlrBoxIoSlot => '1.3.6.1.4.1.232.16.2.2.1.1.2',
+ cpqFcaCntlrModel => '1.3.6.1.4.1.232.16.2.2.1.1.3',
+ cpqFcaCntlrStatus => '1.3.6.1.4.1.232.16.2.2.1.1.5',
+ cpqFcaCntlrCondition => '1.3.6.1.4.1.232.16.2.2.1.1.6',
+ cpqFcaCntlrModelValue => {
+ 1 => "other",
+ 2 => "fibreArray",
+ 3 => "msa1000",
+ 4 => "smartArrayClusterStorage",
+ 5 => "hsg80",
+ 6 => "hsv110",
+ 7 => "msa500g2",
+ 8 => "msa20",
+ 8 => "msa1510i",
+ },
+ cpqFcaCntlrStatusValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "failed",
+ 4 => "offline",
+ 5 => "redundantPathOffline",
+ 6 => "notConnected",
+ },
+ cpqFcaCntlrConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ };
+
+ # INDEX { cpqFcaCntlrBoxIndex, cpqFcaCntlrBoxIoSlot }
+ foreach ($self->get_entries($oids, 'cpqFcaCntlrEntry')) {
+ push(@{$self->{controllers}},
+ HP::Proliant::Component::DiskSubsystem::Fca::Controller->new(%{$_}));
+ }
+
+ $oids = {
+ cpqFcaAccelEntry => '1.3.6.1.4.1.232.16.2.2.2.1',
+ cpqFcaAccelBoxIndex => '1.3.6.1.4.1.232.16.2.2.2.1.1',
+ cpqFcaAccelBoxIoSlot => '1.3.6.1.4.1.232.16.2.2.2.1.2',
+ cpqFcaAccelStatus => '1.3.6.1.4.1.232.16.2.2.2.1.3',
+ cpqFcaAccelErrCode => '1.3.6.1.4.1.232.16.2.2.2.1.5',
+ cpqFcaAccelBatteryStatus => '1.3.6.1.4.1.232.16.2.2.2.1.6',
+ cpqFcaAccelCondition => '1.3.6.1.4.1.232.16.2.2.2.1.9',
+ cpqFcaAccelStatusValue => {
+ 1 => "other",
+ 2 => "invalid",
+ 3 => "enabled",
+ 4 => "tmpDisabled",
+ 5 => "permDisabled",
+ },
+ cpqFcaAccelErrCodeValue => {
+ 1 => 'other',
+ 2 => 'invalid',
+ 3 => 'badConfig',
+ 4 => 'lowBattery',
+ 5 => 'disableCmd',
+ 6 => 'noResources',
+ 7 => 'notConnected',
+ 8 => 'badMirrorData',
+ 9 => 'readErr',
+ 10 => 'writeErr',
+ 11 => 'configCmd',
+ 12 => 'expandInProgress',
+ 13 => 'snapshotInProgress',
+ 14 => 'redundantLowBattery',
+ 15 => 'redundantSizeMismatch',
+ 16 => 'redundantCacheFailure',
+ 17 => 'excessiveEccErrors',
+ 19 => 'postEccErrors',
+ },
+ cpqFcaAccelBatteryStatusValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'recharging',
+ 4 => 'failed',
+ 5 => 'degraded',
+ 6 => 'notPresent',
+ },
+ cpqFcaAccelConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ };
+
+ # INDEX { cpqFcaAccelBoxIndex, cpqFcaAccelBoxIoSlot }
+ foreach ($self->get_entries($oids, 'cpqFcaAccelEntry')) {
+ push(@{$self->{accelerators}},
+ HP::Proliant::Component::DiskSubsystem::Fca::Accelerator->new(%{$_}));
+ }
+
+ $oids = {
+ cpqFcaLogDrvEntry => '1.3.6.1.4.1.232.16.2.3.1.1',
+ cpqFcaLogDrvBoxIndex => '1.3.6.1.4.1.232.16.2.3.1.1.1',
+ cpqFcaLogDrvIndex => '1.3.6.1.4.1.232.16.2.3.1.1.2',
+ cpqFcaLogDrvFaultTol => '1.3.6.1.4.1.232.16.2.3.1.1.3',
+ cpqFcaLogDrvStatus => '1.3.6.1.4.1.232.16.2.3.1.1.4',
+ cpqFcaLogDrvPercentRebuild => '1.3.6.1.4.1.232.16.2.3.1.1.6',
+ cpqFcaLogDrvSize => '1.3.6.1.4.1.232.16.2.3.1.1.9',
+ cpqFcaLogDrvPhyDrvIDs => '1.3.6.1.4.1.232.16.2.3.1.1.10',
+ cpqFcaLogDrvCondition => '1.3.6.1.4.1.232.16.2.3.1.1.11',
+ cpqFcaLogDrvFaultTolValue => {
+ 1 => 'other',
+ 2 => 'none',
+ 3 => 'mirroring',
+ 4 => 'dataGuard',
+ 5 => 'distribDataGuard',
+ 7 => 'advancedDataGuard',
+ },
+ cpqFcaLogDrvStatusValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'failed',
+ 4 => 'unconfigured',
+ 5 => 'recovering',
+ 6 => 'readyForRebuild',
+ 7 => 'rebuilding',
+ 8 => 'wrongDrive',
+ 9 => 'badConnect',
+ 10 => 'overheating',
+ 11 => 'shutdown',
+ 12 => 'expanding',
+ 13 => 'notAvailable',
+ 14 => 'queuedForExpansion',
+ 15 => 'hardError',
+ },
+ cpqFcaLogDrvConditionValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ },
+ };
+
+ # INDEX { cpqFcaLogDrvBoxIndex, cpqFcaLogDrvIndex }
+ foreach ($self->get_entries($oids, 'cpqFcaLogDrvEntry')) {
+ push(@{$self->{logical_drives}},
+ HP::Proliant::Component::DiskSubsystem::Fca::LogicalDrive->new(%{$_}));
+ }
+
+ $oids = {
+ cpqFcaPhyDrvEntry => '1.3.6.1.4.1.232.16.2.5.1.1',
+ cpqFcaPhyDrvBoxIndex => '1.3.6.1.4.1.232.16.2.5.1.1.1',
+ cpqFcaPhyDrvIndex => '1.3.6.1.4.1.232.16.2.5.1.1.2',
+ cpqFcaPhyDrvModel => '1.3.6.1.4.1.232.16.2.5.1.1.3',
+ cpqFcaPhyDrvBay => '1.3.6.1.4.1.232.16.2.5.1.1.5',
+ cpqFcaPhyDrvStatus => '1.3.6.1.4.1.232.16.2.5.1.1.6',
+ cpqFcaPhyDrvCondition => '1.3.6.1.4.1.232.16.2.5.1.1.31',
+ cpqFcaPhyDrvSize => '1.3.6.1.4.1.232.16.2.5.1.1.38',
+ cpqFcaPhyDrvBusNumber => '1.3.6.1.4.1.232.16.2.5.1.1.42',
+ cpqFcaPhyDrvStatusValue => {
+ 1 => 'other',
+ 2 => 'unconfigured',
+ 3 => 'ok',
+ 4 => 'threshExceeded',
+ 5 => 'predictiveFailure',
+ 6 => 'failed',
+ },
+ cpqFcaPhyDrvConditionValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ },
+ };
+
+ # INDEX { cpqFcaPhyDrvBoxIndex, cpqFcaPhyDrvIndex }
+ foreach ($self->get_entries($oids, 'cpqFcaPhyDrvEntry')) {
+ push(@{$self->{physical_drives}},
+ HP::Proliant::Component::DiskSubsystem::Fca::PhysicalDrive->new(%{$_}));
+ }
+
+ $oids = {
+ cpqFcaMibRevMajor => '1.3.6.1.4.1.232.16.1.1.0',
+ cpqFcaMibRevMinor => '1.3.6.1.4.1.232.16.1.2.0',
+ cpqFcaMibCondition => '1.3.6.1.4.1.232.16.1.3.0',
+ cpqFcaMibConditionValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ },
+ };
+ $self->{global_status} =
+ HP::Proliant::Component::DiskSubsystem::Fca::GlobalStatus->new(
+ runtime => $self->{runtime},
+ cpqFcaMibCondition =>
+ SNMP::Utils::get_object_value($snmpwalk,
+ $oids->{cpqFcaMibCondition}, $oids->{cpqFcaMibConditionValue})
+ );
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide.pm
new file mode 100755
index 0000000..fdd3230
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide.pm
@@ -0,0 +1,256 @@
+package HP::Proliant::Component::DiskSubsystem::Ide;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ controllers => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ condition => undef,
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ if ($self->{method} eq 'snmp') {
+ bless $self, 'HP::Proliant::Component::DiskSubsystem::Ide::SNMP';
+ } else {
+ bless $self, 'HP::Proliant::Component::DiskSubsystem::Ide::CLI';
+ }
+ $self->init();
+ $self->assemble();
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ foreach (@{$self->{controllers}}) {
+ $_->check();
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{controllers}}) {
+ $_->dump();
+ }
+}
+
+package HP::Proliant::Component::DiskSubsystem::Ide::Controller;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Ide);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqIdeControllerIndex => $params{cpqIdeControllerIndex},
+ cpqIdeControllerOverallCondition => $params{cpqIdeControllerOverallCondition},
+ cpqIdeControllerModel => $params{cpqIdeControllerModel},
+ cpqIdeControllerSlot => $params{cpqIdeControllerSlot}, # -1 ist sysboard?
+ blacklisted => 0,
+ };
+ $self->{name} = $params{name} || $self->{cpqIdeControllerIndex};
+ $self->{controllerindex} = $self->{cpqIdeControllerIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('ideco', $self->{name});
+ if ($self->{cpqIdeControllerOverallCondition} eq 'other') {
+ if (scalar(@{$self->{physical_drives}})) {
+ $self->add_message(CRITICAL,
+ sprintf 'ide controller %s in slot %s needs attention',
+ $self->{cpqIdeControllerIndex}, $self->{cpqIdeControllerSlot});
+ $self->add_info(sprintf 'ide controller %s in slot %s needs attention',
+ $self->{cpqIdeControllerIndex}, $self->{cpqIdeControllerSlot});
+ } else {
+ $self->add_info(sprintf 'ide controller %s in slot %s is ok and unused',
+ $self->{cpqIdeControllerIndex}, $self->{cpqIdeControllerSlot});
+ $self->{blacklisted} = 1;
+ }
+ } elsif ($self->{cpqIdeControllerOverallCondition} ne 'ok') {
+ $self->add_message(CRITICAL,
+ sprintf 'ide controller %s in slot %s needs attention',
+ $self->{cpqIdeControllerIndex}, $self->{cpqIdeControllerSlot});
+ $self->add_info(sprintf 'ide controller %s in slot %s needs attention',
+ $self->{cpqIdeControllerIndex}, $self->{cpqIdeControllerSlot});
+ } else {
+ $self->add_info(sprintf 'ide controller %s in slot %s is ok',
+ $self->{cpqIdeControllerIndex}, $self->{cpqIdeControllerSlot});
+ }
+ foreach (@{$self->{logical_drives}}) {
+ $_->check();
+ }
+ foreach (@{$self->{physical_drives}}) {
+ $_->check();
+ }
+ foreach (@{$self->{spare_drives}}) {
+ $_->check();
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[IDE_CONTROLLER_%s]\n", $self->{name};
+ foreach (qw(cpqIdeControllerIndex cpqIdeControllerSlot
+ cpqIdeControllerModel cpqIdeControllerOverallCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+ foreach (@{$self->{logical_drives}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{physical_drives}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{spare_drives}}) {
+ $_->dump();
+ }
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Ide::LogicalDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Ide);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqIdeLogicalDriveControllerIndex => $params{cpqIdeLogicalDriveControllerIndex},
+ cpqIdeLogicalDriveIndex => $params{cpqIdeLogicalDriveIndex},
+ cpqIdeLogicalDriveRaidLevel => $params{cpqIdeLogicalDriveRaidLevel},
+ cpqIdeLogicalDriveCapacity => $params{cpqIdeLogicalDriveCapacity},
+ cpqIdeLogicalDriveStatus => $params{cpqIdeLogicalDriveStatus},
+ cpqIdeLogicalDriveCondition => $params{cpqIdeLogicalDriveCondition},
+ cpqIdeLogicalDriveDiskIds => $params{cpqIdeLogicalDriveDiskIds},
+ cpqIdeLogicalDriveSpareIds => $params{cpqIdeLogicalDriveSpareIds},
+ cpqIdeLogicalDriveRebuildingDisk => $params{cpqIdeLogicalDriveRebuildingDisk},
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ $self->{name} = $params{name} ||
+ $self->{cpqIdeLogicalDriveControllerIndex}.':'.
+ $self->{cpqIdeLogicalDriveIndex};
+ $self->{controllerindex} = $self->{cpqIdeLogicalDriveControllerIndex};
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('ideld', $self->{name});
+ if ($self->{cpqIdeLogicalDriveCondition} ne "ok") {
+ if ($self->{cpqIdeLogicalDriveStatus} =~
+ /rebuild/) {
+ $self->add_message(WARNING,
+ sprintf "logical drive %s is %s",
+ $self->{name}, $self->{cpqIdeLogicalDriveStatus});
+ } else {
+ $self->add_message(CRITICAL,
+ sprintf "logical drive %s is %s",
+ $self->{name}, $self->{cpqIdeLogicalDriveStatus});
+ }
+ }
+ $self->add_info(
+ sprintf "logical drive %s is %s", $self->{name},
+ $self->{cpqIdeLogicalDriveStatus});
+}
+
+sub dump {
+ my $self = shift;
+ printf "[LOGICAL_DRIVE]\n";
+ foreach (qw(cpqIdeLogicalDriveControllerIndex cpqIdeLogicalDriveIndex
+ cpqIdeLogicalDriveRaidLevel cpqIdeLogicalDriveCapacity
+ cpqIdeLogicalDriveDiskIds cpqIdeLogicalDriveSpareIds
+ cpqIdeLogicalDriveRebuildingDisk cpqIdeLogicalDriveStatus
+ cpqIdeLogicalDriveCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Ide::PhysicalDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Ide);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqIdeAtaDiskControllerIndex => $params{cpqIdeAtaDiskControllerIndex},
+ cpqIdeAtaDiskIndex => $params{cpqIdeAtaDiskIndex},
+ cpqIdeAtaDiskModel => $params{cpqIdeAtaDiskModel},
+ cpqIdeAtaDiskStatus => $params{cpqIdeAtaDiskStatus},
+ cpqIdeAtaDiskCondition => $params{cpqIdeAtaDiskCondition},
+ cpqIdeAtaDiskCapacity => $params{cpqIdeAtaDiskCapacity},
+ cpqIdeAtaDiskLogicalDriveMember => $params{cpqIdeAtaDiskLogicalDriveMember},
+ cpqIdeAtaDiskIsSpare => $params{cpqIdeAtaDiskIsSpare},
+ blacklisted => 0,
+ };
+ $self->{name} = $params{name} ||
+ $self->{cpqIdeAtaDiskControllerIndex}.':'.
+ $self->{cpqIdeAtaDiskIndex}; ####vorerst
+ $self->{controllerindex} = $self->{cpqIdeAtaDiskControllerIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('idepd', $self->{name});
+ if ($self->{cpqIdeAtaDiskCondition} ne 'ok') {
+ $self->add_message(CRITICAL,
+ sprintf "physical drive %s is %s",
+ $self->{name}, $self->{cpqIdeAtaDiskCondition});
+ }
+ $self->add_info(
+ sprintf "physical drive %s is %s",
+ $self->{name}, $self->{cpqIdeAtaDiskCondition});
+}
+
+sub dump {
+ my $self = shift;
+ printf "[PHYSICAL_DRIVE]\n";
+ foreach (qw(cpqIdeAtaDiskControllerIndex cpqIdeAtaDiskIndex
+ cpqIdeAtaDiskModel cpqIdeAtaDiskCapacity cpqIdeAtaDiskLogicalDriveMember
+ cpqIdeAtaDiskStatus cpqIdeAtaDiskCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Ide::SpareDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Ide);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub dump {
+ my $self = shift;
+ printf "[SPARE_DRIVE]\n";
+}
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide/CLI.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide/CLI.pm
new file mode 100755
index 0000000..babc616
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide/CLI.pm
@@ -0,0 +1,27 @@
+package HP::Proliant::Component::DiskSubsystem::Ide::CLI;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Ide);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ controllers => [],
+ accelerators => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide/SNMP.pm
new file mode 100755
index 0000000..86f9543
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Ide/SNMP.pm
@@ -0,0 +1,115 @@
+package HP::Proliant::Component::DiskSubsystem::Ide::SNMP;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Ide
+ HP::Proliant::Component::SNMP);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ controllers => [],
+ accelerators => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+
+ # CPQIDE-MIB
+ my $oids = {
+ cpqIdeControllerEntry => '1.3.6.1.4.1.232.14.2.3.1.1',
+ cpqIdeControllerIndex => '1.3.6.1.4.1.232.14.2.3.1.1.1',
+ cpqIdeControllerOverallCondition => '1.3.6.1.4.1.232.14.2.3.1.1.2',
+ cpqIdeControllerModel => '1.3.6.1.4.1.232.14.2.3.1.1.3',
+ cpqIdeControllerSlot => '1.3.6.1.4.1.232.14.2.3.1.1.5',
+ cpqIdeControllerOverallConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ };
+
+ # INDEX { cpqIdeControllerIndex }
+ foreach ($self->get_entries($oids, 'cpqIdeControllerEntry')) {
+ push(@{$self->{controllers}},
+ HP::Proliant::Component::DiskSubsystem::Ide::Controller->new(%{$_}));
+ }
+
+ $oids = {
+ cpqIdeLogicalDriveEntry => '1.3.6.1.4.1.232.14.2.6.1.1',
+ cpqIdeLogicalDriveControllerIndex => '1.3.6.1.4.1.232.14.2.6.1.1.1',
+ cpqIdeLogicalDriveIndex => '1.3.6.1.4.1.232.14.2.6.1.1.2',
+ cpqIdeLogicalDriveRaidLevel => '1.3.6.1.4.1.232.14.2.6.1.1.3',
+ cpqIdeLogicalDriveCapacity => '1.3.6.1.4.1.232.14.2.6.1.1.4',
+ cpqIdeLogicalDriveStatus => '1.3.6.1.4.1.232.14.2.6.1.1.5',
+ cpqIdeLogicalDriveCondition => '1.3.6.1.4.1.232.14.2.6.1.1.6',
+ cpqIdeLogicalDriveDiskIds => '1.3.6.1.4.1.232.14.2.6.1.1.7',
+ cpqIdeLogicalDriveSpareIds => '1.3.6.1.4.1.232.14.2.6.1.1.9',
+ cpqIdeLogicalDriveRebuildingDisk => '1.3.6.1.4.1.232.14.2.6.1.1.10',
+ cpqIdeLogicalDriveRaidLevelValue => {
+ 1 => "other",
+ 2 => "raid0",
+ 3 => "raid1",
+ 4 => "raid0plus1",
+ },
+ cpqIdeLogicalDriveStatusValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "rebuilding",
+ 5 => "failed",
+ },
+ cpqIdeLogicalDriveConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ };
+ # INDEX { cpqIdeLogicalDriveControllerIndex, cpqIdeLogicalDriveIndex }
+ foreach ($self->get_entries($oids, 'cpqIdeLogicalDriveEntry')) {
+ push(@{$self->{logical_drives}},
+ HP::Proliant::Component::DiskSubsystem::Ide::LogicalDrive->new(%{$_}));
+ }
+
+ $oids = {
+ cpqIdeAtaDiskEntry => '1.3.6.1.4.1.232.14.2.4.1.1',
+ cpqIdeAtaDiskControllerIndex => '1.3.6.1.4.1.232.14.2.4.1.1.1',
+ cpqIdeAtaDiskIndex => '1.3.6.1.4.1.232.14.2.4.1.1.2',
+ cpqIdeAtaDiskModel => '1.3.6.1.4.1.232.14.2.4.1.1.3',
+ cpqIdeAtaDiskStatus => '1.3.6.1.4.1.232.14.2.4.1.1.6',
+ cpqIdeAtaDiskCondition => '1.3.6.1.4.1.232.14.2.4.1.1.7',
+ cpqIdeAtaDiskCapacity => '1.3.6.1.4.1.232.14.2.4.1.1.8',
+ cpqIdeAtaDiskLogicalDriveMember => '1.3.6.1.4.1.232.14.2.4.1.1.13',
+ cpqIdeAtaDiskIsSpare => '1.3.6.1.4.1.232.14.2.4.1.1.14',
+ cpqIdeAtaDiskStatusValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "smartError",
+ 4 => "failed",
+ },
+ cpqIdeAtaDiskConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ };
+ # INDEX { cpqIdeAtaDiskControllerIndex, cpqIdeAtaDiskIndex }
+ foreach ($self->get_entries($oids, 'cpqIdeAtaDiskEntry')) {
+ push(@{$self->{physical_drives}},
+ HP::Proliant::Component::DiskSubsystem::Ide::PhysicalDrive->new(%{$_}));
+ }
+
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas.pm
new file mode 100755
index 0000000..bb417d4
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas.pm
@@ -0,0 +1,251 @@
+package HP::Proliant::Component::DiskSubsystem::Sas;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ controllers => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ condition => undef,
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ if ($self->{method} eq 'snmp') {
+ bless $self, 'HP::Proliant::Component::DiskSubsystem::Sas::SNMP';
+ } else {
+ bless $self, 'HP::Proliant::Component::DiskSubsystem::Sas::CLI';
+ }
+ $self->init();
+ $self->assemble();
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ foreach (@{$self->{controllers}}) {
+ $_->check();
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{controllers}}) {
+ $_->dump();
+ }
+}
+
+package HP::Proliant::Component::DiskSubsystem::Sas::Controller;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Sas);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqSasHbaIndex => $params{cpqSasHbaIndex},
+ cpqSasHbaLocation => $params{cpqSasHbaLocation},
+ cpqSasHbaSlot => $params{cpqSasHbaSlot},
+ cpqSasHbaStatus => $params{cpqSasHbaStatus},
+ cpqSasHbaCondition => $params{cpqSasHbaCondition},
+ blacklisted => 0,
+ };
+ $self->{name} = $params{name} || $self->{cpqSasHbaSlot};
+ $self->{controllerindex} = $self->{cpqSasHbaIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('saco', $self->{cpqSasHbaSlot});
+ if ($self->{cpqSasHbaCondition} eq 'other') {
+ if (scalar(@{$self->{physical_drives}})) {
+ $self->add_message(CRITICAL,
+ sprintf 'sas controller in slot %s needs attention',
+ $self->{cpqSasHbaSlot});
+ $self->add_info(sprintf 'sas controller in slot %s needs attention',
+ $self->{cpqSasHbaSlot});
+ } else {
+ $self->add_info(sprintf 'sas controller in slot %s is ok and unused',
+ $self->{cpqSasHbaSlot});
+ $self->{blacklisted} = 1;
+ }
+ } elsif ($self->{cpqSasHbaCondition} ne 'ok') {
+ $self->add_message(CRITICAL,
+ sprintf 'sas controller in slot %s needs attention',
+ $self->{cpqSasHbaSlot});
+ $self->add_info(sprintf 'sas controller in slot %s needs attention',
+ $self->{cpqSasHbaSlot});
+ } else {
+ $self->add_info(sprintf 'sas controller in slot %s is ok',
+ $self->{cpqSasHbaSlot});
+ }
+ foreach (@{$self->{logical_drives}}) {
+ $_->check();
+ }
+ foreach (@{$self->{physical_drives}}) {
+ $_->check();
+ }
+ foreach (@{$self->{spare_drives}}) {
+ $_->check();
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[SAS_HBA%s]\n", $self->{name};
+ foreach (qw(cpqSasHbaSlot cpqSasHbaIndex cpqSasHbaCondition
+ cpqSasHbaStatus cpqSasHbaLocation)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+ foreach (@{$self->{logical_drives}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{physical_drives}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{spare_drives}}) {
+ $_->dump();
+ }
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Sas::LogicalDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Sas);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqSasLogDrvHbaIndex => $params{cpqSasLogDrvHbaIndex},
+ cpqSasLogDrvIndex => $params{cpqSasLogDrvIndex},
+ cpqSasLogDrvStatus => $params{cpqSasLogDrvStatus},
+ cpqSasLogDrvCondition => $params{cpqSasLogDrvCondition},
+ cpqSasLogDrvRebuildingPercent => $params{cpqSasLogDrvRebuildingPercent},
+ cpqSasLogDrvRaidLevel => $params{cpqSasLogDrvRaidLevel},
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ $self->{name} = $params{name} ||
+ $self->{cpqSasLogDrvHbaIndex}.':'.$self->{cpqSasLogDrvIndex}; ####vorerst
+ $self->{controllerindex} = $self->{cpqSasLogDrvHbaIndex};
+ if (! $self->{cpqSasLogDrvRebuildingPercent} ||
+ $self->{cpqSasLogDrvRebuildingPercent} == 4294967295) {
+ $self->{cpqSasLogDrvRebuildingPercent} = 100;
+ }
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('sald', $self->{name});
+ if ($self->{cpqSasLogDrvCondition} ne "ok") {
+ if ($self->{cpqSasLogDrvStatus} =~
+ /rebuild|recovering|expanding|queued/) {
+ $self->add_message(WARNING,
+ sprintf "logical drive %s is %s",
+ $self->{name}, $self->{cpqSasLogDrvStatus});
+ } else {
+ $self->add_message(CRITICAL,
+ sprintf "logical drive %s is %s",
+ $self->{name}, $self->{cpqSasLogDrvStatus});
+ }
+ }
+ $self->add_info(
+ sprintf "logical drive %s is %s (%s)", $self->{name},
+ $self->{cpqSasLogDrvStatus}, $self->{cpqSasLogDrvRaidLevel});
+}
+
+sub dump {
+ my $self = shift;
+ printf "[LOGICAL_DRIVE]\n";
+ foreach (qw(cpqSasLogDrvHbaIndex cpqSasLogDrvIndex cpqSasLogDrvRaidLevel
+ cpqSasLogDrvStatus cpqSasLogDrvCondition
+ cpqSasLogDrvRebuildingPercent)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Sas::PhysicalDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Sas);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqSasPhyDrvHbaIndex => $params{cpqSasPhyDrvHbaIndex},
+ cpqSasPhyDrvIndex => $params{cpqSasPhyDrvIndex},
+ cpqSasPhyDrvLocationString => $params{cpqSasPhyDrvLocationString},
+ cpqSasPhyDrvStatus => $params{cpqSasPhyDrvStatus},
+ cpqSasPhyDrvSize => $params{cpqSasPhyDrvSize},
+ cpqSasPhyDrvCondition => $params{cpqSasPhyDrvCondition},
+ blacklisted => 0,
+ };
+ $self->{name} = $params{name} ||
+ $self->{cpqSasPhyDrvHbaIndex}.':'.$self->{cpqSasPhyDrvIndex}; ####vorerst
+ $self->{controllerindex} = $self->{cpqSasPhyDrvHbaIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('sapd', $self->{name});
+ if ($self->{cpqSasPhyDrvCondition} ne 'ok') {
+ $self->add_message(CRITICAL,
+ sprintf "physical drive %s is %s",
+ $self->{name}, $self->{cpqSasPhyDrvCondition});
+ }
+ $self->add_info(
+ sprintf "physical drive %s is %s",
+ $self->{name}, $self->{cpqSasPhyDrvCondition});
+}
+
+sub dump {
+ my $self = shift;
+ printf "[PHYSICAL_DRIVE]\n";
+ foreach (qw(cpqSasPhyDrvHbaIndex cpqSasPhyDrvIndex cpqSasPhyDrvLocationString
+ cpqSasPhyDrvSize cpqSasPhyDrvStatus cpqSasPhyDrvCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Sas::SpareDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Sas);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub dump {
+ my $self = shift;
+ printf "[SPARE_DRIVE]\n";
+}
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas/CLI.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas/CLI.pm
new file mode 100755
index 0000000..1a250d3
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas/CLI.pm
@@ -0,0 +1,27 @@
+package HP::Proliant::Component::DiskSubsystem::Sas::CLI;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Sas);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ controllers => [],
+ accelerators => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas/SNMP.pm
new file mode 100755
index 0000000..cb493fd
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Sas/SNMP.pm
@@ -0,0 +1,126 @@
+package HP::Proliant::Component::DiskSubsystem::Sas::SNMP;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Sas
+ HP::Proliant::Component::SNMP);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ controllers => [],
+ accelerators => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+
+ # CPQSCSI-MIB
+ my $oids = {
+ cpqSasHbaEntry => "1.3.6.1.4.1.232.5.5.1.1.1",
+ cpqSasHbaIndex => "1.3.6.1.4.1.232.5.5.1.1.1.1",
+ cpqSasHbaLocation => "1.3.6.1.4.1.232.5.5.1.1.1.2",
+ cpqSasHbaSlot => "1.3.6.1.4.1.232.5.5.1.1.1.6",
+ cpqSasHbaStatus => "1.3.6.1.4.1.232.5.5.1.1.1.4",
+ cpqSasHbaStatusValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "failed",
+ },
+ cpqSasHbaCondition => "1.3.6.1.4.1.232.5.5.1.1.1.5",
+ cpqSasHbaConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ };
+
+ # INDEX { cpqSasHbaIndex }
+ foreach ($self->get_entries($oids, 'cpqSasHbaEntry')) {
+ push(@{$self->{controllers}},
+ HP::Proliant::Component::DiskSubsystem::Sas::Controller->new(%{$_}));
+ }
+
+ $oids = {
+ cpqSasLogDrvEntry => "1.3.6.1.4.1.232.5.5.3.1.1",
+ cpqSasLogDrvHbaIndex => "1.3.6.1.4.1.232.5.5.3.1.1.1",
+ cpqSasLogDrvIndex => "1.3.6.1.4.1.232.5.5.3.1.1.2",
+ cpqSasLogDrvStatus => "1.3.6.1.4.1.232.5.5.3.1.1.4",
+ cpqSasLogDrvCondition => "1.3.6.1.4.1.232.5.5.3.1.1.5",
+ cpqSasLogDrvRebuildingPercent => "1.3.6.1.4.1.232.5.5.3.1.1.12",
+ cpqSasLogDrvRaidLevel => "1.3.6.1.4.1.232.5.5.3.1.1.3",
+ cpqSasLogDrvRaidLevelValue => {
+ 1 => "other",
+ 2 => "raid0",
+ 3 => "raid1",
+ 4 => "raid0plus1",
+ 5 => "raid5",
+ 6 => "raid15",
+ 7 => "volume",
+ },
+ cpqSasLogDrvConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqSasLogDrvStatusValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "rebuilding",
+ 5 => "failed",
+ 6 => "offline",
+ }
+ };
+ # INDEX { cpqSasLogDrvCntlrIndex, cpqSasLogDrvIndex }
+ foreach ($self->get_entries($oids, 'cpqSasLogDrvEntry')) {
+ push(@{$self->{logical_drives}},
+ HP::Proliant::Component::DiskSubsystem::Sas::LogicalDrive->new(%{$_}));
+ }
+
+ $oids = {
+ cpqSasPhyDrvEntry => "1.3.6.1.4.1.232.5.5.2.1.1",
+ cpqSasPhyDrvHbaIndex => "1.3.6.1.4.1.232.5.5.2.1.1.1",
+ cpqSasPhyDrvIndex => "1.3.6.1.4.1.232.5.5.2.1.1.2",
+ cpqSasPhyDrvLocationString => "1.3.6.1.4.1.232.5.5.2.1.1.3",
+ cpqSasPhyDrvStatus => "1.3.6.1.4.1.232.5.5.2.1.1.5",
+ cpqSasPhyDrvSize => "1.3.6.1.4.1.232.5.5.2.1.1.8",
+ cpqSasPhyDrvCondition => "1.3.6.1.4.1.232.5.5.2.1.1.6",
+ cpqSasPhyDrvConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqSasPhyDrvStatusValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "predictiveFailure",
+ 4 => "offline",
+ 5 => "failed",
+ 6 => "missingWasOk",
+ 7 => "missingWasPredictiveFailure",
+ 8 => "missingWasOffline",
+ 9 => "missingWasFailed",
+ },
+ };
+
+ # INDEX { cpqPhyLogDrvCntlrIndex, cpqSasPhyDrvIndex }
+ foreach ($self->get_entries($oids, 'cpqSasPhyDrvEntry')) {
+ push(@{$self->{physical_drives}},
+ HP::Proliant::Component::DiskSubsystem::Sas::PhysicalDrive->new(%{$_}));
+ }
+
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi.pm
new file mode 100755
index 0000000..cf38238
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi.pm
@@ -0,0 +1,227 @@
+package HP::Proliant::Component::DiskSubsystem::Scsi;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ controllers => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ condition => undef,
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ if ($self->{method} eq 'snmp') {
+ bless $self, 'HP::Proliant::Component::DiskSubsystem::Scsi::SNMP';
+ } else {
+ bless $self, 'HP::Proliant::Component::DiskSubsystem::Scsi::CLI';
+ }
+ $self->init();
+ $self->assemble();
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ foreach (@{$self->{controllers}}) {
+ $_->check();
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{controllers}}) {
+ $_->dump();
+ }
+}
+
+package HP::Proliant::Component::DiskSubsystem::Scsi::Controller;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Scsi);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqScsiCntlr/, keys %params;
+ $self->{name} = $params{name} || $params{cpqScsiCntlrIndex}.':'.$params{cpqScsiCntlrBusIndex};
+ $self->{controllerindex} = $self->{cpqScsiCntlrIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('scco', $self->{name});
+ my $info = sprintf 'scsi controller %s in slot %s is %s',
+ $self->{name}, $self->{cpqScsiCntlrSlot}, $self->{cpqScsiCntlrCondition};
+ if ($self->{cpqScsiCntlrCondition} eq 'other') {
+ if (scalar(@{$self->{physical_drives}})) {
+ $info .= ' and needs attention';
+ $self->add_message(CRITICAL, $info);
+ $self->add_info($info);
+ } else {
+ $info .= ' and unused';
+ $self->add_info($info);
+ $self->{blacklisted} = 1;
+ }
+ } elsif ($self->{cpqScsiCntlrCondition} ne 'ok') {
+ $info .= ' and needs attention';
+ $self->add_message(CRITICAL, $info);
+ $self->add_info($info);
+ } else {
+ $self->add_info($info);
+ }
+ foreach (@{$self->{logical_drives}}) {
+ $_->check();
+ }
+ foreach (@{$self->{physical_drives}}) {
+ $_->check();
+ }
+ foreach (@{$self->{spare_drives}}) {
+ $_->check();
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[SCSI_CONTROLLER_%s]\n", $self->{name};
+ foreach (qw(cpqScsiCntlrIndex cpqScsiCntlrBusIndex cpqScsiCntlrSlot
+ cpqScsiCntlrStatus cpqScsiCntlrCondition cpqScsiCntlrHwLocation)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+ foreach (@{$self->{logical_drives}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{physical_drives}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{spare_drives}}) {
+ $_->dump();
+ }
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Scsi::LogicalDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Scsi);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqScsiLogDrv/, keys %params;
+ $self->{name} = $params{name} || $params{cpqScsiLogDrvCntlrIndex}.':'.$params{cpqScsiLogDrvBusIndex}.':'.$params{cpqScsiLogDrvIndex};
+ bless $self, $class;
+ $self->{controllerindex} = $self->{cpqScsiLogDrvCntlrIndex};
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('scld', $self->{name});
+ my $info = sprintf 'logical drive %s is %s', $self->{name}, $self->{cpqScsiLogDrvStatus};
+ if ($self->{cpqScsiLogDrvCondition} ne "ok") {
+ if ($self->{cpqScsiLogDrvStatus} =~
+ /rebuild|recovering/) {
+ $self->add_message(WARNING, $info);
+ } else {
+ $self->add_message(CRITICAL, $info);
+ }
+ }
+ $self->add_info($info);
+}
+
+sub dump {
+ my $self = shift;
+ printf "[LOGICAL_DRIVE_%s]\n", $self->{name};
+ foreach (qw(cpqScsiLogDrvCntlrIndex cpqScsiLogDrvBusIndex cpqScsiLogDrvIndex
+ cpqScsiLogDrvFaultTol cpqScsiLogDrvStatus cpqScsiLogDrvSize
+ cpqScsiLogDrvPhyDrvIDs cpqScsiLogDrvCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Scsi::PhysicalDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Scsi);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ map { $self->{$_} = $params{$_} } grep /cpqScsiPhyDrv/, keys %params;
+ $self->{name} = $params{name} ||
+ $self->{cpqScsiPhyDrvCntlrIndex}.':'.$self->{cpqScsiPhyDrvBusIndex}.':'.$self->{cpqScsiPhyDrvIndex};
+ $self->{controllerindex} = $self->{cpqScsiPhyDrvCntlrIndex};
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('scpd', $self->{name});
+ my $info = sprintf 'physical drive %s is %s', $self->{name}, $self->{cpqScsiPhyDrvCondition};
+ if ($self->{cpqScsiPhyDrvCondition} ne 'ok') {
+ $self->add_message(CRITICAL, $info);
+ }
+ $self->add_info($info);
+}
+
+sub dump {
+ my $self = shift;
+ printf "[PHYSICAL_DRIVE_%s]\n", $self->{name};
+ foreach (qw(cpqScsiPhyDrvCntlrIndex cpqScsiPhyDrvBusIndex cpqScsiPhyDrvIndex
+ cpqScsiPhyDrvStatus cpqScsiPhyDrvSize cpqScsiPhyDrvCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::DiskSubsystem::Scsi::SpareDrive;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Scsi);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub dump {
+ my $self = shift;
+ printf "[SPARE_DRIVE]\n";
+}
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi/CLI.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi/CLI.pm
new file mode 100755
index 0000000..69b3926
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi/CLI.pm
@@ -0,0 +1,27 @@
+package HP::Proliant::Component::DiskSubsystem::Scsi::CLI;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Scsi);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ controllers => [],
+ accelerators => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi/SNMP.pm
new file mode 100755
index 0000000..71a0f66
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/DiskSubsystem/Scsi/SNMP.pm
@@ -0,0 +1,134 @@
+package HP::Proliant::Component::DiskSubsystem::Scsi::SNMP;
+our @ISA = qw(HP::Proliant::Component::DiskSubsystem::Scsi
+ HP::Proliant::Component::SNMP);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ controllers => [],
+ accelerators => [],
+ enclosures => [],
+ physical_drives => [],
+ logical_drives => [],
+ spare_drives => [],
+ blacklisted => 0,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+
+ # CPQSCSI-MIB
+ my $oids = {
+ cpqScsiCntlrEntry => '1.3.6.1.4.1.232.5.2.2.1.1',
+ cpqScsiCntlrIndex => '1.3.6.1.4.1.232.5.2.2.1.1.1',
+ cpqScsiCntlrBusIndex => '1.3.6.1.4.1.232.5.2.2.1.1.2',
+ cpqScsiCntlrSlot => '1.3.6.1.4.1.232.5.2.2.1.1.6',
+ cpqScsiCntlrStatus => '1.3.6.1.4.1.232.5.2.2.1.1.7',
+ cpqScsiCntlrCondition => '1.3.6.1.4.1.232.5.2.2.1.1.12',
+ cpqScsiCntlrHwLocation => '1.3.6.1.4.1.232.5.2.2.1.1.16',
+ cpqScsiCntlrStatusValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "failed",
+ },
+ cpqScsiCntlrConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ }
+ };
+
+ # INDEX { cpqScsiCntlrIndex, cpqScsiCntlrBusIndex }
+ foreach ($self->get_entries($oids, 'cpqScsiCntlrEntry')) {
+ push(@{$self->{controllers}},
+ HP::Proliant::Component::DiskSubsystem::Scsi::Controller->new(%{$_}));
+ }
+
+ $oids = {
+ cpqScsiLogDrvEntry => '1.3.6.1.4.1.232.5.2.3.1.1',
+ cpqScsiLogDrvCntlrIndex => '1.3.6.1.4.1.232.5.2.3.1.1.1',
+ cpqScsiLogDrvBusIndex => '1.3.6.1.4.1.232.5.2.3.1.1.2',
+ cpqScsiLogDrvIndex => '1.3.6.1.4.1.232.5.2.3.1.1.3',
+ cpqScsiLogDrvFaultTol => '1.3.6.1.4.1.232.5.2.3.1.1.4',
+ cpqScsiLogDrvStatus => '1.3.6.1.4.1.232.5.2.3.1.1.5',
+ cpqScsiLogDrvSize => '1.3.6.1.4.1.232.5.2.3.1.1.6',
+ cpqScsiLogDrvPhyDrvIDs => '1.3.6.1.4.1.232.5.2.3.1.1.7',
+ cpqScsiLogDrvCondition => '1.3.6.1.4.1.232.5.2.3.1.1.8',
+ cpqScsiLogDrvStatusValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "failed",
+ 4 => "unconfigured",
+ 5 => "recovering",
+ 6 => "readyForRebuild",
+ 7 => "rebuilding",
+ 8 => "wrongDrive",
+ 9 => "badConnect",
+ },
+ cpqScsiLogDrvConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqScsiLogDrvFaultTolValue => {
+ 1 => "other",
+ 2 => "none",
+ 3 => "mirroring",
+ 4 => "dataGuard",
+ 5 => "distribDataGuard",
+ },
+
+ };
+ # INDEX { cpqScsiLogDrvCntlrIndex, cpqScsiLogDrvBusIndex, cpqScsiLogDrvIndex }
+ foreach ($self->get_entries($oids, 'cpqScsiLogDrvEntry')) {
+ push(@{$self->{logical_drives}},
+ HP::Proliant::Component::DiskSubsystem::Scsi::LogicalDrive->new(%{$_}));
+ }
+
+ $oids = {
+ cpqScsiPhyDrvEntry => '1.3.6.1.4.1.232.5.2.4.1.1',
+ cpqScsiPhyDrvCntlrIndex => '1.3.6.1.4.1.232.5.2.4.1.1.1',
+ cpqScsiPhyDrvBusIndex => '1.3.6.1.4.1.232.5.2.4.1.1.2',
+ cpqScsiPhyDrvIndex => '1.3.6.1.4.1.232.5.2.4.1.1.3',
+ cpqScsiPhyDrvStatus => '1.3.6.1.4.1.232.5.2.4.1.1.9',
+ cpqScsiPhyDrvSize => '1.3.6.1.4.1.232.5.2.4.1.1.7',
+ cpqScsiPhyDrvCondition => '1.3.6.1.4.1.232.5.2.4.1.1.26',
+ cpqScsiPhyDrvConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqScsiPhyDrvStatusValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "failed",
+ 4 => "notConfigured",
+ 5 => "badCable",
+ 6 => "missingWasOk",
+ 7 => "missingWasFailed",
+ 8 => "predictiveFailure",
+ 9 => "missingWasPredictiveFailure",
+ 10 => "offline",
+ 11 => "missingWasOffline",
+ 12 => "hardError",
+ },
+ };
+
+ # INDEX { cpqScsiPhyDrvCntlrIndex, cpqScsiPhyDrvBusIndex, cpqScsiPhyDrvIndex }
+ foreach ($self->get_entries($oids, 'cpqScsiPhyDrvEntry')) {
+ push(@{$self->{physical_drives}},
+ HP::Proliant::Component::DiskSubsystem::Scsi::PhysicalDrive->new(%{$_}));
+ }
+
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/EventSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/EventSubsystem.pm
new file mode 100755
index 0000000..2a7a378
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/EventSubsystem.pm
@@ -0,0 +1,236 @@
+package HP::Proliant::Component::EventSubsystem;
+our @ISA = qw(HP::Proliant::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ condition => $params{condition},
+ status => $params{status},
+ events => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ boottime => 0,
+ };
+ bless $self, $class;
+ if ($self->{method} eq 'snmp') {
+ $self = HP::Proliant::Component::EventSubsystem::SNMP->new(%params);
+ my $sysUpTime = SNMP::Utils::get_object(
+ $self->{rawdata}, '1.3.6.1.2.1.1.3.0') || 3600*24*100;
+ $self->{boottime} = int(time - $sysUpTime / 100);
+ } elsif ($self->{method} eq 'cli') {
+ $self = HP::Proliant::Component::EventSubsystem::CLI->new(%params);
+ my $uptime = do { local (@ARGV, $/) = "/proc/uptime"; my $x = <>; close ARGV; $x };
+ # also watch 10 minutes of booting before the operating system starts ticking
+ $self->{boottime} = time - int((split(/\s+/, $uptime))[0]) - 600;
+ } else {
+ die "unknown method";
+ }
+ # repair dates
+ my $lasttime = 0;
+ for my $event (reverse @{$self->{events}}) {
+ if ($event->{cpqHeEventLogUpdateTime} != 0) {
+ $lasttime = $event->{cpqHeEventLogUpdateTime};
+ } else {
+ $event->{cpqHeEventLogUpdateTime} = $lasttime;
+ }
+ }
+ # maybe the most recent events had zero timestamps.
+ # fill them up with timestamps from the past.
+ for my $event (@{$self->{events}}) {
+ if ($event->{cpqHeEventLogUpdateTime} != 0) {
+ $lasttime = $event->{cpqHeEventLogUpdateTime};
+ } else {
+ $event->{cpqHeEventLogUpdateTime} = $lasttime;
+ }
+ }
+ # we need the boottime in the event's check method
+ for my $event (@{$self->{events}}) {
+ $event->{boottime} = $self->{boottime};
+ }
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ my $errorfound = 0;
+ $self->add_info('checking events');
+ if (scalar (@{$self->{events}}) == 0) {
+ #$self->overall_check();
+ $self->add_info('no events found');
+ } else {
+ foreach (sort { $a->{cpqHeEventLogEntryNumber} <=> $b->{cpqHeEventLogEntryNumber}}
+ @{$self->{events}}) {
+ $_->check($self->{warningtime}, $self->{criticaltime});
+ }
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (sort { $a->{cpqHeEventLogEntryNumber} <=> $b->{cpqHeEventLogEntryNumber} } @{$self->{events}}) {
+ $_->dump();
+ }
+}
+
+
+package HP::Proliant::Component::EventSubsystem::Event;
+our @ISA = qw(HP::Proliant::Component::EventSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+{
+ our $interesting_events = {
+ # POST Error: 201-Memory Error Multi-bit error occurred during memory initialization, Board 1, Bank B. Bank containing DIMM(s) has been disabled..
+ # POST Error: 201-Memory Error Single-bit error occured during memory initialization, Board 1, DIMM 1. Bank containing DIMM(s) has been disabled..
+ # POST Error: 207-Memory initialization error on Memory Board 5 DIMM 7. The operating system may not have access to all of the memory installed in the system..
+ # POST Error: 207-Invalid Memory Configuration-Mismatched DIMMs within DIMM Bank Memory in Bank A Not Utilized..
+ # POST Error: 210 - Quick Path Interconnect (QPI) Link Degradation. A QPI link is operating in a degraded performace state..
+ 'POST Messages' => [
+ '201-Memory', '207-Memory',
+ '210\s*-\s*Quick Path Interconnect.*degraded.*'
+ ],
+ 'Main Memory' => [
+ 'Corrected Memory Error threshold exceeded',
+ 'Uncorrectable Memory Error',
+ ],
+ };
+}
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqHeEventLogEntryNumber => $params{cpqHeEventLogEntryNumber},
+ cpqHeEventLogEntrySeverity => lc $params{cpqHeEventLogEntrySeverity},
+ cpqHeEventLogEntryClass => $params{cpqHeEventLogEntryClass},
+ cpqHeEventLogEntryCount => $params{cpqHeEventLogEntryCount} || 1,
+ cpqHeEventLogInitialTime => $params{cpqHeEventLogInitialTime},
+ cpqHeEventLogUpdateTime => $params{cpqHeEventLogUpdateTime},
+ cpqHeEventLogErrorDesc => $params{cpqHeEventLogErrorDesc},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ if (! $self->{cpqHeEventLogInitialTime}) {
+ $self->{cpqHeEventLogInitialTime} = $self->{cpqHeEventLogUpdateTime};
+ }
+ #
+ #
+ #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ # |warn |crit |now
+ #
+ #<----- ignore -------><----- warning ------><---------- critical --------->
+ #
+ # If we have --eventrange <warnlookback>/<critlookback>
+ # Very young events are shown as critical
+ # If the event gets older, it is shown as warning
+ # At some time, the event is no longer shown
+ # Without --eventrange the event is shown as critical until you manually repair it
+ if ($params{runtime}->{options}->{eventrange}) {
+ my ($warningrange, $criticalrange) = split(/\//, $params{runtime}->{options}->{eventrange});
+ if (! $criticalrange) {
+ $criticalrange = $warningrange;
+ }
+ if ($criticalrange =~ /^(\d+)[s]*$/) {
+ $criticalrange = $1;
+ } elsif ($criticalrange =~ /^(\d+)m$/) {
+ $criticalrange = $1 * 60;
+ } elsif ($criticalrange =~ /^(\d+)h$/) {
+ $criticalrange = $1 * 3600;
+ } elsif ($criticalrange =~ /^(\d+)d$/) {
+ $criticalrange = $1 * 3600 * 24;
+ } else {
+ die "range has to be <number>[smhd]";
+ }
+ if ($warningrange =~ /^(\d+)[s]*$/) {
+ $warningrange = $1;
+ } elsif ($warningrange =~ /^(\d+)m$/) {
+ $warningrange = $1 * 60;
+ } elsif ($warningrange =~ /^(\d+)h$/) {
+ $warningrange = $1 * 3600;
+ } elsif ($warningrange =~ /^(\d+)d$/) {
+ $warningrange = $1 * 3600 * 24;
+ } else {
+ die "range has to be <number>[smhd]";
+ }
+ $self->{warningtime} = time - $warningrange;
+ $self->{criticaltime} = time - $criticalrange;
+ } else {
+ $self->{warningtime} = 0;
+ $self->{criticaltime} = 0;
+ }
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('evt', $self->{cpqHeEventLogEntryNumber});
+ # only check severity "critical" and "caution"
+ # optional: only check interesting events
+ # POST events only if they date maximum from reboot-5min
+ # younger than critical? -> critical
+ #
+ $self->add_info(sprintf "Event: %d Added: %s Class: (%s) %s %s",
+ $self->{cpqHeEventLogEntryNumber},
+ $self->{cpqHeEventLogUpdateTime},
+ $self->{cpqHeEventLogEntryClass},
+ $self->{cpqHeEventLogEntrySeverity},
+ $self->{cpqHeEventLogErrorDesc});
+ if ($self->{cpqHeEventLogEntrySeverity} eq "caution" ||
+ $self->{cpqHeEventLogEntrySeverity} eq "critical") {
+ # also watch 10 minutes of booting before the operating system starts ticking
+ if ($self->{cpqHeEventLogUpdateTime} >= $self->{boottime}) {
+ foreach my $class (keys %{$HP::Proliant::Component::EventSubsystem::Event::interesting_events}) {
+ foreach my $pattern (@{$HP::Proliant::Component::EventSubsystem::Event::interesting_events->{$class}}) {
+ if ($self->{cpqHeEventLogErrorDesc} =~ /$pattern/) {
+ if ($self->{cpqHeEventLogUpdateTime} < $self->{warningtime}) {
+ # you didn't care for this problem too long.
+ # don't say i didn't warn you.
+ if (0) {
+ # auto-ack?
+ }
+ last;
+ } elsif ($self->{cpqHeEventLogUpdateTime} < $self->{criticaltime}) {
+ $self->add_message(WARNING, $self->{info});
+ last;
+ } else {
+ $self->add_message(CRITICAL, $self->{info});
+ last;
+ }
+ }
+ }
+ }
+ }
+ } else {
+ # info, repair...
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[EVENT_%s]\n", $self->{cpqHeEventLogEntryNumber};
+ foreach (qw(cpqHeEventLogEntryNumber cpqHeEventLogEntrySeverity
+ cpqHeEventLogEntryCount cpqHeEventLogInitialTime
+ cpqHeEventLogUpdateTime cpqHeEventLogErrorDesc)) {
+ if ($_ =~ /.*Time$/) {
+ printf "%s: %s\n", $_, scalar localtime $self->{$_};
+ } else {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ }
+ printf "info: %s\n\n", $self->{info};
+}
+
+1;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/EventSubsystem/CLI.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/EventSubsystem/CLI.pm
new file mode 100755
index 0000000..b75a547
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/EventSubsystem/CLI.pm
@@ -0,0 +1,78 @@
+package HP::Proliant::Component::EventSubsystem::CLI;
+our @ISA = qw(HP::Proliant::Component::EventSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+use Time::Local;
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ events => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init(%params);
+ return $self;
+}
+
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ my %tmpevent = (
+ runtime => $params{runtime},
+ );
+ my $inblock = 0;
+ foreach (grep(/^iml/, split(/\n/, $self->{rawdata}))) {
+ s/^iml\s*//g;
+ if (/^Event:\s+(\d+)\s+[\w]+:\s+(\d+)\/(\d+)\/(\d+)\s+(\d+):(\d+)/) {
+ # Event: 31 Added: 09/22/2011 05:11
+ # 1 2 3 4 5 6
+ $tmpevent{cpqHeEventLogEntryNumber} = $1;
+ if ($4 == 0) {
+ # Event: 29 Added: 00/00/0000 00:00
+ $tmpevent{cpqHeEventLogUpdateTime} = 0;
+ } else {
+ eval {
+ $tmpevent{cpqHeEventLogUpdateTime} = timelocal(0, $6, $5, $3, $2 - 1, $4);
+ };
+ if ($@) {
+ # Event: 10 Added: 27/27/2027 27:27
+ $tmpevent{cpqHeEventLogUpdateTime} = 0;
+ }
+ }
+ $inblock = 1;
+ } elsif (/^(\w+):\s+(.*?)\s+\-\s+(.*)/) {
+ $tmpevent{cpqHeEventLogEntrySeverity} = $1;
+ $tmpevent{cpqHeEventLogEntryClass} = $2;
+ $tmpevent{cpqHeEventLogErrorDesc} = $3;
+ if ($tmpevent{cpqHeEventLogErrorDesc} =~ /.*?:\s+(\d+)/) {
+ $tmpevent{cpqHeEventLogEntryCode} = $1;
+ } else {
+ $tmpevent{cpqHeEventLogEntryCode} = 0;
+ }
+ } elsif (/^\s*$/) {
+ if ($inblock) {
+ $inblock = 0;
+ push(@{$self->{events}},
+ HP::Proliant::Component::EventSubsystem::Event->new(%tmpevent));
+ %tmpevent = (
+ runtime => $params{runtime},
+ );
+ }
+ }
+ }
+ if ($inblock) {
+ push(@{$self->{events}},
+ HP::Proliant::Component::EventSubsystem::Event->new(%tmpevent));
+ }
+}
+
+1;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/EventSubsystem/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/EventSubsystem/SNMP.pm
new file mode 100755
index 0000000..506732a
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/EventSubsystem/SNMP.pm
@@ -0,0 +1,221 @@
+package HP::Proliant::Component::EventSubsystem::SNMP;
+our @ISA = qw(HP::Proliant::Component::EventSubsystem
+ HP::Proliant::Component::SNMP);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+use Time::Local;
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ events => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->overall_init(%params);
+ $self->init(%params);
+ return $self;
+}
+
+sub overall_init {
+ my $self = shift;
+ my %params = @_;
+ my $snmpwalk = $params{rawdata};
+ # overall
+ my $cpqHeEventLogSupported = '1.3.6.1.4.1.232.6.2.11.1.0';
+ my $cpqHeEventLogSupportedValue = {
+ 1 => 'other',
+ 2 => 'notSupported',
+ 3 => 'supported',
+ 4 => 'clear',
+ };
+ my $cpqHeEventLogCondition = '1.3.6.1.4.1.232.6.2.11.2.0';
+ my $cpqHeEventLogConditionValue = {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ };
+ $self->{eventsupp} = SNMP::Utils::get_object_value(
+ $snmpwalk, $cpqHeEventLogSupported,
+ $cpqHeEventLogSupportedValue);
+ $self->{eventstatus} = SNMP::Utils::get_object_value(
+ $snmpwalk, $cpqHeEventLogCondition,
+ $cpqHeEventLogConditionValue);
+ $self->{eventsupp} |= lc $self->{eventsupp};
+ $self->{eventstatus} |= lc $self->{eventstatus};
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ my $snmpwalk = $self->{rawdata};
+ my $oids = {
+ cpqHeEventLogEntry => "1.3.6.1.4.1.232.6.2.11.3.1",
+ cpqHeEventLogEntryNumber => "1.3.6.1.4.1.232.6.2.11.3.1.1",
+ cpqHeEventLogEntrySeverity => "1.3.6.1.4.1.232.6.2.11.3.1.2",
+ cpqHeEventLogEntryClass => "1.3.6.1.4.1.232.6.2.11.3.1.3",
+ cpqHeEventLogEntryCode => "1.3.6.1.4.1.232.6.2.11.3.1.4",
+ cpqHeEventLogEntryCount => "1.3.6.1.4.1.232.6.2.11.3.1.5",
+ cpqHeEventLogInitialTime => "1.3.6.1.4.1.232.6.2.11.3.1.6",
+ cpqHeEventLogUpdateTime => "1.3.6.1.4.1.232.6.2.11.3.1.7",
+ cpqHeEventLogErrorDesc => "1.3.6.1.4.1.232.6.2.11.3.1.8",
+
+ cpqHeEventLogEntryClassValue => {
+ # 2 Fan Failure (Fan 1, Location I/O Board)
+ # Internal Storage System Overheating (Slot 0, Zone 1, Location Storage, Temperature Unknown)
+ # System Fans Not Redundant (Location I/O Board)
+ # MY MUSTARD: only critical events should lead to an alert, if at all. The caution events mean "loss of redundancy".
+ # We monitor temperatures and fan status anyway.
+ #2 => "",
+ # 3 Corrected Memory Error threshold exceeded (System Memory, Memory Module 1)
+ # Uncorrectable Memory Error detected by ROM-based memory validation (Board 1, Memory Module 4)
+ # MY MUSTARD: threshold exceeded is caution. Uncorrectable errors are critical. Both should be detected anyway.
+ 3 => "Main Memory",
+ # 4 Accelerator Cache Memory Parity Error (Socket 1)
+ #4 => "",
+ # 5 Processor Correctable error threshold exceeded (Board 0, Processor 2)
+ #5 => "",
+ # 6 Unrecoverable Intermodule Bus error (Error code 0x00000000)
+ #6 => "",
+ # 8 PCI Bus Error (Slot 0, Bus 0, Device 0, Function 0)
+ 8 => "PCI Bus",
+ # 10 1720-S.M.A.R.T. Hard Drive Detects Imminent Failure
+ # POST Error: 201-Memory Error Multi-bit error occurred during memory initialization, Board 1, Bank B. Bank containing DIMM(s) has been disabled..
+ # POST Error: 201-Memory Error Single-bit error occured during memory initialization, Board 1, DIMM 1. Bank containing DIMM(s) has been disabled..
+ # POST Error: 207-Memory Configuration Warning - memory boards should be installed sequentially.
+ # POST Error: 210-Memory Board Failure on board 4.
+ # POST Error: 210-Memory Board Power Fault on board 3.
+ # POST Error: 207-Memory initialization error on Memory Board 5 DIMM 7. The operating system may not have access to all of the memory installed in the system..
+ # POST Error: 207-Invalid Memory Configuration-Mismatched DIMMs within DIMM Bank Memory in Bank A Not Utilized..
+ 10 => "POST Messages",
+ 11 => "Power Subsystem",
+ 13 => "ASR",
+ # 14 Automatic Operating System Shutdown Initiated Due to Overheat Condition
+ # Automatic Operating System Shutdown Initiated Due to Fan Failure
+ # Blue Screen Trap (BugCheck, STOP: 0x00000050 (0x9CB2C5B4, 0x00000001, 0x00000004, 0x00000000))
+ # Operating System failure (BugCheck, STOP: 0x000000AB (0x00000005, 0x00000488, 0x00000000, 0x00000002))
+ 14 => "OS Class",
+ # 15 Unknown Event (Class 15, Code 255)
+ #15 => "",
+ # 17 Network Adapter Link Down (Slot 0, Port 4)
+ # Network Adapters Redundancy Reduced (Slot 0, Port 1)
+ 17 => "Network Adapter",
+ # 19 Drive Array Device Failure (Slot 0, Bus 2, Bay 4)
+ # Internal SAS Enclosure Device Failure (Bay 1, Box 1, Port 2I, Slot 1)
+ #19 => "",
+ # 20 An Unrecoverable System Error (NMI) has occurred
+ # Unrecoverable System Error has occurred (Error code 0x01AE0E2F, 0x00000000)
+ 20 => "Unrecoverable System Error",
+ # 32 ROM flashed (New version: 01/09/2008)
+ 32 => "System Revision",
+ # 33 IML Cleared (Administrator)
+ # IML cleared through HP ProLiant Health Agent (cmahealthd)
+ # Insight Diagnostics Note: Physisches Festplattenlaufwerk 5, Controller Steckplatz 0-Diagnosis: Fehlgeschlagen
+ 33 => "Maintenance Note",
+ # 34 New Chassis Connected (Enclosure Address 27AC)
+ # Loss Of Chassis Connectivity (Enclosure Serial Number 8004******)
+ # Server Blade Enclosure Server Blade Inserted (Slot 16, Enclosure Address 0000)
+ #34 => "",
+ },
+ cpqHeEventLogEntrySeverityValue => {
+ 2 => "informational",
+ 3 => "infoWithAlert",
+ 6 => "repaired",
+ 9 => "caution",
+ 15 => "critical",
+ },
+ # Time
+ # 07 D8 09 02 11 11
+ };
+ # INDEX { cpqHeEventLogEntryNumber }
+ foreach ($self->get_entries($oids, 'cpqHeEventLogEntry')) {
+ if ($_->{cpqHeEventLogInitialTime} =~ /^(([0-9a-fA-F]{2})( [0-9a-fA-F]{2})*)\s*$/) {
+ $_->{cpqHeEventLogInitialTime} =~ s/ //;
+ my ($year, $month, $day, $hour, $min) = map { hex($_) } split(/\s+/, $_->{cpqHeEventLogInitialTime});
+ if ($year == 0) {
+ $_->{cpqHeEventLogInitialTime} = 0;
+ } else {
+ eval {
+ $_->{cpqHeEventLogInitialTime} = timelocal(0, $min, $hour, $day, $month - 1, $year);
+ };
+ if ($@) {
+ $_->{cpqHeEventLogInitialTime} = 0;
+ }
+ }
+ } elsif ($_->{cpqHeEventLogInitialTime} =~ /^0x([0-9a-fA-F]{4})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/) {
+ my ($year, $month, $day, $hour, $min) = map { hex($_) } ($1, $2, $3, $4, $5);
+ if ($year == 0) {
+ $_->{cpqHeEventLogInitialTime} = 0;
+ } else {
+ eval {
+ $_->{cpqHeEventLogInitialTime} = timelocal(0, $min, $hour, $day, $month - 1, $year);
+ };
+ if ($@) {
+ $_->{cpqHeEventLogInitialTime} = 0;
+ }
+ }
+ } elsif ($_->{cpqHeEventLogInitialTime} =~ /^\0\0\0\0\0\0/) {
+ $_->{cpqHeEventLogInitialTime} = 0;
+ }
+ if ($_->{cpqHeEventLogUpdateTime} =~ /^(([0-9a-fA-F]{2})( [0-9a-fA-F]{2})*)\s*$/) {
+ $_->{cpqHeEventLogUpdateTime} =~ s/ //;
+ my ($year, $month, $day, $hour, $min) = map { hex($_) } split(/\s+/, $_->{cpqHeEventLogUpdateTime});
+ if ($year == 0) {
+ $_->{cpqHeEventLogUpdateTime} = 0;
+ } else {
+ eval {
+ $_->{cpqHeEventLogUpdateTime} = timelocal(0, $min, $hour, $day, $month - 1, $year);
+ };
+ if ($@) {
+ $_->{cpqHeEventLogUpdateTime} = 0;
+ }
+ }
+ } elsif ($_->{cpqHeEventLogUpdateTime} =~ /^0x([0-9a-fA-F]{4})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/) {
+ my ($year, $month, $day, $hour, $min) = map { hex($_) } ($1, $2, $3, $4, $5);
+ if ($year == 0) {
+ $_->{cpqHeEventLogUpdateTime} = 0;
+ } else {
+ eval {
+ $_->{cpqHeEventLogUpdateTime} = timelocal(0, $min, $hour, $day, $month - 1, $year);
+ };
+ if ($@) {
+ $_->{cpqHeEventLogUpdateTime} = 0;
+ }
+ }
+ } elsif ($_->{cpqHeEventLogUpdateTime} =~ /^\0\0\0\0\0\0/) {
+ $_->{cpqHeEventLogUpdateTime} = 0;
+ }
+ if ($_->{cpqHeEventLogErrorDesc} =~ /^(([0-9a-fA-F]{2})(\s+[0-9a-fA-F]{2})*)\s*$/) {
+ $_->{cpqHeEventLogErrorDesc} = join "", map { chr($_) } map { if (hex($_) > 127) { 20; } else { hex($_) } } split(/\s+/, $_->{cpqHeEventLogErrorDesc});
+ }
+ push(@{$self->{events}},
+ HP::Proliant::Component::EventSubsystem::Event->new(%{$_}));
+ }
+}
+
+sub overall_check {
+ my $self = shift;
+ my $result = 0;
+ $self->blacklist('oe', '');
+ if ($self->{eventsupp} && $self->{eventsupp} eq "supported") {
+ if ($self->{eventstatus} eq "ok") {
+ $result = 0;
+ $self->add_info('eventlog system is ok');
+ } else {
+ $result = 0;
+ $self->add_info(sprintf "eventlog system is %s", $self->{eventstatus});
+ }
+ } else {
+ $result = 0;
+ $self->add_info('no event status found');
+ }
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/FanSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/FanSubsystem.pm
new file mode 100755
index 0000000..38da57b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/FanSubsystem.pm
@@ -0,0 +1,263 @@
+package HP::Proliant::Component::FanSubsystem;
+our @ISA = qw(HP::Proliant::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+################################## fan_redundancy ##########
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ condition => $params{condition},
+ status => $params{status},
+ fans => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ if ($self->{method} eq 'snmp') {
+ return HP::Proliant::Component::FanSubsystem::SNMP->new(%params);
+ } elsif ($self->{method} eq 'cli') {
+ return HP::Proliant::Component::FanSubsystem::CLI->new(%params);
+ } else {
+ die 'unknown method';
+ }
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ my $errorfound = 0;
+ $self->add_info('checking fans');
+ $self->blacklist('ff', '');
+ if (scalar (@{$self->{fans}}) == 0) {
+ $self->overall_check(); # sowas ist mir nur einmal untergekommen
+ # die maschine hatte alles in allem nur 2 oids (cpqHeFltTolFanChassis)
+ # SNMPv2-SMI::enterprises.232.6.2.6.7.1.1.0.1 = INTEGER: 0
+ # SNMPv2-SMI::enterprises.232.6.2.6.7.1.1.0.2 = INTEGER: 0
+ } else {
+ my $overallhealth = $self->overall_check();
+ foreach (@{$self->{fans}}) {
+ $_->{overallhealth} = $overallhealth;
+ $_->check();
+ }
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{fans}}) {
+ $_->dump();
+ }
+}
+
+sub get_fan_by_index {
+ my $self = shift;
+ my $index;
+ foreach (@{$self->{fans}}) {
+ return $_ if exists $_->{cpqHeFltTolFanIndex} &&
+ $_->{cpqHeFltTolFanIndex} == $index;
+ }
+ return undef;
+}
+
+
+package HP::Proliant::Component::FanSubsystem::Fan;
+our @ISA = qw(HP::Proliant::Component::FanSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ if (exists $params{cpqHeFltTolFanRedundant}) {
+ return HP::Proliant::Component::FanSubsystem::Fan::FTol->new(%params);
+ } else {
+ return HP::Proliant::Component::FanSubsystem::Fan::Thermal->new(%params);
+ }
+}
+
+
+package HP::Proliant::Component::FanSubsystem::Fan::FTol;
+our @ISA = qw(HP::Proliant::Component::FanSubsystem::Fan);
+
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqHeFltTolFanChassis => $params{cpqHeFltTolFanChassis},
+ cpqHeFltTolFanIndex => $params{cpqHeFltTolFanIndex},
+ cpqHeFltTolFanLocale => $params{cpqHeFltTolFanLocale},
+ cpqHeFltTolFanPresent => $params{cpqHeFltTolFanPresent},
+ cpqHeFltTolFanType => $params{cpqHeFltTolFanType},
+ cpqHeFltTolFanSpeed => $params{cpqHeFltTolFanSpeed},
+ cpqHeFltTolFanRedundant => $params{cpqHeFltTolFanRedundant},
+ cpqHeFltTolFanRedundantPartner => $params{cpqHeFltTolFanRedundantPartner},
+ cpqHeFltTolFanCondition => $params{cpqHeFltTolFanCondition},
+ cpqHeFltTolFanPctMax => $params{cpqHeFltTolFanPctMax}, #!!!
+ cpqHeFltTolFanHotPlug => $params{cpqHeFltTolFanHotPlug}, #!!!
+ partner => $params{partner},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ if (($self->{cpqHeFltTolFanRedundant} eq 'redundant') &&
+ ((! defined $self->{cpqHeFltTolFanRedundantPartner}) ||
+ (! $self->{cpqHeFltTolFanRedundantPartner}))) {
+ $self->{cpqHeFltTolFanRedundant} = 'notRedundant';
+ # cpqHeFltTolFanRedundantPartner=0: partner not avail
+ }
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('f', $self->{cpqHeFltTolFanIndex});
+ $self->add_info(sprintf 'fan %d is %s, speed is %s, pctmax is %s%%, '.
+ 'location is %s, redundance is %s, partner is %s',
+ $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanPresent},
+ $self->{cpqHeFltTolFanSpeed}, $self->{cpqHeFltTolFanPctMax},
+ $self->{cpqHeFltTolFanLocale}, $self->{cpqHeFltTolFanRedundant},
+ $self->{cpqHeFltTolFanRedundantPartner});
+ $self->add_extendedinfo(sprintf 'fan_%s=%d%%',
+ $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanPctMax});
+ if ($self->{cpqHeFltTolFanPresent} eq 'present') {
+ if ($self->{cpqHeFltTolFanSpeed} eq 'high') {
+ $self->add_info(sprintf 'fan %d (%s) runs at high speed',
+ $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanLocale});
+ $self->add_message(CRITICAL, $self->{info});
+ } elsif ($self->{cpqHeFltTolFanSpeed} ne 'normal') {
+ $self->add_info(sprintf 'fan %d (%s) needs attention',
+ $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanLocale});
+ $self->add_message(CRITICAL, $self->{info});
+ }
+ if ($self->{cpqHeFltTolFanCondition} eq 'failed') {
+ $self->add_info(sprintf 'fan %d (%s) failed',
+ $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanLocale});
+ $self->add_message(CRITICAL, $self->{info});
+ } elsif ($self->{cpqHeFltTolFanCondition} eq 'degraded') {
+ $self->add_info(sprintf 'fan %d (%s) degraded',
+ $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanLocale});
+ $self->add_message(WARNING, $self->{info});
+ } elsif ($self->{cpqHeFltTolFanCondition} ne 'ok' &&
+ $self->{cpqHeFltTolFanCondition} ne 'other') {
+ $self->add_info(sprintf 'fan %d (%s) is not ok',
+ $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanLocale});
+ $self->add_message(WARNING, $self->{info});
+ }
+ if ($self->{cpqHeFltTolFanRedundant} eq 'notRedundant') {
+ # sieht so aus, als waere notRedundant und partner=0 normal z.b. dl360
+ # das duerfte der fall sein, wenn nur eine cpu verbaut wurde und
+ # statt einem redundanten paar nur dummies drinstecken.
+ # "This specifies if the fan is in a redundant configuration"
+ # notRedundant heisst also sowohl nicht redundant wegen ausfall
+ # des partners als auch von haus aus nicht redundant ausgelegt
+ if ($self->{cpqHeFltTolFanRedundantPartner}) {
+ # nicht redundant, hat aber einen partner. da muss man genauer
+ # hinschauen
+ #if (my $partner = $self->{partner}) {
+ #}
+ if ($self->{overallhealth}) {
+ # da ist sogar das system der meinung, dass etwas faul ist
+ if (! $self->{runtime}->{options}->{ignore_fan_redundancy}) {
+ $self->add_info(sprintf 'fan %d (%s) is not redundant',
+ $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanLocale});
+ $self->add_message(WARNING, $self->{info});
+ }
+ } else {
+ # das ist wohl so gewollt, dass einzelne fans eingebaut werden,
+ # obwohl redundante paerchen vorgesehen sind.
+ # scheint davon abzuhaengen, wieviele cpus geordert wurden.
+ }
+ }
+ } elsif ($self->{cpqHeFltTolFanRedundant} eq 'other') {
+ #seen on a dl320 g5p with bios from 2008.
+ # maybe redundancy is not supported at all
+ }
+ } elsif ($self->{cpqHeFltTolFanPresent} eq 'failed') { # from cli
+ $self->add_info(sprintf 'fan %d (%s) failed',
+ $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanLocale});
+ $self->add_message(CRITICAL, $self->{info});
+ } elsif ($self->{cpqHeFltTolFanPresent} eq 'absent') {
+ $self->add_info(sprintf 'fan %d (%s) needs attention (is absent)',
+ $self->{cpqHeFltTolFanIndex}, $self->{cpqHeFltTolFanLocale});
+ # weiss nicht, ob absent auch kaputt bedeuten kann
+ # wenn nicht, dann wuerde man sich hier dumm und daemlich blacklisten
+ #$self->add_message(CRITICAL, $self->{info});
+ $self->add_message(WARNING, $self->{info}) if $self->{overallhealth};
+ }
+ if ($self->{runtime}->{options}->{perfdata}) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => sprintf('fan_%s', $self->{cpqHeFltTolFanIndex}),
+ value => $self->{cpqHeFltTolFanPctMax},
+ uom => '%',
+ );
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[FAN_%s]\n", $self->{cpqHeFltTolFanIndex};
+ foreach (qw(cpqHeFltTolFanChassis cpqHeFltTolFanIndex cpqHeFltTolFanLocale
+ cpqHeFltTolFanPresent cpqHeFltTolFanType cpqHeFltTolFanSpeed
+ cpqHeFltTolFanRedundant cpqHeFltTolFanRedundantPartner
+ cpqHeFltTolFanCondition cpqHeFltTolFanHotPlug)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "info: %s\n", $self->{info};
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::FanSubsystem::Fan::Thermal;
+our @ISA = qw(HP::Proliant::Component::FanSubsystem::Fan);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqHeThermalFanIndex => $params{cpqHeThermalFanIndex},
+ cpqHeThermalFanRequired => $params{cpqHeThermalFanRequired},
+ cpqHeThermalFanPresent => $params{cpqHeThermalFanPresent},
+ cpqHeThermalFanCpuFan => $params{cpqHeThermalFanCpuFan},
+ cpqHeThermalFanStatus => $params{cpqHeThermalFanStatus},
+ cpqHeThermalFanHwLocation => $params{cpqHeThermalFanHwLocation},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+}
+
+sub dump {
+ my $self = shift;
+ printf "[FAN_%s]\n", $self->{cpqHeThermalFanIndex};
+ foreach (qw(cpqHeThermalFanIndex cpqHeThermalFanRequired
+ cpqHeThermalFanPresent cpqHeThermalFanCpuFan cpqHeThermalFanStatus
+ cpqHeThermalFanHwLocation)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "info: %s\n", $self->{info};
+ printf "\n";
+}
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/FanSubsystem/CLI.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/FanSubsystem/CLI.pm
new file mode 100755
index 0000000..f82c770
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/FanSubsystem/CLI.pm
@@ -0,0 +1,101 @@
+package HP::Proliant::Component::FanSubsystem::CLI;
+our @ISA = qw(HP::Proliant::Component::FanSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ fans => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init(%params);
+ return $self;
+}
+
+# partner not available = cpqHeFltTolFanRedundantPartner=0
+# cpqHeFltTolFanTypeValue = other
+sub init {
+ my $self = shift;
+ my %params = @_;
+ my %tmpfan = ();
+ foreach (grep(/^fans/, split(/\n/, $self->{rawdata}))) {
+ s/^fans //g;
+ if (/^#(\d+)\s+([\w#_\/\-]+)\s+(\w+)\s+(\w+)\s+(FAILED|[N\/A\d]+)%*\s+([\w\/]+)\s+(FAILED|[N\/A\d]+)\s+(\w+)/) {
+ %tmpfan = (
+ cpqHeFltTolFanIndex => $1,
+ cpqHeFltTolFanLocale => lc $2,
+ cpqHeFltTolFanPresent => lc $3,
+ cpqHeFltTolFanSpeed => lc $4,
+ cpqHeFltTolFanPctMax => lc $5, # (FAILED|[N\/A\d]+)
+ cpqHeFltTolFanRedundant => lc $6,
+ cpqHeFltTolFanRedundantPartner => lc $7, # (FAILED|[N\/A\d]+)
+ cpqHeFltTolFanHotPlug => lc $8,
+ );
+ } elsif (/^#(\d+)\s+([\w#_\/\-]+?)(Yes|No|N\/A)\s+(\w+)\s+(FAILED|[N\/A\d]+)%*\s+([\w\/]+)\s+(FAILED|[N\/A\d]+)\s+(\w+)/) {
+ # #5 SCSI_BACKPLANE_ZONEYes NORMAL N/A ....
+ %tmpfan = (
+ cpqHeFltTolFanIndex => $1,
+ cpqHeFltTolFanLocale => lc $2,
+ cpqHeFltTolFanPresent => lc $3,
+ cpqHeFltTolFanSpeed => lc $4,
+ cpqHeFltTolFanPctMax => lc $5,
+ cpqHeFltTolFanRedundant => lc $6,
+ cpqHeFltTolFanRedundantPartner => lc $7,
+ cpqHeFltTolFanHotPlug => lc $8,
+ );
+ } elsif (/^#(\d+)\s+([\w#_\/\-]+)\s+[NOno]+\s/) {
+ # Fan is not installed. #2 CPU#2 No - - No N/A -
+ } elsif (/^#(\d+)/) {
+ main::contact_author("FAN", $_);
+ }
+ if (%tmpfan) {
+ $tmpfan{runtime} = $params{runtime};
+ $tmpfan{cpqHeFltTolFanChassis} = 1; # geht aus hpasmcli nicht hervor
+ $tmpfan{cpqHeFltTolFanType} = 'other';
+ if ($tmpfan{cpqHeFltTolFanPctMax} !~ /^\d+$/) {
+ if ($tmpfan{cpqHeFltTolFanSpeed} eq 'normal') {
+ $tmpfan{cpqHeFltTolFanPctMax} = 50;
+ } elsif ($tmpfan{cpqHeFltTolFanSpeed} eq 'high') {
+ $tmpfan{cpqHeFltTolFanPctMax} = 100;
+ } else {
+ $tmpfan{cpqHeFltTolFanPctMax} = 0;
+ }
+ }
+ if($tmpfan{cpqHeFltTolFanSpeed} eq 'failed') {
+ $tmpfan{cpqHeFltTolFanCondition} = 'failed';
+ } elsif($tmpfan{cpqHeFltTolFanSpeed} eq 'n/a') {
+ $tmpfan{cpqHeFltTolFanCondition} = 'other';
+ } else {
+ $tmpfan{cpqHeFltTolFanCondition} = 'ok';
+ }
+ $tmpfan{cpqHeFltTolFanRedundant} =
+ $tmpfan{cpqHeFltTolFanRedundant} eq 'yes' ? 'redundant' :
+ $tmpfan{cpqHeFltTolFanRedundant} eq 'no' ? 'notRedundant' : 'other';
+ $tmpfan{cpqHeFltTolFanPresent} =
+ $tmpfan{cpqHeFltTolFanPresent} eq 'yes' ? 'present' :
+ $tmpfan{cpqHeFltTolFanPresent} eq 'failed' ? 'present' :
+ $tmpfan{cpqHeFltTolFanPresent} eq 'no' ? 'absent' : 'other';
+ $tmpfan{cpqHeFltTolFanHotPlug} =
+ $tmpfan{cpqHeFltTolFanHotPlug} eq 'yes' ? 'hotPluggable' :
+ $tmpfan{cpqHeFltTolFanHotPlug} eq 'no' ? 'nonHotPluggable' : 'other';
+ push(@{$self->{fans}},
+ HP::Proliant::Component::FanSubsystem::Fan->new(%tmpfan));
+ %tmpfan = ();
+ }
+ }
+}
+
+sub overall_check {
+ my $self = shift;
+ # nix. nur wegen der gleichheit mit snmp
+ return 0;
+}
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/FanSubsystem/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/FanSubsystem/SNMP.pm
new file mode 100755
index 0000000..82bd180
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/FanSubsystem/SNMP.pm
@@ -0,0 +1,231 @@
+package HP::Proliant::Component::FanSubsystem::SNMP;
+our @ISA = qw(HP::Proliant::Component::FanSubsystem
+ HP::Proliant::Component::SNMP);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ fans => [],
+ he_fans => [],
+ th_fans => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->overall_init(%params);
+ $self->he_init(%params);
+ $self->te_init(%params);
+ $self->unite();
+ return $self;
+}
+
+sub overall_init {
+ my $self = shift;
+ my %params = @_;
+ my $snmpwalk = $params{rawdata};
+ # overall
+ my $cpqHeThermalSystemFanStatus = '1.3.6.1.4.1.232.6.2.6.4.0';
+ my $cpqHeThermalSystemFanStatusValue = {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ };
+ my $cpqHeThermalCpuFanStatus = '1.3.6.1.4.1.232.6.2.6.5.0';
+ my $cpqHeThermalCpuFanStatusValue = {
+ 1 => 'other',
+ 2 => 'ok',
+ 4 => 'failed', # shutdown
+ };
+ $self->{sysstatus} = SNMP::Utils::get_object_value(
+ $snmpwalk, $cpqHeThermalSystemFanStatus,
+ $cpqHeThermalSystemFanStatusValue);
+ $self->{cpustatus} = SNMP::Utils::get_object_value(
+ $snmpwalk, $cpqHeThermalCpuFanStatus,
+ $cpqHeThermalCpuFanStatusValue);
+ $self->{sysstatus} |= lc $self->{sysstatus};
+ $self->{cpustatus} |= lc $self->{cpustatus};
+}
+
+sub te_init {
+ my $self = shift;
+ my %params = @_;
+ my $snmpwalk = $params{rawdata};
+ my $ignore_redundancy = $params{ignore_redundancy};
+ # cpqHeThermalFanTable
+ my $oids = {
+ cpqHeThermalFanEntry => '1.3.6.1.4.1.232.6.2.6.6.1',
+ cpqHeThermalFanIndex => '1.3.6.1.4.1.232.6.2.6.6.1.1',
+ cpqHeThermalFanRequired => '1.3.6.1.4.1.232.6.2.6.6.1.2',
+ cpqHeThermalFanPresent => '1.3.6.1.4.1.232.6.2.6.6.1.3',
+ cpqHeThermalFanCpuFan => '1.3.6.1.4.1.232.6.2.6.6.1.4',
+ cpqHeThermalFanStatus => '1.3.6.1.4.1.232.6.2.6.6.1.5',
+ cpqHeThermalFanHwLocation => '1.3.6.1.4.1.232.6.2.6.6.1.6',
+ cpqHeThermalFanRequiredValue => {
+ 1 => 'other',
+ 2 => 'nonRequired',
+ 3 => 'required',
+ },
+ cpqHeThermalFanPresentValue => {
+ 1 => 'other',
+ 2 => 'absent',
+ 3 => 'present',
+ },
+ cpqHeThermalFanCpuFanValue => {
+ 1 => 'other',
+ 2 => 'systemFan',
+ 3 => 'cpuFan',
+ },
+ cpqHeThermalFanStatusValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 4 => 'failed',
+ },
+ };
+ # INDEX { cpqHeThermalFanIndex }
+ foreach ($self->get_entries($oids, 'cpqHeThermalFanEntry')) {
+ next if ! $_->{cpqHeThermalFanPresent};
+ push(@{$self->{th_fans}},
+ HP::Proliant::Component::FanSubsystem::Fan->new(%{$_}));
+ }
+}
+
+sub he_init {
+ my $self = shift;
+ my %params = @_;
+ my $snmpwalk = $params{rawdata};
+ my $ignore_redundancy = $params{ignore_redundancy};
+ # cpqHeFltTolFanTable
+ my $oids = {
+ cpqHeFltTolFanEntry => '1.3.6.1.4.1.232.6.2.6.7.1',
+ cpqHeFltTolFanChassis => '1.3.6.1.4.1.232.6.2.6.7.1.1',
+ cpqHeFltTolFanIndex => '1.3.6.1.4.1.232.6.2.6.7.1.2',
+ cpqHeFltTolFanLocale => '1.3.6.1.4.1.232.6.2.6.7.1.3',
+ cpqHeFltTolFanPresent => '1.3.6.1.4.1.232.6.2.6.7.1.4',
+ cpqHeFltTolFanType => '1.3.6.1.4.1.232.6.2.6.7.1.5',
+ cpqHeFltTolFanSpeed => '1.3.6.1.4.1.232.6.2.6.7.1.6',
+ cpqHeFltTolFanRedundant => '1.3.6.1.4.1.232.6.2.6.7.1.7',
+ cpqHeFltTolFanRedundantPartner => '1.3.6.1.4.1.232.6.2.6.7.1.8',
+ cpqHeFltTolFanCondition => '1.3.6.1.4.1.232.6.2.6.7.1.9',
+ cpqHeFltTolFanHotPlug => '1.3.6.1.4.1.232.6.2.6.7.1.10',
+ cpqHeFltTolFanHwLocation => '1.3.6.1.4.1.232.6.2.6.7.1.11',
+ cpqHeFltTolFanCurrentSpeed => '1.3.6.1.4.1.232.6.2.6.7.1.12',
+ cpqHeFltTolFanLocaleValue => {
+ 1 => "other",
+ 2 => "unknown",
+ 3 => "system",
+ 4 => "systemBoard",
+ 5 => "ioBoard",
+ 6 => "cpu",
+ 7 => "memory",
+ 8 => "storage",
+ 9 => "removableMedia",
+ 10 => "powerSupply",
+ 11 => "ambient",
+ 12 => "chassis",
+ 13 => "bridgeCard",
+ },
+ cpqHeFltTolFanPresentValue => {
+ 1 => "other",
+ 2 => "absent",
+ 3 => "present",
+ },
+ cpqHeFltTolFanSpeedValue => {
+ 1 => "other",
+ 2 => "normal",
+ 3 => "high",
+ },
+ cpqHeFltTolFanRedundantValue => {
+ 1 => "other",
+ 2 => "notRedundant",
+ 3 => "redundant",
+ },
+ cpqHeFltTolFanTypeValue => {
+ 1 => "other",
+ 2 => "tachInput",
+ 3 => "spinDetect",
+ },
+ cpqHeFltTolFanConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqHeFltTolFanHotPlugValue => {
+ 1 => "other",
+ 2 => "nonHotPluggable",
+ 3 => "hotPluggable",
+ },
+ };
+ # INDEX { cpqHeFltTolFanChassis, cpqHeFltTolFanIndex }
+ foreach ($self->get_entries($oids, 'cpqHeFltTolFanEntry')) {
+ next if ! defined $_->{cpqHeFltTolFanIndex};
+ # z.b. USM65201WS hat nur solche fragmente. die werden erst gar nicht
+ # als fans akzeptiert. dafuer gibts dann die overall condition
+ # SNMPv2-SMI::enterprises.232.6.2.6.7.1.1.0.1 = INTEGER: 0
+ # SNMPv2-SMI::enterprises.232.6.2.6.7.1.1.0.2 = INTEGER: 0
+ $_->{cpqHeFltTolFanPctMax} = ($_->{cpqHeFltTolFanPresent} eq 'present') ?
+ 50 : 0;
+ push(@{$self->{he_fans}},
+ HP::Proliant::Component::FanSubsystem::Fan->new(%{$_}));
+ }
+
+}
+
+sub unite {
+ my $self = shift;
+ my $tmpfans = {};
+ foreach (@{$self->{he_fans}}) {
+ $tmpfans->{$_->{cpqHeFltTolFanIndex}} = $_;
+ }
+ foreach (@{$self->{he_fans}}) {
+ if (exists $tmpfans->{$_->{cpqHeFltTolFanRedundantPartner}}) {
+ $_->{partner} = $tmpfans->{$_->{cpqHeFltTolFanRedundantPartner}};
+ } else {
+ $_->{partner} = undef;
+ }
+ }
+ @{$self->{fans}} = @{$self->{he_fans}};
+}
+
+sub overall_check {
+ my $self = shift;
+ my $result = 0;
+ $self->blacklist('ofs', '');
+ if ($self->{sysstatus} && $self->{cpustatus}) {
+ if ($self->{sysstatus} eq 'degraded') {
+ $result = 1;
+ $self->add_message(WARNING,
+ sprintf 'system fan overall status is %s', $self->{sysstatus});
+ } elsif ($self->{sysstatus} eq 'failed') {
+ $result = 2;
+ $self->add_message(CRITICAL,
+ sprintf 'system fan overall status is %s', $self->{sysstatus});
+ }
+ if ($self->{cpustatus} eq 'degraded') {
+ $result = 1;
+ $self->add_message(WARNING,
+ sprintf 'cpu fan overall status is %s', $self->{cpustatus});
+ } elsif ($self->{cpustatus} eq 'failed') {
+ $result = 2;
+ $self->add_message(CRITICAL,
+ sprintf 'cpu fan overall status is %s', $self->{cpustatus});
+ }
+ $self->add_info(sprintf 'overall fan status: system=%s, cpu=%s',
+ $self->{sysstatus}, $self->{cpustatus});
+ } else {
+ $result = 0;
+ $self->add_info('this system seems to be water-cooled. no fans found');
+ }
+ return $result;
+}
+
+1;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/MemorySubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/MemorySubsystem.pm
new file mode 100755
index 0000000..17a49ea
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/MemorySubsystem.pm
@@ -0,0 +1,197 @@
+package HP::Proliant::Component::MemorySubsystem;
+our @ISA = qw(HP::Proliant::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ condition => $params{condition},
+ status => $params{status},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ dimms => [],
+ };
+ bless $self, $class;
+ if ($self->{method} eq 'snmp') {
+ return HP::Proliant::Component::MemorySubsystem::SNMP->new(%params);
+ } elsif ($self->{method} eq 'cli') {
+ return HP::Proliant::Component::MemorySubsystem::CLI->new(%params);
+ } else {
+ die "unknown method";
+ }
+}
+
+sub check {
+ my $self = shift;
+ my $errorfound = 0;
+ $self->add_info('checking memory');
+ foreach (@{$self->{dimms}}) {
+ $_->check(); # info ausfuellen
+ }
+ if ((scalar(grep {
+ $_->is_present() &&
+ ($_->{condition} ne 'n/a' && $_->{condition} ne 'other' )
+ } @{$self->{dimms}})) != 0) {
+ foreach (@{$self->{dimms}}) {
+ if (($_->is_present()) && ($_->{condition} ne 'ok')) {
+ $_->add_message(CRITICAL, $_->{info});
+ $errorfound++;
+ }
+ }
+ } else {
+ if ($self->{runtime}->{options}->{ignore_dimms}) {
+ $self->add_message(OK,
+ sprintf "ignoring %d dimms with status 'n/a' ",
+ scalar(grep { ($_->is_present()) } @{$self->{dimms}}));
+ } elsif ($self->{runtime}->{options}->{buggy_firmware}) {
+ $self->add_message(OK,
+ sprintf "ignoring %d dimms with status 'n/a' because of buggy firmware",
+ scalar(grep { ($_->is_present()) } @{$self->{dimms}}));
+ } else {
+ $self->add_message(WARNING,
+ sprintf "status of all %d dimms is n/a (please upgrade firmware)",
+ scalar(grep { $_->is_present() } @{$self->{dimms}}));
+ $errorfound++;
+ }
+ }
+ foreach (@{$self->{dimms}}) {
+ printf "%s\n", $_->{info} if $self->{runtime}->{options}->{verbose} >= 2;
+ }
+ if (! $errorfound && $self->is_faulty()) {
+ #if ($self->is_faulty()) {
+ $self->add_message(WARNING,
+ sprintf 'overall memory error found');
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "i dump the memory\n";
+ foreach (@{$self->{dimms}}) {
+ $_->dump();
+ }
+}
+
+package HP::Proliant::Component::MemorySubsystem::Dimm;
+our @ISA = qw(HP::Proliant::Component::MemorySubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cartridge => $params{cartridge},
+ module => $params{module},
+ size => $params{size} || 0,
+ status => $params{status},
+ condition => $params{condition},
+ type => $params{type},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->{name} = sprintf '%s:%s',
+ $self->{cartridge}, $self->{module};
+ $self->{location} = sprintf 'module %s @ cartridge %s',
+ $self->{module}, $self->{cartridge};
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ # check dient nur dazu, info und extended_info zu fuellen
+ # die eigentliche bewertung findet eins hoeher statt
+ $self->blacklist('d', $self->{name});
+ if (($self->{status} eq 'present') || ($self->{status} eq 'good')) {
+ if ($self->{condition} eq 'other') {
+ $self->add_info(sprintf 'dimm %s (%s) is n/a',
+ $self->{name}, $self->{location});
+ } elsif ($self->{condition} ne 'ok') {
+ $self->add_info(
+ sprintf "dimm module %s (%s) needs attention (%s)",
+ $self->{name}, $self->{location}, $self->{condition});
+ } else {
+ $self->add_info(sprintf 'dimm module %s (%s) is %s',
+ $self->{name}, $self->{location}, $self->{condition});
+ }
+ } elsif ($self->{status} eq 'notPresent') {
+ $self->add_info(sprintf 'dimm module %s (%s) is not present',
+ $self->{name}, $self->{location});
+ } else {
+ $self->add_info(
+ sprintf "dimm module %s (%s) needs attention (%s)",
+ $self->{name}, $self->{location}, $self->{condition});
+ }
+}
+
+sub is_present {
+ my $self = shift;
+ my @signs_of_presence = (qw(present good add upgraded doesnotmatch
+ notsupported badconfig degraded));
+ return scalar(grep { $self->{status} eq $_ } @signs_of_presence);
+}
+
+
+sub dump {
+ my $self = shift;
+ #printf "[DIMM_%s_%s]\n", $self->{cartridge}, $self->{module};
+ #foreach (qw(cartridge module size status condition info)) {
+ # printf "%s: %s\n", $_, $self->{$_};
+ #}
+ #printf "status: %s\n", $self->{status} if exists $self->{status};
+ #printf "\n";
+ printf "car %02d mod %02d siz %.0f sta %-12s con %-10s typ %s\n",
+ $self->{cartridge}, $self->{module}, $self->{size},
+ $self->{status}, $self->{condition}, defined $self->{type} ? $self->{type} : "";
+}
+
+
+package HP::Proliant::Component::MemorySubsystem::Cartridge;
+our @ISA = qw(HP::Proliant::Component::MemorySubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ cpqHeResMemBoardSlotIndex => $params{cpqHeResMemBoardSlotIndex},
+ cpqHeResMemBoardOnlineStatus => $params{cpqHeResMemBoardOnlineStatus},
+ cpqHeResMemBoardErrorStatus => $params{cpqHeResMemBoardErrorStatus},
+ cpqHeResMemBoardNumSockets => $params{cpqHeResMemBoardNumSockets},
+ cpqHeResMemBoardOsMemSize => $params{cpqHeResMemBoardOsMemSize},
+ cpqHeResMemBoardTotalMemSize => $params{cpqHeResMemBoardTotalMemSize},
+ cpqHeResMemBoardCondition => $params{cpqHeResMemBoardCondition},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub dump {
+ my $self = shift;
+ #printf "[CARTRIDGE_%s_%s]\n", $self->{cpqHeResMemBoardSlotIndex};
+ #foreach (qw(cpqHeResMemBoardSlotIndex cpqHeResMemBoardOnlineStatus
+ # cpqHeResMemBoardErrorStatus cpqHeResMemBoardNumSockets
+ # cpqHeResMemBoardOsMemSize cpqHeResMemBoardTotalMemSize
+ # cpqHeResMemBoardCondition)) {
+ # printf "%s: %s\n", $_, $self->{$_};
+ #}
+ #printf "\n";
+}
+
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/MemorySubsystem/CLI.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/MemorySubsystem/CLI.pm
new file mode 100755
index 0000000..f53d77f
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/MemorySubsystem/CLI.pm
@@ -0,0 +1,87 @@
+package HP::Proliant::Component::MemorySubsystem::CLI;
+our @ISA = qw(HP::Proliant::Component::MemorySubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ dimms => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init(%params);
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ $self->{dimms} = [];
+ my %tmpdimm = (
+ runtime => $params{runtime},
+ );
+ my $inblock = 0;
+ foreach (grep(/^dimm/, split(/\n/, $self->{rawdata}))) {
+ s/^dimm\s*$//g;
+ if (/Cartridge #:\s+(\d+)/ || /Processor #:\s+(\d+)/) {
+ # neuerdings (g6) tauchen hier prozessor- statt cartridge-angaben auf
+ $tmpdimm{cartridge} = $1;
+ $tmpdimm{board} = $1;
+ $inblock = 1;
+ } elsif (/Module #:\s+(\d+)/) {
+ $tmpdimm{module} = $1;
+ } elsif (/Present:\s+(\w+)/) {
+ $tmpdimm{status} = lc $1 eq 'yes' ? 'present' :
+ lc $1 eq 'no' ? 'notPresent' : 'other';
+ } elsif (/Status:\s+(.+?)\s*$/) {
+ $tmpdimm{condition} = lc $1 =~ /degraded/ ? 'degraded' :
+ lc $1 eq 'ok' ? 'ok' : lc $1 =~ /n\/a/ ? 'n/a' : 'other';
+ } elsif (/Size:\s+(\d+)\s*(.+?)\s*$/) {
+ $tmpdimm{size} = $1 * (lc $2 eq 'mb' ? 1024*1024 :
+ lc $2 eq 'gb' ? 1024*1024*1024 : 1);
+ } elsif (/^\s*$/) {
+ if ($inblock) {
+ $inblock = 0;
+ push(@{$self->{dimms}},
+ HP::Proliant::Component::MemorySubsystem::Dimm->new(%tmpdimm));
+ %tmpdimm = (
+ runtime => $params{runtime},
+ );
+ }
+ } elsif (/(\d+)\s+(\d+)\s+(\w+)\s+(0x\w+)\s+(0x\w+)\s+(\d+[MGT]B)\s+(\d+MHz)\s+(\w+)/) {
+ $tmpdimm{cartridge} = $1;
+ $tmpdimm{module} = $2;
+ $tmpdimm{status} = lc $3 eq 'yes' ? 'present' :
+ lc $3 eq 'no' ? 'notPresent' : 'other';
+ my $formfactor = $4;
+ my $memorytype = $5;
+ my $memorysize = $6;
+ my $memoryspeed = $7;
+ $tmpdimm{condition} = lc $8 =~ /degraded/ ? 'degraded' :
+ lc $8 eq 'ok' ? 'ok' : lc $8 =~ /n\/a/ ? 'n/a' : 'other';
+ $memorysize =~ /(\d+)([MGT]B)/;
+ $tmpdimm{size} = $1 * (lc $2 eq 'mb' ? 1024*1024 :
+ lc $2 eq 'gb' ? 1024*1024*1024 : 1);
+ push(@{$self->{dimms}},
+ HP::Proliant::Component::MemorySubsystem::Dimm->new(%tmpdimm));
+ }
+ }
+ if ($inblock) {
+ push(@{$self->{dimms}},
+ HP::Proliant::Component::MemorySubsystem::Dimm->new(%tmpdimm));
+ }
+}
+
+sub is_faulty {
+ my $self = shift;
+ return 0; # cli hat so einen globalen status nicht
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/MemorySubsystem/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/MemorySubsystem/SNMP.pm
new file mode 100755
index 0000000..410a858
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/MemorySubsystem/SNMP.pm
@@ -0,0 +1,746 @@
+package HP::Proliant::Component::MemorySubsystem::SNMP;
+our @ISA = qw(HP::Proliant::Component::MemorySubsystem
+ HP::Proliant::Component::SNMP);
+
+use strict;
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ dimms => [],
+ si_dimms => [],
+ he_dimms => [],
+ h2_dimms => [],
+ he_cartridges => [],
+ h2_cartridges => [],
+ si_overall_condition => undef,
+ he_overall_condition => undef,
+ h2_overall_condition => undef,
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->si_init();
+ $self->he_init();
+ $self->he_cartridge_init();
+ $self->h2_init();
+ #$self->h2_cartridge_init();
+ $self->condense();
+ return $self;
+}
+
+sub si_init {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+ my $oids = {
+ cpqSiMemModuleEntry => '1.3.6.1.4.1.232.2.2.4.5.1',
+ cpqSiMemBoardIndex => '1.3.6.1.4.1.232.2.2.4.5.1.1',
+ cpqSiMemModuleIndex => '1.3.6.1.4.1.232.2.2.4.5.1.2',
+ cpqSiMemModuleSize => '1.3.6.1.4.1.232.2.2.4.5.1.3',
+ cpqSiMemModuleType => '1.3.6.1.4.1.232.2.2.4.5.1.4',
+ cpqSiMemECCStatus => '1.3.6.1.4.1.232.2.2.4.5.1.11',
+ cpqSiMemModuleHwLocation => '1.3.6.1.4.1.232.2.2.4.5.1.12',
+ cpqSiMemModuleTypeValue => {
+ 1 => 'other',
+ 2 => 'board',
+ 3 => 'cpqSingleWidthModule',
+ 4 => 'cpqDoubleWidthModule',
+ 5 => 'simm',
+ 6 => 'pcmcia',
+ 7 => 'compaq-specific',
+ 8 => 'dimm',
+ 9 => 'smallOutlineDimm',
+ 10 => 'rimm',
+ 11 => 'srimm',
+ },
+ cpqSiMemECCStatusValue => {
+ 0 => "n/a",
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "degradedModuleIndexUnknown",
+ 34 => 'n/a', # es ist zum kotzen...
+ 104 => 'n/a',
+ },
+ };
+ # INDEX { cpqSiMemBoardIndex, cpqSiMemModuleIndex }
+ foreach ($self->get_entries($oids, 'cpqSiMemModuleEntry')) {
+ $_->{cartridge} = $_->{cpqSiMemBoardIndex};
+ $_->{module} = $_->{cpqSiMemModuleIndex};
+ next if (! defined $_->{cartridge} || ! defined $_->{module});
+ $_->{size} = $_->{cpqSiMemModuleSize};
+ $_->{type} = $_->{cpqSiMemModuleType};
+ $_->{condition} = $_->{cpqSiMemECCStatus};
+ $_->{status} = ($_->{cpqSiMemModuleSize} > 0) ? 'present' : 'notPresent';
+ push(@{$self->{si_dimms}},
+ HP::Proliant::Component::MemorySubsystem::Dimm->new(%{$_})
+ );
+ }
+ my $cpqSiMemECCCondition = '1.3.6.1.4.1.232.2.2.4.15.0';
+ my $cpqSiMemECCConditionValue = {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ };
+ $self->{si_overall_condition} = SNMP::Utils::get_object_value(
+ $self->{rawdata}, $cpqSiMemECCCondition,
+ $cpqSiMemECCConditionValue);
+ $self->trace(2, sprintf 'overall si condition is %s',
+ $self->{si_overall_condition} || 'undefined');
+}
+
+sub he_init {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+ my $oids = {
+ cpqHeResMemModuleEntry => '1.3.6.1.4.1.232.6.2.14.11.1',
+ cpqHeResMemBoardIndex => '1.3.6.1.4.1.232.6.2.14.11.1.1',
+ cpqHeResMemModuleIndex => '1.3.6.1.4.1.232.6.2.14.11.1.2',
+ cpqHeResMemModuleStatus => '1.3.6.1.4.1.232.6.2.14.11.1.4',
+ cpqHeResMemModuleCondition => '1.3.6.1.4.1.232.6.2.14.11.1.5',
+ cpqHeResMemModuleStatusValue => {
+ 1 => "other", # unknown or could not be determined
+ 2 => "notPresent", # not present or un-initialized
+ 3 => "present", # present but not in use
+ 4 => "good", # present and in use. ecc threshold not exceeded
+ 5 => "add", # added but not yet in use
+ 6 => "upgrade", # upgraded but not yet in use
+ 7 => "missing", # expected but missing
+ 8 => "doesNotMatch", # does not match the other modules in the bank
+ 9 => "notSupported", # module not supported
+ 10 => "badConfig", # violates add/upgrade configuration
+ 11 => "degraded", # ecc exceeds threshold
+ },
+ # condition = status of the correctable memory errors
+ cpqHeResMemModuleConditionValue => {
+ 0 => "n/a", # this appears only with buggy firmwares.
+ # (only 1 module shows up)
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ },
+ };
+ my $tablesize = SNMP::Utils::get_size($snmpwalk,
+ $oids->{cpqHeResMemModuleEntry});
+ # INDEX { cpqHeResMemBoardIndex, cpqHeResMemModuleIndex }
+ foreach ($self->get_entries($oids, 'cpqHeResMemModuleEntry')) {
+ $_->{cartridge} = $_->{cpqHeResMemBoardIndex};
+ $_->{module} = $_->{cpqHeResMemModuleIndex};
+ $_->{present} = $_->{cpqHeResMemModuleStatus};
+ $_->{status} = $_->{cpqHeResMemModuleStatus};
+ $_->{condition} = $_->{cpqHeResMemModuleCondition};
+ if ((! defined $_->{module}) && ($_->{cartridge} == 0)) {
+ $_->{module} = $_->{index2}; # auf dem systemboard verbaut
+ }
+
+ push(@{$self->{he_dimms}},
+ HP::Proliant::Component::MemorySubsystem::Dimm->new(%{$_})
+ ) unless (! defined $_->{cartridge} || ! defined $_->{module} ||
+ $tablesize == 1);
+ }
+ my $cpqHeResilientMemCondition = '1.3.6.1.4.1.232.6.2.14.4.0';
+ my $cpqHeResilientMemConditionValue = {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ };
+ $self->{he_overall_condition} = SNMP::Utils::get_object_value(
+ $self->{rawdata}, $cpqHeResilientMemCondition,
+ $cpqHeResilientMemConditionValue);
+ $self->trace(2, sprintf 'overall he condition is %s',
+ $self->{hei_overall_condition} || 'undefined');
+}
+
+sub he_cartridge_init {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+ my $oids = {
+ cpqHeResMemBoardEntry => '1.3.6.1.4.1.232.6.2.14.10.1',
+ cpqHeResMemBoardSlotIndex => '1.3.6.1.4.1.232.6.2.14.10.1.1',
+ cpqHeResMemBoardOnlineStatus => '1.3.6.1.4.1.232.6.2.14.10.1.2',
+ cpqHeResMemBoardErrorStatus => '1.3.6.1.4.1.232.6.2.14.10.1.3',
+ cpqHeResMemBoardNumSockets => '1.3.6.1.4.1.232.6.2.14.10.1.5',
+ cpqHeResMemBoardOsMemSize => '1.3.6.1.4.1.232.6.2.14.10.1.6',
+ cpqHeResMemBoardTotalMemSize => '1.3.6.1.4.1.232.6.2.14.10.1.7',
+ cpqHeResMemBoardCondition => '1.3.6.1.4.1.232.6.2.14.10.1.8',
+ # onlinestatus
+ cpqHeResMemBoardOnlineStatusValue => {
+ 0 => "n/a", # this appears only with buggy firmwares.
+ # (only 1 module shows up)
+ 1 => "other",
+ 2 => "present",
+ 3 => "absent",
+ },
+ cpqHeResMemBoardErrorStatusValue => {
+ 1 => "other", #
+ 2 => "noError", #
+ 3 => "dimmEccError", #
+ 4 => "unlockError", #
+ 5 => "configError", #
+ 6 => "busError", #
+ 7 => "powerError", #
+ },
+ # condition = status of the correctable memory errors
+ cpqHeResMemBoardConditionValue => {
+ 0 => "n/a", # this appears only with buggy firmwares.
+ # (only 1 module shows up)
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ },
+ };
+ my $tablesize = SNMP::Utils::get_size($snmpwalk,
+ $oids->{cpqHeResMemBoardEntry});
+ # INDEX { cpqHeResMemBoardIndex, cpqHeResMemBoardIndex }
+ foreach ($self->get_entries($oids, 'cpqHeResMemBoardEntry')) {
+ push(@{$self->{he_cartridges}},
+ HP::Proliant::Component::MemorySubsystem::Cartridge->new(%{$_})
+ ) unless (! defined $_->{cpqHeResMemBoardSlotIndex} || $tablesize == 1);
+ }
+}
+
+sub h2_init {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+ my $oids = {
+ cpqHeResMem2ModuleEntry => '1.3.6.1.4.1.232.6.2.14.13.1',
+ cpqHeResMem2BoardNum => '1.3.6.1.4.1.232.6.2.14.13.1.2',
+ cpqHeResMem2ModuleNum => '1.3.6.1.4.1.232.6.2.14.13.1.5',
+ cpqHeResMem2ModuleStatus => '1.3.6.1.4.1.232.6.2.14.13.1.19',
+ cpqHeResMem2ModuleCondition => '1.3.6.1.4.1.232.6.2.14.13.1.20',
+ cpqHeResMem2ModuleSize => '1.3.6.1.4.1.232.6.2.14.13.1.6',
+
+ cpqHeResMem2ModuleStatusValue => {
+ 1 => "other", # unknown or could not be determined
+ 2 => "notPresent", # not present or un-initialized
+ 3 => "present", # present but not in use
+ 4 => "good", # present and in use. ecc threshold not exceeded
+ 5 => "add", # added but not yet in use
+ 6 => "upgrade", # upgraded but not yet in use
+ 7 => "missing", # expected but missing
+ 8 => "doesNotMatch", # does not match the other modules in the bank
+ 9 => "notSupported", # module not supported
+ 10 => "badConfig", # violates add/upgrade configuration
+ 11 => "degraded", # ecc exceeds threshold
+ },
+ # condition = status of the correctable memory errors
+ cpqHeResMem2ModuleConditionValue => {
+ 0 => "n/a", # this appears only with buggy firmwares.
+ # (only 1 module shows up)
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ },
+ };
+ # INDEX { cpqHeResMem2ModuleNum }
+ my $lastboard = 0;
+ my $lastmodule = 0;
+ my $myboard= 0;
+ my $hpboard = 0;
+ foreach (sort { $a->{index1} <=> $b->{index1} }
+ $self->get_entries($oids, 'cpqHeResMem2ModuleEntry')) {
+ $hpboard = $_->{cpqHeResMem2BoardNum};
+ # dass hier faelschlicherweise 0 zurueckkommt, wundert mich schon
+ # gar nicht mehr
+ $_->{module} = $_->{cpqHeResMem2ModuleNum};
+ if ($_->{module} < $lastmodule) {
+ # sieht so aus, als haette man es mit einem neuen board zu tun
+ # da hp zu bloed ist, selber hochzuzaehlen, muss ich das tun
+ $myboard++;
+ }
+ $lastmodule = $_->{cpqHeResMem2ModuleNum};
+ $_->{cartridge} = ($myboard != $hpboard) ? $myboard : $hpboard;
+ $_->{present} = $_->{cpqHeResMem2ModuleStatus};
+ $_->{status} = $_->{cpqHeResMem2ModuleStatus};
+ $_->{condition} = $_->{cpqHeResMem2ModuleCondition};
+ $_->{size} = $_->{cpqHeResMem2ModuleSize};
+ push(@{$self->{h2_dimms}},
+ HP::Proliant::Component::MemorySubsystem::Dimm->new(%{$_})
+ ) unless (! defined $_->{cpqHeResMem2BoardNum} ||
+ ! defined $_->{cpqHeResMem2ModuleNum});
+ }
+}
+
+sub h2_cartridge_init {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+ my $oids = {
+ cpqHeResMem2BoardEntry => '1.3.6.1.4.1.232.6.2.14.12.1',
+ cpqHeResMem2BoardIndex => '1.3.6.1.4.1.232.6.2.14.12.1.1',
+ cpqHeResMem2BoardOnlineStatus => '1.3.6.1.4.1.232.6.2.14.12.1.5',
+ cpqHeResMem2BoardErrorStatus => '1.3.6.1.4.1.232.6.2.14.12.1.6',
+ cpqHeResMem2BoardNumSockets => '1.3.6.1.4.1.232.6.2.14.12.1.8',
+ cpqHeResMem2BoardOsMemSize => '1.3.6.1.4.1.232.6.2.14.12.1.9',
+ cpqHeResMem2BoardTotalMemSize => '1.3.6.1.4.1.232.6.2.14.12.1.10',
+ cpqHeResMem2BoardCondition => '1.3.6.1.4.1.232.6.2.14.12.1.11',
+ # onlinestatus
+ cpqHeResMem2BoardOnlineStatusValue => {
+ 0 => "n/a", # this appears only with buggy firmwares.
+ # (only 1 module shows up)
+ 1 => "other",
+ 2 => "present",
+ 3 => "absent",
+ },
+ cpqHeResMem2BoardErrorStatusValue => {
+ 1 => "other", #
+ 2 => "noError", #
+ 3 => "dimmEccError", #
+ 4 => "unlockError", #
+ 5 => "configError", #
+ 6 => "busError", #
+ 7 => "powerError", #
+ },
+ # condition = status of the correctable memory errors
+ cpqHeResMem2BoardConditionValue => {
+ 0 => "n/a", # this appears only with buggy firmwares.
+ # (only 1 module shows up)
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ },
+ };
+ my $tablesize = SNMP::Utils::get_size($snmpwalk,
+ $oids->{cpqHeResMemBoardEntry});
+ # INDEX { cpqHeResMem2BoardIndex, cpqHeResMem2BoardIndex }
+ foreach ($self->get_entries($oids, 'cpqHeResMem2BoardEntry')) {
+ push(@{$self->{h2_cartridges}},
+ HP::Proliant::Component::MemorySubsystem::Cartridge->new(%{$_})
+ ) unless (! defined $_->{cpqHeRes2MemBoardIndex} || $tablesize == 1);
+ }
+}
+
+sub condense {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+ # wenn saemtliche dimms n/a sind
+ # wenn ignore dimms: ignoring %d dimms with status 'n/a'
+ # wenn buggyfirmware: ignoring %d dimms with status 'n/a' because of buggy firmware
+ # if buggy firmware : condition n/a ist normal
+ # ignore-dimms :
+ # es gibt si_dimms und he_dimms
+ my $si_dimms = scalar(@{$self->{si_dimms}});
+ my $he_dimms = scalar(@{$self->{he_dimms}});
+ my $h2_dimms = scalar(@{$self->{h2_dimms}});
+ $self->trace(2, sprintf "SI: %02d HE: %02d H2: %02d",
+ $si_dimms, $he_dimms, $h2_dimms)
+ if ($self->{runtime}->{options}->{verbose} >= 2);
+ foreach ($self->get_si_boards()) {
+ printf "SI%02d-> ", $_ if ($self->{runtime}->{options}->{verbose} >= 2);
+ foreach ($self->get_si_modules($_)) {
+ printf "%02d ", $_ if ($self->{runtime}->{options}->{verbose} >= 2);
+ }
+ printf "\n" if ($self->{runtime}->{options}->{verbose} >= 2);
+ }
+ foreach ($self->get_he_boards()) {
+ printf "HE%02d-> ", $_ if ($self->{runtime}->{options}->{verbose} >= 2);
+ foreach ($self->get_he_modules($_)) {
+ printf "%02d ", $_ if ($self->{runtime}->{options}->{verbose} >= 2);
+ }
+ printf "\n" if ($self->{runtime}->{options}->{verbose} >= 2);
+ }
+ foreach ($self->get_h2_boards()) {
+ printf "H2%02d-> ", $_ if ($self->{runtime}->{options}->{verbose} >= 2);
+ foreach ($self->get_h2_modules($_)) {
+ printf "%02d ", $_ if ($self->{runtime}->{options}->{verbose} >= 2);
+ }
+ printf "\n" if ($self->{runtime}->{options}->{verbose} >= 2);
+ }
+ if (($h2_dimms == 0) && ($he_dimms == 0) && ($si_dimms > 0)) {
+ printf "TYP1 %s\n", $self->{runtime}->{product}
+ if ($self->{runtime}->{options}->{verbose} >= 2);
+ @{$self->{dimms}} = $self->update_si_with_si();
+ } elsif (($h2_dimms == 0) && ($he_dimms > 0) && ($si_dimms > 0)) {
+ printf "TYP2 %s\n", $self->{runtime}->{product}
+ if ($self->{runtime}->{options}->{verbose} >= 2);
+ @{$self->{dimms}} = $self->update_si_with_he();
+ } elsif (($h2_dimms == 0) && ($he_dimms > 0) && ($si_dimms == 0)) {
+ printf "TYP3 %s\n", $self->{runtime}->{product}
+ if ($self->{runtime}->{options}->{verbose} >= 2);
+ @{$self->{dimms}} = $self->update_he_with_he();
+ } elsif (($h2_dimms > 0) && ($he_dimms == 0) && ($si_dimms == 0)) {
+ printf "TYP4 %s\n", $self->{runtime}->{product}
+ if ($self->{runtime}->{options}->{verbose} >= 2);
+ @{$self->{dimms}} = $self->update_h2_with_h2();
+ } elsif (($h2_dimms > 0) && ($he_dimms > 0) && ($si_dimms == 0)) {
+ printf "TYP5 %s\n", $self->{runtime}->{product}
+ if ($self->{runtime}->{options}->{verbose} >= 2);
+ @{$self->{dimms}} = $self->update_he_with_h2();
+ } elsif (($h2_dimms > 0) && ($he_dimms == 0) && ($si_dimms > 0)) {
+ printf "TYP6 %s\n", $self->{runtime}->{product}
+ if ($self->{runtime}->{options}->{verbose} >= 2);
+ @{$self->{dimms}} = $self->update_si_with_h2();
+ } elsif (($h2_dimms > 0) && ($he_dimms > 0) && ($si_dimms > 0)) {
+ if ($h2_dimms > $si_dimms) {
+ printf "TYP7 %s\n", $self->{runtime}->{product}
+ if ($self->{runtime}->{options}->{verbose} >= 2);
+ @{$self->{dimms}} = $self->update_he_with_h2();
+ } else {
+ printf "TYP8 %s\n", $self->{runtime}->{product}
+ if ($self->{runtime}->{options}->{verbose} >= 2);
+ @{$self->{dimms}} = $self->update_si_with_he();
+ }
+ } else {
+ printf "TYPX %s\n", $self->{runtime}->{product}
+ if ($self->{runtime}->{options}->{verbose} >= 2);
+ }
+ my $all_dimms = scalar(@{$self->{dimms}});
+ $self->trace(2, sprintf "ALL: %02d", $all_dimms);
+}
+
+sub dump {
+ my $self = shift;
+ if ($self->{runtime}->{options}->{verbose} > 2) {
+ printf "[SI]\n";
+ foreach (@{$self->{si_dimms}}) {
+ $_->dump();
+ }
+ printf "[HE]\n";
+ foreach (@{$self->{he_dimms}}) {
+ $_->dump();
+ }
+ printf "[H2]\n";
+ foreach (@{$self->{h2_dimms}}) {
+ $_->dump();
+ }
+ }
+ $self->SUPER::dump();
+}
+
+sub update_si_with_si {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+ my @dimms = ();
+ my $repaircondition = undef;
+ # wenn si keine statusinformationen liefert, dann besteht die chance
+ # dass ein undokumentiertes he-fragment vorliegt
+ # 1.3.6.1.4.1.232.6.2.14.11.1.1.0.<anzahl der dimms>
+ my $cpqHeResMemModuleEntry = "1.3.6.1.4.1.232.6.2.14.11.1";
+ if (SNMP::Utils::get_size($snmpwalk, $cpqHeResMemModuleEntry) == 1) {
+ $repaircondition = lc SNMP::Utils::get_object(
+ $snmpwalk, $cpqHeResMemModuleEntry.'.1.0.'.scalar(@{$self->{si_dimms}}));
+ # repaircondition 0 (ok) biegt alles wieder gerade
+ } else {
+ # anderer versuch
+ if ($self->{si_overall_condition} &&
+ $self->{si_overall_condition} eq 'ok') {
+ $repaircondition = 0;
+ }
+ }
+ foreach my $si_dimm (@{$self->{si_dimms}}) {
+ if (($si_dimm->{condition} eq 'n/a') ||
+ ($si_dimm->{condition} eq 'other')) {
+ $si_dimm->{condition} = 'ok' if
+ (defined $repaircondition && $repaircondition == 0);
+ }
+ push(@dimms,
+ HP::Proliant::Component::MemorySubsystem::Dimm->new(
+ runtime => $si_dimm->{runtime},
+ cartridge => $si_dimm->{cartridge},
+ module => $si_dimm->{module},
+ size => $si_dimm->{size},
+ status => $si_dimm->{status},
+ condition => $si_dimm->{condition},
+ ));
+ }
+ return @dimms;
+}
+
+sub update_si_with_he {
+ my $self = shift;
+ my @dimms = ();
+ my $first_si_cartridge = ($self->get_si_boards())[0];
+ my $first_he_cartridge = ($self->get_he_boards())[0];
+ my $offset = 0;
+ if (scalar(@{$self->{si_dimms}}) == scalar(@{$self->{he_dimms}})) {
+ # aufpassen! sowas kann vorkommen: si cartridge 0...6, he cartridge 1...7
+ if ($first_si_cartridge != $first_he_cartridge) {
+ # README case 5
+ $offset = $first_si_cartridge - $first_he_cartridge;
+ }
+ } elsif ((scalar(@{$self->{si_dimms}}) > 1) &&
+ (scalar(@{$self->{he_dimms}}) == 1)) {
+ # siehe update_si_with_si. he-fragment
+ return $self->update_si_with_si();
+ } else {
+ # z.b. 4 si notpresent, 4 si present, 4 he
+ }
+ foreach my $si_dimm (@{$self->{si_dimms}}) {
+ if (($si_dimm->{condition} eq 'n/a') ||
+ ($si_dimm->{condition} eq 'other')) {
+ if (my $he_dimm = $self->get_he_module(
+ $si_dimm->{cartridge} - $offset, $si_dimm->{module})) {
+ # vielleicht hat he mehr ahnung
+ $si_dimm->{condition} = $he_dimm->{condition};
+ if (($si_dimm->{condition} eq 'n/a') ||
+ ($si_dimm->{condition} eq 'other')) {
+ # wenns immer noch kein brauchbares ergebnis gibt....
+ if ($self->{he_overall_condition} &&
+ $self->{he_overall_condition} eq 'ok') {
+ # wird schon stimmen...
+ $si_dimm->{condition} = 'ok';
+ } else {
+ # ansonsten stellen wir uns dumm
+ $si_dimm->{status} = 'notPresent';
+ }
+ }
+ } else {
+ # in dem fall zeigt si unbestueckte cartridges an
+ }
+ }
+ push(@dimms,
+ HP::Proliant::Component::MemorySubsystem::Dimm->new(
+ runtime => $si_dimm->{runtime},
+ cartridge => $si_dimm->{cartridge},
+ module => $si_dimm->{module},
+ size => $si_dimm->{size},
+ status => $si_dimm->{status},
+ condition => $si_dimm->{condition},
+ ));
+ }
+ return @dimms;
+}
+
+sub update_he_with_he {
+ my $self = shift;
+ my @dimms = ();
+ foreach my $he_dimm (@{$self->{he_dimms}}) {
+ push(@dimms,
+ HP::Proliant::Component::MemorySubsystem::Dimm->new(
+ runtime => $he_dimm->{runtime},
+ cartridge => $he_dimm->{cartridge},
+ module => $he_dimm->{module},
+ size => $he_dimm->{size},
+ status => $he_dimm->{status},
+ condition => $he_dimm->{condition},
+ ));
+ }
+ return @dimms;
+}
+
+sub update_si_with_h2 {
+ my $self = shift;
+ my @dimms = ();
+ my $first_si_cartridge = ($self->get_si_boards())[0];
+ my $first_h2_cartridge = ($self->get_h2_boards())[0];
+ my $offset = 0;
+ if (scalar(@{$self->{si_dimms}}) == scalar(@{$self->{h2_dimms}})) {
+ # aufpassen! sowas kann vorkommen: si cartridge 0...6, he cartridge 1...7
+ if ($first_si_cartridge != $first_h2_cartridge) {
+ # README case 5
+ $offset = $first_si_cartridge - $first_h2_cartridge;
+ }
+ } else {
+ # z.b. 4 si notpresent, 4 si present, 4 he
+ }
+ foreach my $si_dimm (@{$self->{si_dimms}}) {
+ if (($si_dimm->{condition} eq 'n/a') ||
+ ($si_dimm->{condition} eq 'other')) {
+ if (my $h2_dimm = $self->get_h2_module(
+ $si_dimm->{cartridge} - $offset, $si_dimm->{module})) {
+ # vielleicht hat h2 mehr ahnung
+ $si_dimm->{condition} = $h2_dimm->{condition};
+ if (1) {
+ # ist zwar da, aber irgendwie auskonfiguriert
+ $si_dimm->{status} = 'notPresent' if $h2_dimm->{status} eq 'other';
+ }
+ } else {
+ # in dem fall zeigt si unbestueckte cartridges an
+ }
+ }
+ push(@dimms,
+ HP::Proliant::Component::MemorySubsystem::Dimm->new(
+ runtime => $si_dimm->{runtime},
+ cartridge => $si_dimm->{cartridge},
+ module => $si_dimm->{module},
+ size => $si_dimm->{size},
+ status => $si_dimm->{status},
+ condition => $si_dimm->{condition},
+ ));
+ }
+ return @dimms;
+}
+
+sub update_he_with_h2 {
+ my $self = shift;
+ my @dimms = ();
+ my $first_he_cartridge = ($self->get_he_boards())[0];
+ my $first_h2_cartridge = ($self->get_h2_boards())[0];
+ my $offset = 0;
+ # auch hier koennte sowas u.u.vorkommen: he cartridge 0..6, h2 cartridge 1..7
+ # ich habs zwar nie gesehen, aber wer weiss...
+ if ($first_h2_cartridge != $first_he_cartridge) {
+ $offset = $first_h2_cartridge - $first_he_cartridge;
+ }
+ foreach my $he_dimm (@{$self->{he_dimms}}) {
+ if (($he_dimm->{condition} eq 'n/a') ||
+ ($he_dimm->{condition} eq 'other')) {
+ if (my $h2_dimm = $self->get_h2_module(
+ $he_dimm->{cartridge} + $offset, $he_dimm->{module})) {
+ # vielleicht hat h2 mehr ahnung
+ $he_dimm->{condition} = $h2_dimm->{condition};
+ if (1) {
+ # ist zwar da, aber irgendwie auskonfiguriert
+ $he_dimm->{status} = 'notPresent' if $h2_dimm->{status} eq 'other';
+ }
+ } else {
+ # in dem fall weiss he mehr als h2
+ }
+ }
+ if ($he_dimm->{size} == 0) {
+ if (my $h2_dimm = $self->get_h2_module(
+ $he_dimm->{cartridge} + $offset, $he_dimm->{module})) {
+ $he_dimm->{size} = $h2_dimm->{size};
+ # h2 beinhaltet eine size-oid
+ }
+ }
+ push(@dimms,
+ HP::Proliant::Component::MemorySubsystem::Dimm->new(
+ runtime => $he_dimm->{runtime},
+ cartridge => $he_dimm->{cartridge},
+ module => $he_dimm->{module},
+ size => $he_dimm->{size},
+ status => $he_dimm->{status},
+ condition => $he_dimm->{condition},
+ ));
+ }
+ return @dimms;
+}
+
+sub update_h2_with_h2 {
+ my $self = shift;
+ my @dimms = ();
+ foreach my $h2_dimm (@{$self->{h2_dimms}}) {
+ push(@dimms,
+ HP::Proliant::Component::MemorySubsystem::Dimm->new(
+ runtime => $h2_dimm->{runtime},
+ cartridge => $h2_dimm->{cartridge},
+ module => $h2_dimm->{module},
+ size => $h2_dimm->{size},
+ status => $h2_dimm->{status},
+ condition => $h2_dimm->{condition},
+ ));
+ }
+ return @dimms;
+}
+
+sub is_faulty {
+ my $self = shift;
+ if (scalar(@{$self->{si_dimms}}) > 0 &&
+ scalar(@{$self->{he_dimms}}) > 0) {
+ return $self->si_is_faulty() || $self->he_is_faulty();
+ } elsif (scalar(@{$self->{si_dimms}}) > 0 &&
+ scalar(@{$self->{he_dimms}}) == 0) {
+ return $self->si_is_faulty();
+ } elsif (scalar(@{$self->{si_dimms}}) == 0 &&
+ scalar(@{$self->{he_dimms}}) > 0) {
+ return $self->he_is_faulty();
+ } else {
+ return 0;
+ }
+}
+
+sub si_is_faulty {
+ my $self = shift;
+ return ! defined $self->{si_overall_condition} ? 0 :
+ $self->{si_overall_condition} eq 'degraded' ? 1 : 0;
+}
+
+sub si_is_ok {
+ my $self = shift;
+ return ! defined $self->{si_overall_condition} ? 1 :
+ $self->{si_overall_condition} eq 'ok' ? 1 : 0;
+}
+
+sub he_is_faulty {
+ my $self = shift;
+ return ! defined $self->{he_overall_condition} ? 0 :
+ $self->{he_overall_condition} eq 'degraded' ? 1 : 0;
+}
+
+sub he_is_ok {
+ my $self = shift;
+ return ! defined $self->{he_overall_condition} ? 1 :
+ $self->{he_overall_condition} eq 'ok' ? 1 : 0;
+}
+
+sub get_si_boards {
+ my $self = shift;
+ my %found = ();
+ foreach (@{$self->{si_dimms}}) {
+ $found{$_->{cartridge}} = 1;
+ }
+ return sort { $a <=> $b } keys %found;
+}
+
+sub get_si_modules {
+ my $self = shift;
+ my $board = shift;
+ my %found = ();
+ foreach (grep { $_->{cartridge} == $board } @{$self->{si_dimms}}) {
+ $found{$_->{module}} = 1;
+ }
+ return sort { $a <=> $b } keys %found;
+}
+
+sub get_he_boards {
+ my $self = shift;
+ my %found = ();
+ foreach (@{$self->{he_dimms}}) {
+ $found{$_->{cartridge}} = 1;
+ }
+ return sort { $a <=> $b } keys %found;
+}
+
+sub get_he_modules {
+ my $self = shift;
+ my $board = shift;
+ my %found = ();
+ foreach (grep { $_->{cartridge} == $board } @{$self->{he_dimms}}) {
+ $found{$_->{module}} = 1;
+ }
+ return sort { $a <=> $b } keys %found;
+}
+
+sub get_he_module {
+ my $self = shift;
+ my $board = shift;
+ my $module = shift;
+ my $found = (grep { $_->{cartridge} == $board && $_->{module} == $module }
+ @{$self->{he_dimms}})[0];
+ return $found;
+}
+
+sub get_h2_boards {
+ my $self = shift;
+ my %found = ();
+ #
+ foreach (@{$self->{h2_dimms}}) {
+ $found{$_->{cartridge}} = 1;
+ }
+ return sort { $a <=> $b } keys %found;
+}
+
+sub get_h2_modules {
+ my $self = shift;
+ my $board = shift;
+ my %found = ();
+ foreach (grep { $_->{cartridge} == $board } @{$self->{h2_dimms}}) {
+ $found{$_->{module}} = 1;
+ }
+ return sort { $a <=> $b } keys %found;
+}
+
+sub get_h2_module {
+ my $self = shift;
+ my $board = shift;
+ my $module = shift;
+ my $found = (grep { $_->{cartridge} == $board && $_->{module} == $module }
+ @{$self->{h2_dimms}})[0];
+ return $found;
+}
+
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/NicSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/NicSubsystem.pm
new file mode 100755
index 0000000..02e5703
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/NicSubsystem.pm
@@ -0,0 +1,202 @@
+package HP::Proliant::Component::NicSubsystem;
+our @ISA = qw(HP::Proliant::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ condition => $params{condition},
+ status => $params{status},
+ logical_nics => [],
+ physical_nics => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ if ($self->{method} eq 'snmp') {
+ return HP::Proliant::Component::NicSubsystem::SNMP->new(%params);
+ } elsif ($self->{method} eq 'cli') {
+ return HP::Proliant::Component::NicSubsystem::CLI->new(%params);
+ } else {
+ die "unknown method";
+ }
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ my $errorfound = 0;
+ $self->add_info('checking nic teams');
+ if (scalar (@{$self->{logical_nics}}) == 0) {
+ $self->add_info('no logical nics found');
+ $self->overall_check();
+ } else {
+ foreach (@{$self->{logical_nics}}) {
+ $_->check();
+ }
+ }
+ if (scalar (@{$self->{physical_nics}}) == 0) {
+ $self->add_info('no physical nics found. do you connect with slip?');
+ } else {
+ foreach (@{$self->{physical_nics}}) {
+ $_->check();
+ }
+ }
+}
+
+sub num_logical_nics {
+ my $self = shift;
+ return scalar @{$self->{logical_nics}};
+}
+
+sub num_physical_nics {
+ my $self = shift;
+ return scalar @{$self->{physical_nics}};
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{logical_nics}}) {
+ $_->dump();
+ }
+ foreach (@{$self->{physical_nics}}) {
+ $_->dump();
+ }
+}
+
+sub overall_check {
+ my $self = shift;
+ if ($self->{lognicstatus} ne "ok") {
+ $self->add_info(sprintf 'overall logical nic status is %s',
+ $self->{lognicstatus});
+ }
+}
+
+
+package HP::Proliant::Component::NicSubsystem::LogicalNic;
+our @ISA = qw(HP::Proliant::Component::NicSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ foreach (qw(cpqNicIfLogMapIndex cpqNicIfLogMapIfNumber cpqNicIfLogMapDescription cpqNicIfLogMapGroupType cpqNicIfLogMapAdapterCount cpqNicIfLogMapAdapterOKCount cpqNicIfLogMapPhysicalAdapters cpqNicIfLogMapSwitchoverMode cpqNicIfLogMapCondition cpqNicIfLogMapStatus cpqNicIfLogMapNumSwitchovers cpqNicIfLogMapHwLocation cpqNicIfLogMapSpeed cpqNicIfLogMapVlanCount cpqNicIfLogMapVlans)) {
+ $self->{$_} = $params{$_};
+ }
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('lni', $self->{cpqNicIfLogMapIndex});
+ if ($self->{cpqNicIfLogMapAdapterCount} > 0) {
+ if ($self->{cpqNicIfLogMapCondition} eq "other") {
+ # simply ignore this. if there is a physical nic
+ # it is usually unknown/other/scheissegal
+ $self->add_info(sprintf "logical nic %d (%s) is %s",
+ $self->{cpqNicIfLogMapIndex}, $self->{cpqNicIfLogMapDescription},
+ $self->{cpqNicIfLogMapCondition});
+ } elsif ($self->{cpqNicIfLogMapCondition} ne "ok") {
+ $self->add_info(sprintf "logical nic %d (%s) is %s (%s)",
+ $self->{cpqNicIfLogMapIndex}, $self->{cpqNicIfLogMapDescription},
+ $self->{cpqNicIfLogMapCondition}, $self->{cpqNicIfLogMapStatus});
+ $self->add_message(CRITICAL, $self->{info});
+ } else {
+ $self->add_info(sprintf "logical nic %d (%s) is %s",
+ $self->{cpqNicIfLogMapIndex}, $self->{cpqNicIfLogMapDescription},
+ $self->{cpqNicIfLogMapCondition});
+ }
+ } else {
+ $self->add_info(sprintf "logical nic %d (%s) has 0 physical nics",
+ $self->{cpqNicIfLogMapIndex}, $self->{cpqNicIfLogMapDescription});
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[LNIC_%s]\n", $self->{cpqNicIfLogMapIndex};
+ foreach (qw(cpqNicIfLogMapIndex cpqNicIfLogMapIfNumber cpqNicIfLogMapDescription cpqNicIfLogMapAdapterCount cpqNicIfLogMapGroupType cpqNicIfLogMapSwitchoverMode cpqNicIfLogMapCondition cpqNicIfLogMapStatus cpqNicIfLogMapNumSwitchovers cpqNicIfLogMapHwLocation cpqNicIfLogMapSpeed)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "info: %s\n", $self->{info};
+ printf "\n";
+}
+
+
+package HP::Proliant::Component::NicSubsystem::PhysicalNic;
+our @ISA = qw(HP::Proliant::Component::NicSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ foreach (qw(cpqNicIfPhysAdapterIndex cpqNicIfPhysAdapterIfNumber cpqNicIfPhysAdapterRole cpqNicIfPhysAdapterDuplexState cpqNicIfPhysAdapterCondition cpqNicIfPhysAdapterState cpqNicIfPhysAdapterStatus cpqNicIfPhysAdapterBadTransmits cpqNicIfPhysAdapterBadReceives)) {
+ $self->{$_} = $params{$_};
+ }
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('pni', $self->{cpqNicIfPhysAdapterIndex});
+ if ($self->{cpqNicIfPhysAdapterCondition} eq "other") {
+ # hp doesnt output a clear status. i am optimistic, unknown/other
+ # means "dont care"
+ $self->add_info(sprintf "physical nic %d (%s) is %s",
+ $self->{cpqNicIfPhysAdapterIndex}, $self->{cpqNicIfPhysAdapterRole},
+ $self->{cpqNicIfPhysAdapterCondition});
+ } elsif ($self->{cpqNicIfPhysAdapterCondition} ne "ok") {
+ $self->add_info(sprintf "physical nic %d (%s) is %s (%s,%s)",
+ $self->{cpqNicIfPhysAdapterIndex}, $self->{cpqNicIfPhysAdapterRole},
+ $self->{cpqNicIfPhysAdapterCondition},
+ $self->{cpqNicIfPhysAdapterState}, $self->{cpqNicIfPhysAdapterStatus});
+ $self->add_message(CRITICAL, $self->{info});
+ } else {
+ if ($self->{cpqNicIfPhysAdapterDuplexState} ne "full") {
+ $self->add_info(sprintf "physical nic %d (%s) is %s duplex",
+ $self->{cpqNicIfPhysAdapterIndex}, $self->{cpqNicIfPhysAdapterRole},
+ $self->{cpqNicIfPhysAdapterDuplexState});
+ } else {
+ $self->add_info(sprintf "physical nic %d (%s) is %s",
+ $self->{cpqNicIfPhysAdapterIndex}, $self->{cpqNicIfPhysAdapterRole},
+ $self->{cpqNicIfPhysAdapterCondition});
+ }
+ }
+}
+
+sub dump {
+ my $self = shift;
+ printf "[PNIC_%s]\n", $self->{cpqNicIfPhysAdapterIndex};
+ foreach (qw(cpqNicIfPhysAdapterIndex cpqNicIfPhysAdapterIfNumber cpqNicIfPhysAdapterRole cpqNicIfPhysAdapterDuplexState cpqNicIfPhysAdapterCondition cpqNicIfPhysAdapterState cpqNicIfPhysAdapterStatus cpqNicIfPhysAdapterBadTransmits cpqNicIfPhysAdapterBadReceives)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "info: %s\n", $self->{info};
+ printf "\n";
+}
+
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/NicSubsystem/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/NicSubsystem/SNMP.pm
new file mode 100755
index 0000000..85f1fd4
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/NicSubsystem/SNMP.pm
@@ -0,0 +1,189 @@
+package HP::Proliant::Component::NicSubsystem::SNMP;
+our @ISA = qw(HP::Proliant::Component::NicSubsystem
+ HP::Proliant::Component::SNMP);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ logical_nics => [],
+ physical_nics => [],
+ };
+ bless $self, $class;
+ $self->overall_init(%params);
+ $self->init();
+ return $self;
+}
+
+sub overall_init {
+ my $self = shift;
+ my %params = @_;
+ my $snmpwalk = $self->{rawdata};
+ # overall
+ my $cpqNicIfLogMapOverallCondition = '1.3.6.1.4.1.232.18.2.2.2.0';
+ my $cpqNicIfLogMapOverallConditionValue = {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ };
+ $self->{lognicstatus} = SNMP::Utils::get_object_value(
+ $snmpwalk, $cpqNicIfLogMapOverallCondition,
+ $cpqNicIfLogMapOverallConditionValue);
+}
+
+sub init {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+ my $ifconnect = {};
+ # CPQNIC-MIB
+ my $oids = {
+ cpqNicIfLogMapEntry => '1.3.6.1.4.1.232.18.2.2.1.1',
+ cpqNicIfLogMapIndex => '1.3.6.1.4.1.232.18.2.2.1.1.1',
+ cpqNicIfLogMapIfNumber => '1.3.6.1.4.1.232.18.2.2.1.1.2',
+ cpqNicIfLogMapDescription => '1.3.6.1.4.1.232.18.2.2.1.1.3',
+ cpqNicIfLogMapGroupType => '1.3.6.1.4.1.232.18.2.2.1.1.4',
+ cpqNicIfLogMapAdapterCount => '1.3.6.1.4.1.232.18.2.2.1.1.5',
+ cpqNicIfLogMapAdapterOKCount => '1.3.6.1.4.1.232.18.2.2.1.1.6',
+ cpqNicIfLogMapPhysicalAdapters => '1.3.6.1.4.1.232.18.2.2.1.1.7',
+ cpqNicIfLogMapMACAddress => '1.3.6.1.4.1.232.18.2.2.1.1.8',
+ cpqNicIfLogMapSwitchoverMode => '1.3.6.1.4.1.232.18.2.2.1.1.9',
+ cpqNicIfLogMapCondition => '1.3.6.1.4.1.232.18.2.2.1.1.10',
+ cpqNicIfLogMapStatus => '1.3.6.1.4.1.232.18.2.2.1.1.11',
+ cpqNicIfLogMapNumSwitchovers => '1.3.6.1.4.1.232.18.2.2.1.1.12',
+ cpqNicIfLogMapHwLocation => '1.3.6.1.4.1.232.18.2.2.1.1.13',
+ cpqNicIfLogMapSpeed => '1.3.6.1.4.1.232.18.2.2.1.1.14',
+ cpqNicIfLogMapVlanCount => '1.3.6.1.4.1.232.18.2.2.1.1.15',
+ cpqNicIfLogMapVlans => '1.3.6.1.4.1.232.18.2.2.1.1.16',
+
+ cpqNicIfLogMapGroupTypeValue => {
+ 1 => "unknown",
+ 2 => "none",
+ 3 => "redundantPair",
+ 4 => "nft",
+ 5 => "alb",
+ 6 => "fec",
+ 7 => "gec",
+ 8 => "ad",
+ 9 => "slb",
+ 10 => "tlb",
+ 11 => "redundancySet",
+ },
+ cpqNicIfLogMapConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqNicIfLogMapStatusValue => {
+ 1 => "unknown",
+ 2 => "ok",
+ 3 => "primaryFailed",
+ 4 => "standbyFailed",
+ 5 => "groupFailed",
+ 6 => "redundancyReduced",
+ 7 => "redundancyLost",
+ },
+ cpqNicIfLogMapSwitchoverModeValue => {
+ 1 => "unknown",
+ 2 => "none",
+ 3 => "manual",
+ 4 => "switchOnFail",
+ 5 => "preferredPrimary",
+ },
+ };
+
+ # INDEX { cpqNicIfLogMapIndex }
+ foreach ($self->get_entries($oids, 'cpqNicIfLogMapEntry')) {
+ push(@{$self->{logical_nics}},
+ HP::Proliant::Component::NicSubsystem::LogicalNic->new(%{$_})
+ );
+ }
+
+ $oids = {
+ cpqNicIfPhysAdapterEntry => '1.3.6.1.4.1.232.18.2.3.1.1',
+ cpqNicIfPhysAdapterIndex => '1.3.6.1.4.1.232.18.2.3.1.1.1',
+ cpqNicIfPhysAdapterIfNumber => '1.3.6.1.4.1.232.18.2.3.1.1.2',
+ cpqNicIfPhysAdapterRole => '1.3.6.1.4.1.232.18.2.3.1.1.3',
+ cpqNicIfPhysAdapterMACAddress => '1.3.6.1.4.1.232.18.2.3.1.1.4',
+ cpqNicIfPhysAdapterSlot => '1.3.6.1.4.1.232.18.2.3.1.1.5',
+ cpqNicIfPhysAdapterIoAddr => '1.3.6.1.4.1.232.18.2.3.1.1.6',
+ cpqNicIfPhysAdapterIrq => '1.3.6.1.4.1.232.18.2.3.1.1.7',
+ cpqNicIfPhysAdapterDma => '1.3.6.1.4.1.232.18.2.3.1.1.8',
+ cpqNicIfPhysAdapterMemAddr => '1.3.6.1.4.1.232.18.2.3.1.1.9',
+ cpqNicIfPhysAdapterPort => '1.3.6.1.4.1.232.18.2.3.1.1.10',
+ cpqNicIfPhysAdapterDuplexState => '1.3.6.1.4.1.232.18.2.3.1.1.11',
+ cpqNicIfPhysAdapterCondition => '1.3.6.1.4.1.232.18.2.3.1.1.12',
+ cpqNicIfPhysAdapterState => '1.3.6.1.4.1.232.18.2.3.1.1.13',
+ cpqNicIfPhysAdapterStatus => '1.3.6.1.4.1.232.18.2.3.1.1.14',
+ cpqNicIfPhysAdapterStatsValid => '1.3.6.1.4.1.232.18.2.3.1.1.15',
+ cpqNicIfPhysAdapterGoodTransmits => '1.3.6.1.4.1.232.18.2.3.1.1.16',
+ cpqNicIfPhysAdapterGoodReceives => '1.3.6.1.4.1.232.18.2.3.1.1.17',
+ cpqNicIfPhysAdapterBadTransmits => '1.3.6.1.4.1.232.18.2.3.1.1.18',
+ cpqNicIfPhysAdapterBadReceives => '1.3.6.1.4.1.232.18.2.3.1.1.19',
+ cpqNicIfPhysAdapterAlignmentErrors => '1.3.6.1.4.1.232.18.2.3.1.1.20',
+ cpqNicIfPhysAdapterFCSErrors => '1.3.6.1.4.1.232.18.2.3.1.1.21',
+ cpqNicIfPhysAdapterSingleCollisionFrames => '1.3.6.1.4.1.232.18.2.3.1.1.22',
+ cpqNicIfPhysAdapterMultipleCollisionFrames => '1.3.6.1.4.1.232.18.2.3.1.1.23',
+ cpqNicIfPhysAdapterDeferredTransmissions => '1.3.6.1.4.1.232.18.2.3.1.1.24',
+ cpqNicIfPhysAdapterLateCollisions => '1.3.6.1.4.1.232.18.2.3.1.1.25',
+ cpqNicIfPhysAdapterExcessiveCollisions => '1.3.6.1.4.1.232.18.2.3.1.1.26',
+ cpqNicIfPhysAdapterInternalMacTransmitErrors => '1.3.6.1.4.1.232.18.2.3.1.1.27',
+ cpqNicIfPhysAdapterCarrierSenseErrors => '1.3.6.1.4.1.232.18.2.3.1.1.28',
+ cpqNicIfPhysAdapterFrameTooLongs => '1.3.6.1.4.1.232.18.2.3.1.1.29',
+ cpqNicIfPhysAdapterInternalMacReceiveErrors => '1.3.6.1.4.1.232.18.2.3.1.1.30',
+ cpqNicIfPhysAdapterHwLocation => '1.3.6.1.4.1.232.18.2.3.1.1.31',
+ cpqNicIfPhysAdapterPartNumber => '1.3.6.1.4.1.232.18.2.3.1.1.32',
+ cpqNicIfPhysAdapterRoleValue => {
+ 1 => "unknown",
+ 2 => "primary",
+ 3 => "secondary",
+ 4 => "member",
+ 5 => "txRx",
+ 6 => "tx",
+ 7 => "standby",
+ 8 => "none",
+ 255 => "notApplicable",
+ },
+ cpqNicIfPhysAdapterDuplexStateValue => {
+ 1 => "unknown",
+ 2 => "half",
+ 3 => "full",
+ },
+ cpqNicIfPhysAdapterConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqNicIfPhysAdapterStateValue => {
+ 1 => "unknown",
+ 2 => "ok",
+ 3 => "standby",
+ 4 => "failed",
+ },
+ cpqNicIfPhysAdapterStatusValue => {
+ 1 => "unknown",
+ 2 => "ok",
+ 3 => "generalFailure",
+ 4 => "linkFailure",
+ },
+
+ };
+ # INDEX { cpqNicIfPhysAdapterIndex }
+ foreach ($self->get_entries($oids, 'cpqNicIfPhysAdapterEntry')) {
+ push(@{$self->{physical_nics}},
+ HP::Proliant::Component::NicSubsystem::PhysicalNic->new(%{$_}));
+ }
+
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem.pm
new file mode 100755
index 0000000..6abba29
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem.pm
@@ -0,0 +1,214 @@
+package HP::Proliant::Component::PowersupplySubsystem;
+our @ISA = qw(HP::Proliant::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ condition => $params{condition},
+ status => $params{status},
+ powersupplies => [],
+ powerconverters => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ if ($self->{method} eq 'snmp') {
+ return HP::Proliant::Component::PowersupplySubsystem::SNMP->new(%params);
+ } elsif ($self->{method} eq 'cli') {
+ return HP::Proliant::Component::PowersupplySubsystem::CLI->new(%params);
+ } else {
+ die "unknown method";
+ }
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ my $errorfound = 0;
+ $self->add_info('checking power supplies');
+ if (scalar (@{$self->{powersupplies}}) == 0) {
+ #$self->overall_check();
+ } else {
+ foreach (@{$self->{powersupplies}}) {
+ $_->check();
+ }
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{powersupplies}}) {
+ $_->dump();
+ }
+}
+
+
+package HP::Proliant::Component::PowersupplySubsystem::Powersupply;
+our @ISA = qw(HP::Proliant::Component::PowersupplySubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqHeFltTolPowerSupplyChassis => $params{cpqHeFltTolPowerSupplyChassis},
+ cpqHeFltTolPowerSupplyBay => $params{cpqHeFltTolPowerSupplyBay},
+ cpqHeFltTolPowerSupplyPresent => $params{cpqHeFltTolPowerSupplyPresent},
+ cpqHeFltTolPowerSupplyCondition => $params{cpqHeFltTolPowerSupplyCondition},
+ cpqHeFltTolPowerSupplyRedundant => $params{cpqHeFltTolPowerSupplyRedundant},
+ cpqHeFltTolPowerSupplyCapacityUsed => $params{cpqHeFltTolPowerSupplyCapacityUsed} || 0,
+ cpqHeFltTolPowerSupplyCapacityMaximum => $params{cpqHeFltTolPowerSupplyCapacityMaximum} || 0,
+ blacklisted => 0,
+ info => undef,
+ extendexinfo => undef,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('p', $self->{cpqHeFltTolPowerSupplyBay});
+ if ($self->{cpqHeFltTolPowerSupplyPresent} eq "present") {
+ if ($self->{cpqHeFltTolPowerSupplyCondition} ne "ok") {
+ if ($self->{cpqHeFltTolPowerSupplyCondition} eq "other") {
+ $self->add_info(sprintf "powersupply %d is missing",
+ $self->{cpqHeFltTolPowerSupplyBay});
+ } else {
+ $self->add_info(sprintf "powersupply %d needs attention (%s)",
+ $self->{cpqHeFltTolPowerSupplyBay},
+ $self->{cpqHeFltTolPowerSupplyCondition});
+ }
+ $self->add_message(CRITICAL, $self->{info});
+ } else {
+ $self->add_info(sprintf "powersupply %d is %s",
+ $self->{cpqHeFltTolPowerSupplyBay},
+ $self->{cpqHeFltTolPowerSupplyCondition});
+ }
+ $self->add_extendedinfo(sprintf "ps_%s=%s",
+ $self->{cpqHeFltTolPowerSupplyBay},
+ $self->{cpqHeFltTolPowerSupplyCondition});
+ if ($self->{cpqHeFltTolPowerSupplyCapacityUsed} &&
+ $self->{cpqHeFltTolPowerSupplyCapacityMaximum}) {
+ if ($self->{runtime}->{options}->{perfdata}) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => sprintf("pc_%s", $self->{cpqHeFltTolPowerSupplyBay}),
+ value => $self->{cpqHeFltTolPowerSupplyCapacityUsed},
+ warning => $self->{cpqHeFltTolPowerSupplyCapacityMaximum},
+ critical => $self->{cpqHeFltTolPowerSupplyCapacityMaximum}
+ );
+ }
+ } elsif ($self->{cpqHeFltTolPowerSupplyCapacityUsed}) {
+ if ($self->{runtime}->{options}->{perfdata}) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => sprintf("pc_%s", $self->{cpqHeFltTolPowerSupplyBay}),
+ value => $self->{cpqHeFltTolPowerSupplyCapacityUsed}
+ );
+ }
+ }
+ } else {
+ $self->add_info(sprintf "powersupply %d is %s",
+ $self->{cpqHeFltTolPowerSupplyBay},
+ $self->{cpqHeFltTolPowerSupplyPresent});
+ $self->add_extendedinfo(sprintf "ps_%s=%s",
+ $self->{cpqHeFltTolPowerSupplyBay},
+ $self->{cpqHeFltTolPowerSupplyPresent});
+ }
+}
+
+
+sub dump {
+ my $self = shift;
+ printf "[PS_%s]\n", $self->{cpqHeFltTolPowerSupplyBay};
+ foreach (qw(cpqHeFltTolPowerSupplyBay cpqHeFltTolPowerSupplyChassis
+ cpqHeFltTolPowerSupplyPresent cpqHeFltTolPowerSupplyCondition
+ cpqHeFltTolPowerSupplyRedundant cpqHeFltTolPowerSupplyCapacityUsed
+ cpqHeFltTolPowerSupplyCapacityMaximum)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "info: %s\n\n", $self->{info};
+}
+
+
+package HP::Proliant::Component::PowersupplySubsystem::Powerconverter;
+our @ISA = qw(HP::Proliant::Component::PowersupplySubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+
+ cpqHePowerConvEntry => $params{cpqHePowerConvEntry},
+ cpqHePowerConvChassis => $params{cpqHePowerConvChassis},
+ cpqHePowerConvIndex => $params{cpqHePowerConvIndex},
+ cpqHePowerConvPresent => $params{cpqHePowerConvPresent},
+ cpqHePowerConvRedundant => $params{cpqHePowerConvRedundant},
+ cpqHePowerConvCondition => $params{cpqHePowerConvCondition},
+ cpqHePowerConvHwLocation => $params{cpqHePowerConvHwLocation},
+ blacklisted => 0,
+ info => undef,
+ extendexinfo => undef,
+ };
+ bless $self, $class;
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('pc', $self->{cpqHePowerConvIndex});
+ if ($self->{cpqHePowerConvPresent} eq "present") {
+ if ($self->{cpqHePowerConvCondition} ne "ok") {
+ if ($self->{cpqHePowerConvCondition} eq "other") {
+ $self->add_info(sprintf "powerconverter %d is missing",
+ $self->{cpqHePowerConvIndex});
+ } else {
+ $self->add_info(sprintf "powerconverter %d needs attention (%s)",
+ $self->{cpqHePowerConvIndex},
+ $self->{cpqHePowerConvCondition});
+ }
+ $self->add_message(CRITICAL, $self->{info});
+ } else {
+ $self->add_info(sprintf "powerconverter %d is %s",
+ $self->{cpqHePowerConvIndex},
+ $self->{cpqHePowerConvCondition});
+ }
+ $self->add_extendedinfo(sprintf "pc_%s=%s",
+ $self->{cpqHePowerConvIndex},
+ $self->{cpqHePowerConvCondition});
+ } else {
+ $self->add_info(sprintf "powerconverter %d is %s",
+ $self->{cpqHePowerConvIndex},
+ $self->{cpqHePowerConvPresent});
+ $self->add_extendedinfo(sprintf "pc_%s=%s",
+ $self->{cpqHePowerConvIndex},
+ $self->{cpqHePowerConvPresent});
+ }
+}
+
+
+sub dump {
+ my $self = shift;
+ printf "[PS_%s]\n", ($self->{cpqHePowerConvChassis} ? $self->{cpqHePowerConvChassis}.":" : "").$self->{cpqHePowerConvIndex};
+ foreach (qw(cpqHePowerConvIndex cpqHePowerConvPresent cpqHePowerConvRedundant cpqHePowerConvCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "info: %s\n\n", $self->{info};
+}
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem/CLI.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem/CLI.pm
new file mode 100755
index 0000000..c218975
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem/CLI.pm
@@ -0,0 +1,81 @@
+package HP::Proliant::Component::PowersupplySubsystem::CLI;
+our @ISA = qw(HP::Proliant::Component::PowersupplySubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ powersupplies => [],
+ powerconverters => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init(%params);
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ my %tmpps = (
+ runtime => $self->{runtime},
+ cpqHeFltTolPowerSupplyChassis => 1,
+ );
+ my $inblock = 0;
+ foreach (grep(/^powersupply/, split(/\n/, $self->{rawdata}))) {
+ s/^powersupply\s*//g;
+ if (/^Power supply #(\d+)/) {
+ if ($inblock) {
+ $inblock = 0;
+ push(@{$self->{powersupplies}},
+ HP::Proliant::Component::PowersupplySubsystem::Powersupply->new(%tmpps));
+ %tmpps = (
+ runtime => $self->{runtime},
+ cpqHeFltTolPowerSupplyChassis => 1,
+ );
+ }
+ $tmpps{cpqHeFltTolPowerSupplyBay} = $1;
+ $inblock = 1;
+ } elsif (/\s*Present\s+:\s+(\w+)/) {
+ $tmpps{cpqHeFltTolPowerSupplyPresent} = lc $1 eq 'yes' ? 'present' :
+ lc $1 eq 'no' ? 'absent': 'other';
+ } elsif (/\s*Redundant\s*:\s+(\w+)/) {
+ $tmpps{cpqHeFltTolPowerSupplyRedundant} = lc $1 eq 'yes' ? 'redundant' :
+ lc $1 eq 'no' ? 'notRedundant' : 'other';
+ } elsif (/\s*Condition\s*:\s+(\w+)/) {
+ $tmpps{cpqHeFltTolPowerSupplyCondition} = lc $1;
+ } elsif (/\s*Power\s*:\s+(\d+)/) {
+ $tmpps{cpqHeFltTolPowerSupplyCapacityUsed} = $1;
+ } elsif (/\s*Power Supply not present/) {
+ $tmpps{cpqHeFltTolPowerSupplyPresent} = "absent";
+ $tmpps{cpqHeFltTolPowerSupplyCondition} = "other";
+ $tmpps{cpqHeFltTolPowerSupplyRedundant} = "notRedundant";
+ } elsif (/^\s*$/) {
+ if ($inblock) {
+ $inblock = 0;
+ push(@{$self->{powersupplies}},
+ HP::Proliant::Component::PowersupplySubsystem::Powersupply->new(%tmpps));
+ %tmpps = (
+ runtime => $self->{runtime},
+ cpqHeFltTolPowerSupplyChassis => 1,
+ );
+ }
+ }
+ }
+ if ($inblock) {
+ push(@{$self->{powersupplies}},
+ HP::Proliant::Component::PowersupplySubsystem::Powersupply->new(%tmpps));
+ %tmpps = (
+ runtime => $params{runtime},
+ );
+ }
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem/SNMP.pm
new file mode 100755
index 0000000..3fa8599
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/PowersupplySubsystem/SNMP.pm
@@ -0,0 +1,96 @@
+package HP::Proliant::Component::PowersupplySubsystem::SNMP;
+our @ISA = qw(HP::Proliant::Component::PowersupplySubsystem
+ HP::Proliant::Component::SNMP);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ powersupplies => [],
+ powerconverters => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init(%params);
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ my $snmpwalk = $self->{rawdata};
+ my $oids = {
+ cpqHeFltTolPowerSupplyEntry => "1.3.6.1.4.1.232.6.2.9.3.1",
+ cpqHeFltTolPowerSupplyChassis => "1.3.6.1.4.1.232.6.2.9.3.1.1",
+ cpqHeFltTolPowerSupplyBay => "1.3.6.1.4.1.232.6.2.9.3.1.2",
+ cpqHeFltTolPowerSupplyPresent => "1.3.6.1.4.1.232.6.2.9.3.1.3",
+ cpqHeFltTolPowerSupplyCondition => "1.3.6.1.4.1.232.6.2.9.3.1.4",
+ cpqHeFltTolPowerSupplyRedundant => "1.3.6.1.4.1.232.6.2.9.3.1.9",
+ cpqHeFltTolPowerSupplyPresentValue => {
+ 1 => "other",
+ 2 => "absent",
+ 3 => "present",
+ },
+ cpqHeFltTolPowerSupplyConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqHeFltTolPowerSupplyCapacityUsed => '1.3.6.1.4.1.232.6.2.9.3.1.7',
+ cpqHeFltTolPowerSupplyCapacityMaximum => '1.3.6.1.4.1.232.6.2.9.3.1.8',
+ cpqHeFltTolPowerSupplyRedundantValue => {
+ 1 => "other",
+ 2 => "notRedundant",
+ 3 => "redundant",
+ },
+ };
+
+ # INDEX { cpqHeFltTolPowerSupplyChassis, cpqHeFltTolPowerSupplyBay }
+ foreach ($self->get_entries($oids, 'cpqHeFltTolPowerSupplyEntry')) {
+ push(@{$self->{powersupplies}},
+ HP::Proliant::Component::PowersupplySubsystem::Powersupply->new(%{$_}));
+ }
+
+ $oids = {
+ cpqHePowerConvEntry => "1.3.6.1.4.1.232.6.2.13.3.1",
+ cpqHePowerConvChassis => "1.3.6.1.4.1.232.6.2.13.3.1.1",
+ cpqHePowerConvIndex => "1.3.6.1.4.1.232.6.2.13.3.1.2",
+ cpqHePowerConvPresent => "1.3.6.1.4.1.232.6.2.13.3.1.3",
+ cpqHePowerConvRedundant => "1.3.6.1.4.1.232.6.2.13.3.1.6",
+ cpqHePowerConvCondition => "1.3.6.1.4.1.232.6.2.13.3.1.8",
+ cpqHePowerConvPresentValue => {
+ 1 => "other",
+ 2 => "absent",
+ 3 => "present",
+ },
+ cpqHePowerConvRedundantValue => {
+ 1 => "other",
+ 2 => "notRedundant",
+ 3 => "redundant",
+ },
+ cpqHePowerConvConditionValue => {
+ 1 => "other",
+ 2 => "ok",
+ 3 => "degraded",
+ 4 => "failed",
+ },
+ cpqHePowerConvHwLocation => "1.3.6.1.4.1.232.6.2.13.3.1.9",
+ };
+
+ # INDEX { cpqHePowerConvChassis cpqHePowerConvIndex }
+ foreach ($self->get_entries($oids, 'cpqHePowerConvEntry')) {
+ push(@{$self->{powerconverters}},
+ HP::Proliant::Component::PowersupplySubsystem::Powerconverter->new(%{$_}));
+ }
+ # keine ahnung, was man damit machen kann
+
+}
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/SNMP.pm
new file mode 100755
index 0000000..708f7f6
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/SNMP.pm
@@ -0,0 +1,67 @@
+package HP::Proliant::Component::SNMP;
+
+sub get_entries {
+ my $self = shift;
+ my $oids = shift;
+ my $entry = shift;
+ my $snmpwalk = $self->{rawdata};
+ my @params = ();
+ my @indices = SNMP::Utils::get_indices($snmpwalk, $oids->{$entry});
+ foreach (@indices) {
+ my @idx = @{$_};
+ my %params = (
+ runtime => $self->{runtime},
+ );
+ my $maxdimension = scalar(@idx) - 1;
+ foreach my $idxnr (1..scalar(@idx)) {
+ $params{'index'.$idxnr} = $_->[$idxnr - 1];
+ }
+ foreach my $oid (keys %{$oids}) {
+ next if $oid =~ /Entry$/;
+ next if $oid =~ /Value$/;
+ if (exists $oids->{$oid.'Value'}) {
+ $params{$oid} = SNMP::Utils::get_object_value(
+ $snmpwalk, $oids->{$oid}, $oids->{$oid.'Value'}, @idx);
+ if (! defined $params{$oid}) {
+ my $numerical_value = SNMP::Utils::get_object(
+ $snmpwalk, $oids->{$oid}, @idx);
+ if (! defined $numerical_value) {
+ # maschine liefert schrott
+ $params{$oid} = 'value_unknown';
+ } else {
+ $params{$oid} = 'value_'.SNMP::Utils::get_object(
+ $snmpwalk, $oids->{$oid}, @idx);
+ }
+ }
+ } else {
+ $params{$oid} = SNMP::Utils::get_object(
+ $snmpwalk, $oids->{$oid}, @idx);
+ }
+ }
+ push(@params, \%params);
+ }
+ return @params;
+}
+
+sub mib {
+ my $self = shift;
+ my $mib = shift;
+ my $condition = {
+ 0 => 'other',
+ 1 => 'ok',
+ 2 => 'degraded',
+ 3 => 'failed',
+ };
+ my $MibRevMajor = $mib.'.1.0';
+ my $MibRevMinor = $mib.'.2.0';
+ my $MibRevCondition = $mib.'.3.0';
+ return (
+ $self->SNMP::Utils::get_object($self->{rawdata},
+ $MibRevMajor),
+ $self->SNMP::Utils::get_object($self->{rawdata},
+ $MibRevMinor),
+ $self->SNMP::Utils::get_object_value($self->{rawdata},
+ $MibRevCondition, $condition));
+};
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem.pm
new file mode 100755
index 0000000..7c82a11
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem.pm
@@ -0,0 +1,205 @@
+package HP::Proliant::Component::TemperatureSubsystem;
+our @ISA = qw(HP::Proliant::Component);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+################################## custom_thresholds
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ method => $params{method},
+ condition => $params{condition},
+ status => $params{status},
+ temperatures => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ if ($params{runtime}->{options}->{customthresholds}) {
+ if (-f $params{runtime}->{options}->{customthresholds}) {
+ $params{runtime}->{options}->{customthresholds} =
+ do { local (@ARGV, $/) =
+ $params{runtime}->{options}->{customthresholds}; <> };
+ }
+ foreach my $ct_items
+ (split(/\//, $params{runtime}->{options}->{customthresholds})) {
+ if ($ct_items =~ /^(\d+):(\d+)$/) {
+ $params{runtime}->{options}->{thresholds}->{$1} = $2;
+ } else {
+ die sprintf "invalid threshold %s", $ct_items;
+ }
+ }
+ }
+ if ($self->{method} eq 'snmp') {
+ return HP::Proliant::Component::TemperatureSubsystem::SNMP->new(%params);
+ } elsif ($self->{method} eq 'cli') {
+ return HP::Proliant::Component::TemperatureSubsystem::CLI->new(%params);
+ } else {
+ die "unknown method";
+ }
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ my $errorfound = 0;
+ $self->add_info('checking temperatures');
+ if (scalar (@{$self->{temperatures}}) == 0) {
+ #$self->overall_check();
+ $self->add_info('no temperatures found');
+ } else {
+ foreach (sort { $a->{cpqHeTemperatureIndex} <=> $b->{cpqHeTemperatureIndex}}
+ @{$self->{temperatures}}) {
+ $_->check();
+ }
+ }
+}
+
+sub dump {
+ my $self = shift;
+ foreach (@{$self->{temperatures}}) {
+ $_->dump();
+ }
+}
+
+
+package HP::Proliant::Component::TemperatureSubsystem::Temperature;
+our @ISA = qw(HP::Proliant::Component::TemperatureSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ cpqHeTemperatureChassis => $params{cpqHeTemperatureChassis},
+ cpqHeTemperatureIndex => $params{cpqHeTemperatureIndex},
+ cpqHeTemperatureLocale => $params{cpqHeTemperatureLocale},
+ cpqHeTemperatureCelsius => $params{cpqHeTemperatureCelsius},
+ cpqHeTemperatureThresholdCelsius => $params{cpqHeTemperatureThresholdCelsius},
+ cpqHeTemperatureCondition => $params{cpqHeTemperatureCondition},
+ cpqHeTemperatureThresholdType => $params{cpqHeTemperatureThresholdType} || "unknown",
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ if ($params{runtime}->{options}->{celsius}) {
+ $self->{cpqHeTemperatureUnits} = 'C';
+ $self->{cpqHeTemperature} = $self->{cpqHeTemperatureCelsius};
+ $self->{cpqHeTemperatureThreshold} =
+ $self->{cpqHeTemperatureThresholdCelsius};
+ } else {
+ $self->{cpqHeTemperatureUnits} = 'F';
+ $self->{cpqHeTemperature} =
+ (($self->{cpqHeTemperatureCelsius} * 9) / 5) + 32;
+ $self->{cpqHeTemperatureThreshold} =
+ (($self->{cpqHeTemperatureThresholdCelsius} * 9) / 5) + 32;
+ }
+ my $index = $self->{cpqHeTemperatureIndex};
+ if (exists $params{runtime}->{options}->{thresholds}->{$index}) {
+ $self->{cpqHeTemperatureThreshold} =
+ $params{runtime}->{options}->{thresholds}->{$index};
+
+ }
+ if ($self->{cpqHeTemperatureThresholdCelsius} == -99) {
+ bless $self, 'HP::Proliant::Component::TemperatureSubsystem::SoSTemperature';
+ } elsif ($self->{cpqHeTemperatureThresholdCelsius} == 0) {
+ # taucht auf, seit man gen8 ueber das ilo abfragen kann
+ bless $self, 'HP::Proliant::Component::TemperatureSubsystem::SoSTemperature';
+ }
+ return $self;
+}
+
+sub check {
+ my $self = shift;
+ $self->blacklist('t', $self->{cpqHeTemperatureIndex});
+ if ($self->{cpqHeTemperature} > $self->{cpqHeTemperatureThreshold}) {
+ $self->add_info(sprintf "%d %s temperature too high (%d%s, %d max)",
+ $self->{cpqHeTemperatureIndex}, $self->{cpqHeTemperatureLocale},
+ $self->{cpqHeTemperature}, $self->{cpqHeTemperatureUnits},
+ $self->{cpqHeTemperatureThreshold});
+ $self->add_message(CRITICAL, $self->{info});
+ } elsif ($self->{cpqHeTemperature} < 0) {
+ # #21 SCSI_BACKPLANE_ZONE -1C/31F 60C/140F OK - can't be true
+ $self->add_info(sprintf "%d %s temperature too low (%d%s)",
+ $self->{cpqHeTemperatureIndex}, $self->{cpqHeTemperatureLocale},
+ $self->{cpqHeTemperature}, $self->{cpqHeTemperatureUnits});
+ $self->add_message(CRITICAL, $self->{info});
+ } else {
+ $self->add_info(sprintf "%d %s temperature is %d%s (%d max)",
+ $self->{cpqHeTemperatureIndex}, $self->{cpqHeTemperatureLocale},
+ $self->{cpqHeTemperature}, $self->{cpqHeTemperatureUnits},
+ $self->{cpqHeTemperatureThreshold});
+ }
+ if ($self->{runtime}->{options}->{perfdata} == 2) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => sprintf('temp_%s', $self->{cpqHeTemperatureIndex}),
+ value => $self->{cpqHeTemperature},
+ warning => $self->{cpqHeTemperatureThreshold},
+ critical => $self->{cpqHeTemperatureThreshold}
+ );
+ } elsif ($self->{runtime}->{options}->{perfdata} == 1) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => sprintf('temp_%s_%s', $self->{cpqHeTemperatureIndex},
+ $self->{cpqHeTemperatureLocale}),
+ value => $self->{cpqHeTemperature},
+ warning => $self->{cpqHeTemperatureThreshold},
+ critical => $self->{cpqHeTemperatureThreshold}
+ );
+ }
+ $self->add_extendedinfo(sprintf "temp_%s=%d",
+ $self->{cpqHeTemperatureIndex},
+ $self->{cpqHeTemperature});
+}
+
+sub dump {
+ my $self = shift;
+ printf "[TEMP_%s]\n", $self->{cpqHeTemperatureIndex};
+ foreach (qw(cpqHeTemperatureChassis cpqHeTemperatureIndex
+ cpqHeTemperatureLocale cpqHeTemperatureCelsius cpqHeTemperatureThreshold
+ cpqHeTemperatureThresholdType cpqHeTemperatureCondition)) {
+ printf "%s: %s\n", $_, $self->{$_};
+ }
+ printf "info: %s\n\n", $self->{info};
+}
+
+
+package HP::Proliant::Component::TemperatureSubsystem::SoSTemperature;
+our @ISA = qw(HP::Proliant::Component::TemperatureSubsystem::Temperature);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub check {
+ my $self = shift;
+ $self->blacklist('t', $self->{cpqHeTemperatureIndex});
+ $self->add_info(sprintf "%d %s temperature is %d%s (no thresh.)",
+ $self->{cpqHeTemperatureIndex}, $self->{cpqHeTemperatureLocale},
+ $self->{cpqHeTemperature}, $self->{cpqHeTemperatureUnits});
+ if ($self->{runtime}->{options}->{perfdata} == 2) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => sprintf('temp_%s', $self->{cpqHeTemperatureIndex}),
+ value => $self->{cpqHeTemperature},
+ );
+ } elsif ($self->{runtime}->{options}->{perfdata} == 1) {
+ $self->{runtime}->{plugin}->add_perfdata(
+ label => sprintf('temp_%s_%s', $self->{cpqHeTemperatureIndex},
+ $self->{cpqHeTemperatureLocale}),
+ value => $self->{cpqHeTemperature},
+ );
+ }
+ $self->add_extendedinfo(sprintf "temp_%s=%d",
+ $self->{cpqHeTemperatureIndex},
+ $self->{cpqHeTemperature});
+}
+
+1;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem/CLI.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem/CLI.pm
new file mode 100755
index 0000000..9e8e6be
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem/CLI.pm
@@ -0,0 +1,56 @@
+package HP::Proliant::Component::TemperatureSubsystem::CLI;
+our @ISA = qw(HP::Proliant::Component::TemperatureSubsystem);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ temperatures => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->init(%params);
+ return $self;
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ my $tempcnt = 1;
+ foreach (grep(/^temp/, split(/\n/, $params{rawdata}))) {
+ s/^temp\s*//g;
+ if (/^#(\d+)\s+([\w_\/\-#]+)\s+(-*\d+)C\/(\d+)F\s+(\d+)C\/(\d+)F/) {
+ my %params = ();
+ $params{runtime} = $self->{runtime};
+ $params{cpqHeTemperatureChassis} = 1;
+ $params{cpqHeTemperatureIndex} = $1;
+ $params{cpqHeTemperatureLocale} = lc $2;
+ $params{cpqHeTemperatureCelsius} = $3;
+ $params{cpqHeTemperatureThresholdCelsius} = $5;
+ $params{cpqHeTemperatureCondition} = 'unknown';
+ push(@{$self->{temperatures}},
+ HP::Proliant::Component::TemperatureSubsystem::Temperature->new(
+ %params));
+ } elsif (/^#(\d+)\s+([\w_\/\-#]+)\s+\-\s+(\d+)C\/(\d+)F/) {
+ # #3 CPU#2 - 0C/0F
+ $self->trace(2, sprintf "skipping temperature %s", $_);
+ } elsif (/^#(\d+)\s+([\w_\/\-#]+)\s+(\d+)C\/(\d+)F\s+\-/) {
+ # #3 CPU#2 0C/0F -
+ $self->trace(2, sprintf "skipping temperature %s", $_);
+ } elsif (/^#(\d+)\s+([\w_\/\-#]+)\s+\-\s+\-/) {
+ # #3 CPU#2 - -
+ $self->trace(2, sprintf "skipping temperature %s", $_);
+ } elsif (/^#(\d+)/) {
+ $self->trace(0, sprintf "send this to lausser: %s", $_);
+ }
+ }
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem/SNMP.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem/SNMP.pm
new file mode 100755
index 0000000..de8e4cb
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Proliant/Component/TemperatureSubsystem/SNMP.pm
@@ -0,0 +1,119 @@
+package HP::Proliant::Component::TemperatureSubsystem::SNMP;
+our @ISA = qw(HP::Proliant::Component::TemperatureSubsystem
+ HP::Proliant::Component::SNMP);
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ rawdata => $params{rawdata},
+ temperatures => [],
+ blacklisted => 0,
+ info => undef,
+ extendedinfo => undef,
+ };
+ bless $self, $class;
+ $self->overall_init(%params);
+ $self->init(%params);
+ return $self;
+}
+
+sub overall_init {
+ my $self = shift;
+ my %params = @_;
+ my $snmpwalk = $params{rawdata};
+ # overall
+ my $cpqHeThermalTempStatus = '1.3.6.1.4.1.232.6.2.6.3.0';
+ my $cpqHeThermalTempStatusValue = {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ };
+ $self->{tempstatus} = lc SNMP::Utils::get_object_value(
+ $snmpwalk, $cpqHeThermalTempStatus,
+ $cpqHeThermalTempStatusValue);
+ $self->{tempstatus} |= lc $self->{tempstatus};
+}
+
+sub init {
+ my $self = shift;
+ my %params = @_;
+ my $snmpwalk = $self->{rawdata};
+ my $oids = {
+ cpqHeTemperatureEntry => "1.3.6.1.4.1.232.6.2.6.8.1",
+ cpqHeTemperatureChassis => "1.3.6.1.4.1.232.6.2.6.8.1.1",
+ cpqHeTemperatureIndex => "1.3.6.1.4.1.232.6.2.6.8.1.2",
+ cpqHeTemperatureLocale => "1.3.6.1.4.1.232.6.2.6.8.1.3",
+ cpqHeTemperatureCelsius => "1.3.6.1.4.1.232.6.2.6.8.1.4",
+ cpqHeTemperatureThresholdCelsius => "1.3.6.1.4.1.232.6.2.6.8.1.5",
+ cpqHeTemperatureCondition => "1.3.6.1.4.1.232.6.2.6.8.1.6",
+ cpqHeTemperatureThresholdType => "1.3.6.1.4.1.232.6.2.6.8.1.7",
+ cpqHeTemperatureLocaleValue => {
+ 1 => "other",
+ 2 => "unknown",
+ 3 => "system",
+ 4 => "systemBoard",
+ 5 => "ioBoard",
+ 6 => "cpu",
+ 7 => "memory",
+ 8 => "storage",
+ 9 => "removableMedia",
+ 10 => "powerSupply",
+ 11 => "ambient",
+ 12 => "chassis",
+ 13 => "bridgeCard",
+ },
+ cpqHeTemperatureConditionValue => {
+ 1 => 'other',
+ 2 => 'ok',
+ 3 => 'degraded',
+ 4 => 'failed',
+ },
+ cpqHeTemperatureThresholdTypeValue => {
+ 1 => 'other',
+ 5 => 'blowout',
+ 9 => 'caution',
+ 15 => 'critical',
+ },
+ };
+ # INDEX { cpqHeTemperatureChassis, cpqHeTemperatureIndex }
+ foreach ($self->get_entries($oids, 'cpqHeTemperatureEntry')) {
+ # sieht aus, als wurden die gar nicht existieren.
+ # im ilo4 werden sie als n/a angezeigt
+ next if $_->{cpqHeTemperatureThresholdType} eq "caution" && $_->{cpqHeTemperatureThresholdCelsius} == 0;
+ push(@{$self->{temperatures}},
+ HP::Proliant::Component::TemperatureSubsystem::Temperature->new(%{$_}));
+ }
+}
+
+sub overall_check {
+ my $self = shift;
+ my $result = 0;
+ $self->blacklist('ots', '');
+ if ($self->{tempstatus}) {
+ if ($self->{tempstatus} eq "ok") {
+ $result = 0;
+ $self->add_info('all temp sensors are within normal operating range');
+ } elsif ($self->{tempstatus} eq "degraded") {
+ $result = 1;
+ $self->add_info('a temp sensor is outside of normal operating range');
+ } elsif ($self->{tempstatus} eq "failed") {
+ $result = 2;
+ $self->add_info('a temp sensor detects a condition that could permanently
+damage the system');
+ } elsif ($self->{tempstatus} eq "other") {
+ $result = 0;
+ $self->add_info('temp sensing is not supported by this system or driver');
+ }
+ } else {
+ $result = 0;
+ $self->add_info('no global temp status found');
+ }
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/SNMP/Utils.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/SNMP/Utils.pm
new file mode 100755
index 0000000..f2d31a9
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/SNMP/Utils.pm
@@ -0,0 +1,103 @@
+package SNMP::Utils;
+
+use strict;
+
+{
+ sub get_indices {
+ my $oids = shift;
+ my $entry = shift;
+ my $numindices = shift;
+ # find all oids beginning with $entry
+ # then skip one field for the sequence
+ # then read the next numindices fields
+ my $entrypat = $entry;
+ $entrypat =~ s/\./\\\./g;
+ my @indices = map {
+ /^$entrypat\.\d+\.(.*)/ && $1;
+ } grep {
+ /^$entrypat/
+ } keys %{$oids};
+ my %seen = ();
+ my @o = map {[split /\./]} sort grep !$seen{$_}++, @indices;
+ return @o;
+ }
+
+ sub get_size {
+ my $oids = shift;
+ my $entry = shift;
+ my $entrypat = $entry;
+ $entrypat =~ s/\./\\\./g;
+ my @entries = grep {
+ /^$entrypat/
+ } keys %{$oids};
+ return scalar(@entries);
+ }
+
+ sub get_object {
+ my $oids = shift;
+ my $object = shift;
+ my @indices = @_;
+ #my $oid = $object.'.'.join('.', @indices);
+ my $oid = $object;
+ $oid .= '.'.join('.', @indices) if (@indices);
+ return $oids->{$oid};
+ }
+
+ sub get_object_value {
+ my $oids = shift;
+ my $object = shift;
+ my $values = shift;
+ my @indices = @_;
+ my $key = get_object($oids, $object, @indices);
+ if (defined $key) {
+ return $values->{$key};
+ } else {
+ return undef;
+ }
+ }
+
+ #SNMP::Utils::counter([$idxs1, $idxs2], $idx1, $idx2),
+ # this flattens a n-dimensional array and returns the absolute position
+ # of the element at position idx1,idx2,...,idxn
+ # element 1,2 in table 0,0 0,1 0,2 1,0 1,1 1,2 2,0 2,1 2,2 is at pos 6
+ sub get_number {
+ my $indexlists = shift; #, zeiger auf array aus [1, 2]
+ my @element = @_;
+ my $dimensions = scalar(@{$indexlists->[0]});
+ my @sorted = ();
+ my $number = 0;
+ if ($dimensions == 1) {
+ @sorted =
+ sort { $a->[0] <=> $b->[0] } @{$indexlists};
+ } elsif ($dimensions == 2) {
+ @sorted =
+ sort { $a->[0] <=> $b->[0] || $a->[1] <=> $b->[1] } @{$indexlists};
+ } elsif ($dimensions == 3) {
+ @sorted =
+ sort { $a->[0] <=> $b->[0] ||
+ $a->[1] <=> $b->[1] ||
+ $a->[2] <=> $b->[2] } @{$indexlists};
+ }
+ foreach (@sorted) {
+ if ($dimensions == 1) {
+ if ($_->[0] == $element[0]) {
+ last;
+ }
+ } elsif ($dimensions == 2) {
+ if ($_->[0] == $element[0] && $_->[1] == $element[1]) {
+ last;
+ }
+ } elsif ($dimensions == 3) {
+ if ($_->[0] == $element[0] &&
+ $_->[1] == $element[1] &&
+ $_->[2] == $element[2]) {
+ last;
+ }
+ }
+ $number++;
+ }
+ return ++$number;
+ }
+
+}
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Server.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Server.pm
new file mode 100755
index 0000000..7477c40
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Server.pm
@@ -0,0 +1,447 @@
+package HP::Server;
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ runtime => $params{runtime},
+ productname => 'unknown',
+ };
+ bless $self, $class;
+ if (! ($self->{runtime}->{plugin}->opts->hostname ||
+ $self->{runtime}->{plugin}->opts->snmpwalk)) {
+ bless $self, 'HP::Proliant::CLI';
+ $self->{method} = 'cli';
+ } else {
+ $self->check_snmp_and_model();
+ if ($self->{runtime}->{options}->{servertype}) {
+ $self->{productname} = 'ProLiant' if
+ $self->{runtime}->{options}->{servertype} eq 'proliant';
+ $self->{productname} = 'BladeSystem' if
+ $self->{runtime}->{options}->{servertype} eq 'bladesystem';
+ $self->{productname} = 'Storage' if
+ $self->{runtime}->{options}->{servertype} eq 'storage';
+ }
+ if (! $self->{runtime}->{plugin}->check_messages()) {
+ if ($self->{productname} =~ /ProLiant/) {
+ bless $self, 'HP::Proliant::SNMP';
+ $self->trace(3, 'using HP::Proliant::SNMP');
+ } elsif ($self->{productname} =~ /^DL\d+\s*G\d+/) {
+ bless $self, 'HP::Proliant::SNMP';
+ $self->trace(3, 'using HP::Proliant::SNMP');
+ } elsif ($self->{productname} =~ /OpenView .* appliance/) {
+ bless $self, 'HP::Proliant::SNMP';
+ $self->trace(3, 'using HP::Proliant::SNMP');
+ } elsif ($self->{productname} =~ /Synergy.*Gen/i) {
+ bless $self, 'HP::Proliant::SNMP';
+ $self->trace(3, 'using HP::Proliant::SNMP');
+ } elsif ($self->{productname} =~ /Superdome.*Enclosure/i) {
+ bless $self, 'HP::BladeSystem';
+ $self->trace(3, 'using HP::BladeSystem');
+ } elsif ($self->{productname} =~ /BladeSystem/) {
+ bless $self, 'HP::BladeSystem';
+ $self->trace(3, 'using HP::BladeSystem');
+ } elsif ($self->{productname} =~ /PROLIANT 4LEE/) {
+ bless $self, 'HP::Storage';
+ $self->trace(3, 'using HP::Storage');
+ } elsif ($self->{productname} =~ /X\d+[\s\w]* Network Storage/) {
+ # HP X1600 Network Storage System
+ # HP X1600 G2 Network Storage System
+ bless $self, 'HP::Proliant::SNMP';
+ $self->trace(3, 'using HP::Proliant::SNMP');
+ } elsif ($self->{productname} =~ /StorageWorks/i) {
+ bless $self, 'HP::StorageWorks';
+ $self->trace(3, 'using HP::StorageWorks');
+ } elsif ($self->{productname} =~ /MSA/i) {
+ bless $self, 'HP::StorageWorks';
+ $self->trace(3, 'using HP::StorageWorks');
+ } elsif ($self->{productname} =~ /StoreEasy/i) {
+ bless $self, 'HP::Proliant::SNMP';
+ $self->trace(3, 'using HP::Proliant::SNMP');
+ } elsif ($self->{productname} =~ /Storage/) { # fake
+ bless $self, 'HP::Storage';
+ $self->trace(3, 'using HP::Storage');
+ } else {
+ $self->add_message(CRITICAL,
+ sprintf('unknown device%s', $self->{productname} eq 'unknown' ?
+ '' : '('.$self->{productname}.')'));
+ }
+ $self->{method} = 'snmp';
+ }
+ }
+ if ($self->{runtime}->{options}->{blacklist} &&
+ -f $self->{runtime}->{options}->{blacklist}) {
+ $self->{runtime}->{options}->{blacklist} = do {
+ local (@ARGV, $/) = $self->{runtime}->{options}->{blacklist}; <> };
+ }
+ return $self;
+}
+
+sub check_snmp_and_model {
+# uptime pruefen
+# dann whoami
+ my $self = shift;
+ if ($self->{runtime}->{plugin}->opts->snmpwalk) {
+ my $response = {};
+ if (! -f $self->{runtime}->{plugin}->opts->snmpwalk) {
+ $self->{runtime}->{plugin}->add_message(CRITICAL,
+ sprintf 'file %s not found',
+ $self->{runtime}->{plugin}->opts->snmpwalk);
+ } elsif (-x $self->{runtime}->{plugin}->opts->snmpwalk) {
+ my $cmd = sprintf "%s -On -v%s -c%s %s:%s 1.3.6.1.4.1.232 2>&1",
+ $self->{runtime}->{plugin}->opts->snmpwalk,
+ $self->{runtime}->{plugin}->opts->protocol,
+ $self->{runtime}->{plugin}->opts->community,
+ $self->{runtime}->{plugin}->opts->domain,
+ $self->{runtime}->{plugin}->opts->hostname;
+ open(WALK, "$cmd |");
+ while (<WALK>) {
+ if (/^.*?\.(232\.[\d\.]+) = .*?: (\-*\d+)/) {
+ $response->{'1.3.6.1.4.1.'.$1} = $2;
+ } elsif (/^.*?\.(232\.[\d\.]+) = .*?: "(.*?)"/) {
+ $response->{'1.3.6.1.4.1.'.$1} = $2;
+ $response->{'1.3.6.1.4.1.'.$1} =~ s/\s+$//;
+ }
+ }
+ close WALK;
+ } else {
+ open(MESS, $self->{runtime}->{plugin}->opts->snmpwalk);
+ my $in_string = 0;
+ my $in_hex_string = 0;
+ my $hex_oid = 0;
+ while(<MESS>) {
+ chomp;
+ if ($in_hex_string && /^(([0-9a-fA-F]{2})( [0-9a-fA-F]{2})*)\s*$/) {
+ $response->{$hex_oid} .= " ".$1;
+ } elsif ($in_string) {
+ if (/(.*)"$/) {
+ $response->{$hex_oid} .= $1;
+ $in_string = 0;
+ } else {
+ $response->{$hex_oid} .= $_;
+ }
+ } elsif (/^.*?\.(232\.[\d\.]+) = .*?: (\-*\d+)\s*$/) {
+ # SNMPv2-SMI::enterprises.232.6.2.6.7.1.3.1.4 = INTEGER: 6
+ $response->{'1.3.6.1.4.1.'.$1} = $2;
+ $in_hex_string = 0;
+ } elsif (/^.*?\.(232\.[\d\.]+) = .*?: "(.*?)"/) {
+ $response->{'1.3.6.1.4.1.'.$1} = $2;
+ $response->{'1.3.6.1.4.1.'.$1} =~ s/\s+$//;
+ $in_hex_string = 0;
+ } elsif (/^.*?\.(232\.[\d\.]+) = (\-*\d+)/) {
+ $response->{'1.3.6.1.4.1.'.$1} = $2;
+ $in_hex_string = 0;
+ } elsif (/^.*?\.(232\.[\d\.]+) = "(.*?)"/) {
+ $response->{'1.3.6.1.4.1.'.$1} = $2;
+ $response->{'1.3.6.1.4.1.'.$1} =~ s/\s+$//;
+ $in_hex_string = 0;
+ } elsif (/^.*?\.(232\.[\d\.]+) = STRING: "(.*?[^"])$/) {
+ $response->{'1.3.6.1.4.1.'.$1} = $2;
+ $response->{'1.3.6.1.4.1.'.$1} =~ s/\s+$//;
+ $in_string = 0;
+ $in_hex_string = 0;
+ } elsif (/^.*?\.(232\.[\d\.]+) = Hex-STRING: (.*)/) {
+ $response->{'1.3.6.1.4.1.'.$1} = $2;
+ $in_hex_string = 1;
+ $hex_oid = '1.3.6.1.4.1.'.$1;
+ } elsif (/^.*?\.(232\.[\d\.]+) =[ ]{1,2}Hex: (.*)/) {
+ $response->{'1.3.6.1.4.1.'.$1} = $2;
+ $in_hex_string = 1;
+ $hex_oid = '1.3.6.1.4.1.'.$1;
+ }
+ }
+ close MESS;
+ }
+ map { $response->{$_} =~ s/^\s+//; $response->{$_} =~ s/\s+$//; }
+ keys %$response;
+ $self->{rawdata} = $response;
+ $self->whoami();
+ } else {
+ if (eval "require Net::SNMP") {
+ my %params = ();
+ my $net_snmp_version = Net::SNMP->VERSION(); # 5.002000 or 6.000000
+ $params{'-translate'} = [
+ -timeticks => 0x0
+ ];
+ $params{'-hostname'} = $self->{runtime}->{plugin}->opts->hostname;
+ $params{'-domain'} = $self->{runtime}->{plugin}->opts->domain;
+ $params{'-version'} = $self->{runtime}->{plugin}->opts->protocol;
+ if ($self->{runtime}->{plugin}->opts->port) {
+ $params{'-port'} = $self->{runtime}->{plugin}->opts->port;
+ }
+ if ($self->{runtime}->{plugin}->opts->protocol eq '3') {
+ $params{'-username'} = $self->{runtime}->{plugin}->opts->username;
+ if ($self->{runtime}->{plugin}->opts->authpassword) {
+ $params{'-authpassword'} = $self->decode_password($self->{runtime}->{plugin}->opts->authpassword);
+ }
+ if ($self->{runtime}->{plugin}->opts->authprotocol) {
+ $params{'-authprotocol'} = $self->{runtime}->{plugin}->opts->authprotocol;
+ }
+ if ($self->{runtime}->{plugin}->opts->privpassword) {
+ $params{'-privpassword'} = $self->decode_password($self->{runtime}->{plugin}->opts->privpassword);
+ }
+ if ($self->{runtime}->{plugin}->opts->privprotocol) {
+ $params{'-privprotocol'} = $self->{runtime}->{plugin}->opts->privprotocol;
+ }
+ } elsif ($self->decode_password($self->{runtime}->{plugin}->opts->community) =~ /^snmpv3(.)(.+)/) {
+ my $separator = $1;
+ my ($authprotocol, $authpassword, $privprotocol, $privpassword,
+ $username, $contextengineid, $contextname) = split(/$separator/, $2);
+ $params{'-version'} = 3;
+ $params{'-username'} = $self->decode_password($username) if $username;
+ $params{'-authprotocol'} = $self->decode_password($authprotocol) if $authprotocol;
+ $params{'-authpassword'} = $self->decode_password($authpassword) if $authpassword;
+ $params{'-privprotocol'} = $self->decode_password($privprotocol) if $privprotocol;
+ $params{'-privpassword'} = $self->decode_password($privpassword) if $privpassword;
+ } else {
+ $params{'-community'} = $self->decode_password($self->{runtime}->{plugin}->opts->community);
+ }
+ $self->{runtime}->{snmpparams} = \%params;
+ my ($session, $error) = Net::SNMP->session(%params);
+ $self->{session} = $session;
+ if (! defined $session) {
+ $self->add_message(CRITICAL, 'cannot create session object (maybe wrong hostname)');
+ $self->trace(1, Data::Dumper::Dumper(\%params));
+ } else {
+ my $sysUpTime = '1.3.6.1.2.1.1.3.0';
+ my $result = $session->get_request(
+ -varbindlist => [$sysUpTime]
+ );
+ if (!defined($result)) {
+ $self->add_message(CRITICAL,
+ 'could not contact snmp agent');
+ $session->close;
+ } else {
+ $self->trace(3, 'snmp agent answered');
+ $self->whoami();
+ }
+ }
+ } else {
+ $self->add_message(CRITICAL,
+ 'could not find Net::SNMP module');
+ }
+ }
+}
+
+sub whoami {
+ my $self = shift;
+ my $productname = undef;
+ if ($self->{runtime}->{plugin}->opts->snmpwalk) {
+ my $cpqSiProductName = '1.3.6.1.4.1.232.2.2.4.2.0';
+ my $cpqSsMibRevMajor = '1.3.6.1.4.1.232.8.1.1.0';
+ my $cpqSsBackplaneModel = '1.3.6.1.4.1.232.8.2.2.6.1.9'.'.1.1';
+ my $cpqHoMibStatusArray = '1.3.6.1.4.1.232.11.2.10.1.0';
+ if ($productname = $self->{rawdata}->{$cpqSiProductName}) {
+ if (! $productname) {
+ $self->{productname} = 'ProLiant';
+ } else {
+ $self->{productname} = $self->{rawdata}->{$cpqSiProductName};
+ }
+ } elsif (exists $self->{rawdata}->{$cpqSsBackplaneModel}) {
+ $self->{productname} = $self->{rawdata}->{$cpqSsBackplaneModel};
+ } elsif (exists $self->{rawdata}->{$cpqSsMibRevMajor}) {
+ # at least there is a CPQSTSYS-MIB
+ $self->{productname} = 'Storage'
+ } else {
+ $self->add_message(CRITICAL,
+ 'snmpwalk returns no product name (cpqsinfo-mib)');
+ }
+ } else {
+ my $cpqSiProductName = '1.3.6.1.4.1.232.2.2.4.2.0';
+ my $cpqSsMibRevMajor = '1.3.6.1.4.1.232.8.1.1.0';
+ my $cpqSsBackplaneModel = '1.3.6.1.4.1.232.8.2.2.6.1.9'.'.1.1';
+ my $cpqHoMibStatusArray = '1.3.6.1.4.1.232.11.2.10.1.0';
+ my $dummy = '1.3.6.1.2.1.1.5.0';
+ if ($productname = $self->valid_response($cpqSiProductName)) {
+ if ($productname =~ /HP P\d+ .*SAS/ && $self->valid_response($cpqHoMibStatusArray)) {
+ $self->{productname} = 'StorageWorks'
+ } elsif ($productname eq '') {
+ $self->{productname} = 'ProLiant';
+ } else {
+ $self->{productname} = $productname;
+ }
+ } elsif ($productname = $self->valid_response($cpqSsBackplaneModel)) {
+ $self->{productname} = $productname;
+ } elsif ($self->valid_response($cpqSsMibRevMajor)) {
+ # at least there is a CPQSTSYS-MIB
+ $self->{productname} = 'Storage'
+ } elsif ($self->valid_response($cpqHoMibStatusArray)) {
+ $self->{productname} = 'StorageWorks'
+ } else {
+ $self->add_message(CRITICAL,
+ 'snmpwalk returns no product name (cpqsinfo-mib)');
+ $self->{session}->close;
+ }
+ $self->trace(3, 'whoami: '.$self->{productname});
+ }
+}
+
+sub valid_response {
+ my $self = shift;
+ my $oid = shift;
+ my $result = $self->{session}->get_request(
+ -varbindlist => [$oid]
+ );
+ if (!defined($result) ||
+ ! defined $result->{$oid} ||
+ $result->{$oid} eq 'noSuchInstance' ||
+ $result->{$oid} eq 'noSuchObject' ||
+ $result->{$oid} eq 'endOfMibView') {
+ return undef;
+ } else {
+ return $result->{$oid};
+ }
+}
+
+sub trace {
+ my $self = shift;
+ my $level = shift;
+ my $message = shift;
+ if ($self->{runtime}->{options}->{verbose} >= $level) {
+ printf "%s\n", $message;
+ }
+}
+
+sub blacklist {
+ my $self = shift;
+ my $type = shift;
+ my $name = shift;
+ $self->{blacklisted} = $self->is_blacklisted($type, $name);
+}
+
+sub add_blacklist {
+ my $self = shift;
+ my $list = shift;
+ $self->{runtime}->{options}->{blacklist} = join('/',
+ (split('/', $self->{runtime}->{options}->{blacklist}), $list));
+}
+
+sub is_blacklisted {
+ my $self = shift;
+ my $type = shift;
+ my $name = shift;
+ my $blacklisted = 0;
+# $name =~ s/\:/-/g;
+ foreach my $bl_items (split(/\//, $self->{runtime}->{options}->{blacklist})) {
+ if ($bl_items =~ /^(\w+):([\:\w\-,]+)$/) {
+ my $bl_type = $1;
+ my $bl_names = $2;
+ foreach my $bl_name (split(/,/, $bl_names)) {
+ if ($bl_type eq $type && $bl_name eq $name) {
+ $blacklisted = 1;
+ }
+ }
+ } elsif ($bl_items =~ /^(\w+)$/) {
+ my $bl_type = $1;
+ if ($bl_type eq $type) {
+ $blacklisted = 1;
+ }
+ }
+ }
+ return $blacklisted;
+}
+
+sub add_message {
+ my $self = shift;
+ my $level = shift;
+ my $message = shift;
+ $self->{runtime}->{plugin}->add_message($level, $message)
+ unless $self->{blacklisted};
+ if (exists $self->{failed}) {
+ if ($level == UNKNOWN && $self->{failed} == OK) {
+ $self->{failed} = $level;
+ } elsif ($level > $self->{failed}) {
+ $self->{failed} = $level;
+ }
+ }
+}
+
+sub remove_message {
+ my $self = shift;
+ my $level = shift;
+ my $message = shift;
+ $self->{runtime}->{plugin}->remove_message($level) ;
+}
+
+sub has_failed {
+ my $self = shift;
+ return $self->{failed};
+}
+
+sub add_info {
+ my $self = shift;
+ my $info = shift;
+ $info = $self->{blacklisted} ? $info.' (blacklisted)' : $info;
+ $self->{info} = $info;
+ if (! exists $self->{runtime}->{plugin}->{info}) {
+ $self->{runtime}->{plugin}->{info} = [];
+ }
+ push(@{$self->{runtime}->{plugin}->{info}}, $info);
+}
+
+sub annotate_info {
+ my $self = shift;
+ my $annotation = shift;
+ my $lastinfo = pop(@{$self->{runtime}->{plugin}->{info}});
+ $lastinfo .= sprintf ' (%s)', $annotation;
+ push(@{$self->{runtime}->{plugin}->{info}}, $lastinfo);
+}
+
+sub add_extendedinfo {
+ my $self = shift;
+ my $info = shift;
+ $self->{extendedinfo} = $info;
+ return if ! $self->{runtime}->{options}->{extendedinfo};
+ if (! exists $self->{runtime}->{plugin}->{extendedinfo}) {
+ $self->{runtime}->{plugin}->{extendedinfo} = [];
+ }
+ push(@{$self->{runtime}->{plugin}->{extendedinfo}}, $info);
+}
+
+sub get_extendedinfo {
+ my $self = shift;
+ if (! exists $self->{runtime}->{plugin}->{extendedinfo}) {
+ $self->{runtime}->{plugin}->{extendedinfo} = [];
+ }
+ return join(' ', @{$self->{runtime}->{plugin}->{extendedinfo}});
+}
+
+sub add_summary {
+ my $self = shift;
+ my $summary = shift;
+ if (! exists $self->{runtime}->{plugin}->{summary}) {
+ $self->{runtime}->{plugin}->{summary} = [];
+ }
+ push(@{$self->{runtime}->{plugin}->{summary}}, $summary);
+}
+
+sub get_summary {
+ my $self = shift;
+ if (! exists $self->{runtime}->{plugin}->{summary}) {
+ $self->{runtime}->{plugin}->{summary} = [];
+ }
+ return join(', ', @{$self->{runtime}->{plugin}->{summary}});
+}
+
+sub dumper {
+ my $self = shift;
+ my $object = shift;
+ my $run = $object->{runtime};
+ delete $object->{runtime};
+ printf STDERR "%s\n", Data::Dumper::Dumper($object);
+ $object->{runtime} = $run;
+}
+
+sub decode_password {
+ my $self = shift;
+ my $password = shift;
+ if ($password && $password =~ /^rfc3986:\/\/(.*)/) {
+ $password = $1;
+ $password =~ s/\%([A-Fa-f0-9]{2})/pack('C', hex($1))/seg;
+ }
+ return $password;
+}
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Storage.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Storage.pm
new file mode 100755
index 0000000..6fecca1
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/Storage.pm
@@ -0,0 +1,308 @@
+package HP::Storage;
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+use Data::Dumper;
+
+our @ISA = qw(HP::Server);
+
+sub init {
+ my $self = shift;
+ $self->{components} = {
+ powersupply_subsystem => undef,
+ fan_subsystem => undef,
+ temperature_subsystem => undef,
+ cpu_subsystem => undef,
+ memory_subsystem => undef,
+ disk_subsystem => undef,
+ sensor_subsystem => undef,
+ };
+ $self->{serial} = 'unknown';
+ $self->{product} = 'unknown';
+ $self->{romversion} = 'unknown';
+ $self->collect();
+ if (! $self->{runtime}->{plugin}->check_messages()) {
+ $self->set_serial();
+# $self->check_for_buggy_firmware();
+# $self->analyze_cpus();
+# $self->analyze_powersupplies();
+# $self->analyze_fan_subsystem();
+# $self->analyze_temperatures();
+# $self->analyze_memory_subsystem();
+ $self->analyze_disk_subsystem();
+## $self->analyze_sensor_subsystem();
+# $self->check_cpus();
+# $self->check_powersupplies();
+# $self->check_fan_subsystem();
+# $self->check_temperatures();
+# $self->check_memory_subsystem();
+ $self->check_disk_subsystem();
+## $self->check_sensor_subsystem();
+ }
+}
+
+sub identify {
+ my $self = shift;
+ return sprintf "System: '%s', S/N: '%s', ROM: '%s'",
+ $self->{product}, $self->{serial}, $self->{romversion};
+}
+
+sub check_for_buggy_firmware {
+ my $self = shift;
+ my @buggyfirmwares = (
+ "P24 12/11/2001",
+ "P24 11/15/2002",
+ "D13 06/03/2003",
+ "D13 09/15/2004",
+ "P20 12/17/2002"
+ );
+ $self->{runtime}->{options}->{buggy_firmware} =
+ grep /^$self->{romversion}/, @buggyfirmwares;
+}
+
+sub dump {
+ my $self = shift;
+ printf STDERR "serial %s\n", $self->{serial};
+ printf STDERR "product %s\n", $self->{product};
+ printf STDERR "romversion %s\n", $self->{romversion};
+ printf STDERR "%s\n", Data::Dumper::Dumper($self->{components});
+}
+
+sub analyze_powersupplies {
+ my $self = shift;
+ $self->{components}->{powersupply_subsystem} =
+ HP::Storage::Component::PowersupplySubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_fan_subsystem {
+ my $self = shift;
+ $self->{components}->{fan_subsystem} =
+ HP::Storage::Component::FanSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_temperatures {
+ my $self = shift;
+ $self->{components}->{temperature_subsystem} =
+ HP::Storage::Component::TemperatureSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_cpus {
+ my $self = shift;
+ $self->{components}->{cpu_subsystem} =
+ HP::Storage::Component::CpuSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_memory_subsystem {
+ my $self = shift;
+ $self->{components}->{memory_subsystem} =
+ HP::Storage::Component::MemorySubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_disk_subsystem {
+ my $self = shift;
+ $self->{components}->{disk_subsystem} =
+ HP::Proliant::Component::DiskSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub analyze_sensor_subsystem {
+ my $self = shift;
+ $self->{components}->{sensor_subsystem} =
+ HP::FCMGMT::Component::SensorSubsystem->new(
+ rawdata => $self->{rawdata},
+ method => $self->{method},
+ runtime => $self->{runtime},
+ );
+}
+
+sub check_cpus {
+ my $self = shift;
+ $self->{components}->{cpu_subsystem}->check();
+ $self->{components}->{cpu_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_powersupplies {
+ my $self = shift;
+ $self->{components}->{powersupply_subsystem}->check();
+ $self->{components}->{powersupply_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_fan_subsystem {
+ my $self = shift;
+ $self->{components}->{fan_subsystem}->check();
+ $self->{components}->{fan_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_temperatures {
+ my $self = shift;
+ $self->{components}->{temperature_subsystem}->check();
+ $self->{components}->{temperature_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_memory_subsystem {
+ my $self = shift;
+ $self->{components}->{memory_subsystem}->check();
+ $self->{components}->{memory_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 2;
+}
+
+sub check_disk_subsystem {
+ my $self = shift;
+ $self->{components}->{disk_subsystem}->check();
+ $self->{components}->{disk_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 1;
+}
+
+sub check_sensor_subsystem {
+ my $self = shift;
+ $self->{components}->{isensor_subsystem}->check();
+ $self->{components}->{sensor_subsystem}->dump()
+ if $self->{runtime}->{options}->{verbose} >= 1;
+}
+
+
+sub collect {
+ my $self = shift;
+ if ($self->{runtime}->{plugin}->opts->snmpwalk) {
+ my $cpqSeMibCondition = '1.3.6.1.4.1.232.6.1.3.0';
+ # rindsarsch!
+ $self->{rawdata}->{$cpqSeMibCondition} = 0;
+ if (! exists $self->{rawdata}->{$cpqSeMibCondition}) {
+ $self->add_message(CRITICAL,
+ 'snmpwalk returns no health data (cpqhlth-mib)');
+ }
+ } else {
+ my $net_snmp_version = Net::SNMP->VERSION(); # 5.002000 or 6.000000
+ #$params{'-translate'} = [
+ # -all => 0x0
+ #];
+ my ($session, $error) =
+ Net::SNMP->session(%{$self->{runtime}->{snmpparams}});
+ if (! defined $session) {
+ $self->{plugin}->add_message(CRITICAL, 'cannot create session object');
+ $self->trace(1, Data::Dumper::Dumper($self->{runtime}->{snmpparams}));
+ } else {
+ # revMajor is often used for discovery of hp devices
+ my $cpqSeMibRev = '1.3.6.1.4.1.232.6.1';
+ my $cpqSeMibRevMajor = '1.3.6.1.4.1.232.6.1.1.0';
+ my $cpqSeMibCondition = '1.3.6.1.4.1.232.6.1.3.0';
+ my $result = $session->get_request(
+ -varbindlist => [$cpqSeMibCondition]
+ );
+ # rindsarsch!
+ $result->{$cpqSeMibCondition} = 0;
+ if (!defined($result) ||
+ $result->{$cpqSeMibCondition} eq 'noSuchInstance' ||
+ $result->{$cpqSeMibCondition} eq 'noSuchObject' ||
+ $result->{$cpqSeMibCondition} eq 'endOfMibView') {
+ $self->add_message(CRITICAL,
+ 'snmpwalk returns no health data (cpqhlth-mib)');
+ $session->close;
+ } else {
+ # this is not reliable. many agents return 4=failed
+ #if ($result->{$cpqSeMibCondition} != 2) {
+ # $obstacle = "cmapeerstart";
+ #}
+ }
+ }
+ if (! $self->{runtime}->{plugin}->check_messages()) {
+ # snmp peer is alive
+ $self->trace(2, sprintf "Protocol is %s",
+ $self->{runtime}->{snmpparams}->{'-version'});
+ my $cpqSsSys = "1.3.6.1.4.1.232.8";
+ $session->translate;
+ my $response = {}; #break the walk up in smaller pieces
+ my $tic = time; my $tac = $tic;
+ my $response1 = $session->get_table(
+ -baseoid => $cpqSsSys);
+ $tac = time;
+ $self->trace(2, sprintf "%03d seconds for walk cpqSsSys (%d oids)",
+ $tac - $tic, scalar(keys %{$response1}));
+ $session->close;
+ map { $response->{$_} = $response1->{$_} } keys %{$response1};
+ map { $response->{$_} =~ s/^\s+//; $response->{$_} =~ s/\s+$//; }
+ keys %$response;
+ $self->{rawdata} = $response;
+ }
+ }
+ return $self->{runtime}->{plugin}->check_messages();
+}
+
+sub set_serial {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+ my @serials = ();
+ my @models = ();
+ my @fws = ();
+ my $cpqSsBackplaneEntry = '1.3.6.1.4.1.232.8.2.2.6.1';
+ my $cpqSsBackplaneFWRev = '1.3.6.1.4.1.232.8.2.2.6.1.3';
+ my $cpqSsBackplaneModel = '1.3.6.1.4.1.232.8.2.2.6.1.9';
+ my $cpqSsBackplaneSerialNumber = '1.3.6.1.4.1.232.8.2.2.6.1.13';
+ # INDEX { cpqSsBackplaneChassisIndex, cpqSsBackplaneIndex }
+ my @indexes = SNMP::Utils::get_indices($snmpwalk,
+ $cpqSsBackplaneEntry);
+ foreach (@indexes) {
+ my($idx1, $idx2) = ($_->[0], $_->[1]);
+ my $fw = SNMP::Utils::get_object($snmpwalk,
+ $cpqSsBackplaneFWRev, $idx1, $idx2);
+ my $model = SNMP::Utils::get_object($snmpwalk,
+ $cpqSsBackplaneModel, $idx1, $idx2);
+ my $serial = SNMP::Utils::get_object($snmpwalk,
+ $cpqSsBackplaneSerialNumber, $idx1, $idx2);
+ push(@serials, $serial);
+ push(@models, $model);
+ push(@fws, $fw);
+ }
+
+ $self->{serial} = join('/', @serials);
+ $self->{product} = join('/', @models);
+ $self->{romversion} = join('/', @fws);
+ $self->{runtime}->{product} = $self->{product};
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/StorageWorks.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/StorageWorks.pm
new file mode 100755
index 0000000..5792961
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/HP/StorageWorks.pm
@@ -0,0 +1,157 @@
+package HP::StorageWorks;
+
+use strict;
+use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
+use Data::Dumper;
+
+our @ISA = qw(HP::Server);
+
+sub init {
+ my $self = shift;
+ $self->{serial} = 'unknown';
+ $self->{product} = 'unknown';
+ $self->{romversion} = 'unknown';
+ $self->collect();
+ if (! $self->{runtime}->{plugin}->check_messages()) {
+ $self->set_serial();
+ $self->overall_init();
+ $self->overall_check();
+ }
+}
+
+sub overall_init {
+ my $self = shift;
+ my %params = @_;
+ my $snmpwalk = $self->{rawdata};
+ my $cpqHoMibStatusArray = '1.3.6.1.4.1.232.11.2.10.1.0';
+ $self->{cpqHoMibStatusArray} = SNMP::Utils::get_object(
+ $snmpwalk, $cpqHoMibStatusArray);
+ if ($self->{cpqHoMibStatusArray} =~ /^(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/) {
+ $self->{cpqHoMibStatusArray} = 1 * $2;
+ } elsif ($self->{cpqHoMibStatusArray} =~ /^0x.*(\d\d)(\d\d)(\d\d)(\d\d)$/) {
+ $self->{cpqHoMibStatusArray} = 1 * $2;
+ }
+}
+
+sub overall_check {
+ my $self = shift;
+ if ($self->{cpqHoMibStatusArray} == 4) {
+ $self->add_info('overall status is failed');
+ $self->add_message(CRITICAL, 'overall status is failed');
+ } elsif ($self->{cpqHoMibStatusArray} == 3) {
+ $self->add_info('overall status is degraded');
+ $self->add_message(WARNING, 'overall status is degraded');
+ } elsif ($self->{cpqHoMibStatusArray} == 2) {
+ $self->add_info('overall status is ok');
+ $self->add_message(OK, 'overall status is ok');
+ } elsif ($self->{cpqHoMibStatusArray} == 1) {
+ $self->add_info('overall status is other');
+ $self->add_message(UNKNOWN, 'overall status is other');
+ }
+}
+
+sub identify {
+ my $self = shift;
+ return $self->{productname};
+}
+
+sub dump {
+ my $self = shift;
+ printf STDERR "serial %s\n", $self->{serial};
+ printf STDERR "product %s\n", $self->{product};
+ printf STDERR "romversion %s\n", $self->{romversion};
+ printf STDERR "%s\n", Data::Dumper::Dumper($self->{components});
+}
+
+sub collect {
+ my $self = shift;
+ if ($self->{runtime}->{plugin}->opts->snmpwalk) {
+ my $cpqHoMibStatusArray = '1.3.6.1.4.1.232.11.2.10.1.0';
+ if (! exists $self->{rawdata}->{$cpqHoMibStatusArray}) {
+ $self->add_message(CRITICAL,
+ 'snmpwalk returns no health data (cpqhost-mib)');
+ }
+ } else {
+ my $net_snmp_version = Net::SNMP->VERSION(); # 5.002000 or 6.000000
+ #$params{'-translate'} = [
+ # -all => 0x0
+ #];
+ my ($session, $error) =
+ Net::SNMP->session(%{$self->{runtime}->{snmpparams}});
+ if (! defined $session) {
+ $self->{plugin}->add_message(CRITICAL, 'cannot create session object');
+ $self->trace(1, Data::Dumper::Dumper($self->{runtime}->{snmpparams}));
+ }
+ if (! $self->{runtime}->{plugin}->check_messages()) {
+ # snmp peer is alive
+ $self->trace(2, sprintf "Protocol is %s",
+ $self->{runtime}->{snmpparams}->{'-version'});
+ my $cpqHoMibStatusArray = '1.3.6.1.4.1.232.11.2.10.1.0';
+ $session->translate;
+ my $tic = time;
+ my $response = $session->get_request(
+ -varbindlist => [$cpqHoMibStatusArray]
+ );
+ my $tac = time;
+ $self->trace(2, sprintf "%03d seconds for walk cpqHoMibStatusArray (%d oids)",
+ $tac - $tic, scalar(keys %{$response}));
+ $session->close;
+ map { $response->{$_} =~ s/^\s+//; $response->{$_} =~ s/\s+$//; }
+ keys %$response;
+ $self->{rawdata} = $response;
+ }
+ }
+ return $self->{runtime}->{plugin}->check_messages();
+}
+
+sub set_serial {
+ my $self = shift;
+ my $snmpwalk = $self->{rawdata};
+ my @serials = ();
+ my @models = ();
+ my @fws = ();
+ my $cpqSsBackplaneEntry = '1.3.6.1.4.1.232.8.2.2.6.1';
+ my $cpqSsBackplaneFWRev = '1.3.6.1.4.1.232.8.2.2.6.1.3';
+ my $cpqSsBackplaneModel = '1.3.6.1.4.1.232.8.2.2.6.1.9';
+ my $cpqSsBackplaneSerialNumber = '1.3.6.1.4.1.232.8.2.2.6.1.13';
+ # INDEX { cpqSsBackplaneChassisIndex, cpqSsBackplaneIndex }
+ my @indexes = SNMP::Utils::get_indices($snmpwalk,
+ $cpqSsBackplaneEntry);
+ foreach (@indexes) {
+ my($idx1, $idx2) = ($_->[0], $_->[1]);
+ my $fw = SNMP::Utils::get_object($snmpwalk,
+ $cpqSsBackplaneFWRev, $idx1, $idx2);
+ my $model = SNMP::Utils::get_object($snmpwalk,
+ $cpqSsBackplaneModel, $idx1, $idx2);
+ my $serial = SNMP::Utils::get_object($snmpwalk,
+ $cpqSsBackplaneSerialNumber, $idx1, $idx2);
+ push(@serials, $serial);
+ push(@models, $model);
+ push(@fws, $fw);
+ }
+
+ $self->{serial} = join('/', @serials);
+ $self->{product} = join('/', @models);
+ $self->{romversion} = join('/', @fws);
+ $self->{runtime}->{product} = $self->{product};
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/Makefile.am b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/Makefile.am
new file mode 100755
index 0000000..20f32c4
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/Makefile.am
@@ -0,0 +1,104 @@
+## Process this file with automake to produce Makefile.in
+
+SED=/bin/sed
+GREP=/bin/grep
+CAT=/bin/cat
+ECHO=/bin/echo
+
+SUFFIXES = .pl .pm .sh
+
+VPATH=$(top_srcdir) $(top_srcdir)/plugins-scripts $(top_srcdir)/plugins-scripts/t
+
+libexec_SCRIPTS=check_hpasm
+MY_MODULES=
+EXTRA_MODULES=\
+ Nagios/MiniPlugin.pm \
+ HP/SNMP/Utils.pm \
+ HP/Proliant/Component/EventSubsystem.pm \
+ HP/Proliant/Component/EventSubsystem/CLI.pm \
+ HP/Proliant/Component/EventSubsystem/SNMP.pm \
+ HP/Proliant/Component/PowersupplySubsystem.pm \
+ HP/Proliant/Component/PowersupplySubsystem/CLI.pm \
+ HP/Proliant/Component/PowersupplySubsystem/SNMP.pm \
+ HP/Proliant/Component/TemperatureSubsystem.pm \
+ HP/Proliant/Component/TemperatureSubsystem/CLI.pm \
+ HP/Proliant/Component/TemperatureSubsystem/SNMP.pm \
+ HP/Proliant/Component/CpuSubsystem.pm \
+ HP/Proliant/Component/CpuSubsystem/CLI.pm \
+ HP/Proliant/Component/CpuSubsystem/SNMP.pm \
+ HP/Proliant/Component/FanSubsystem.pm \
+ HP/Proliant/Component/FanSubsystem/CLI.pm \
+ HP/Proliant/Component/FanSubsystem/SNMP.pm \
+ HP/Proliant/Component/MemorySubsystem/CLI.pm \
+ HP/Proliant/Component/MemorySubsystem/SNMP.pm \
+ HP/Proliant/Component/MemorySubsystem.pm \
+ HP/Proliant/Component/NicSubsystem/SNMP.pm \
+ HP/Proliant/Component/NicSubsystem.pm \
+ HP/Proliant/Component/AsrSubsystem/CLI.pm \
+ HP/Proliant/Component/AsrSubsystem/SNMP.pm \
+ HP/Proliant/Component/AsrSubsystem.pm \
+ HP/Proliant/Component/SNMP.pm \
+ HP/Proliant/Component/DiskSubsystem/Da/CLI.pm \
+ HP/Proliant/Component/DiskSubsystem/Da/SNMP.pm \
+ HP/Proliant/Component/DiskSubsystem/Da.pm \
+ HP/Proliant/Component/DiskSubsystem/Sas/CLI.pm \
+ HP/Proliant/Component/DiskSubsystem/Sas/SNMP.pm \
+ HP/Proliant/Component/DiskSubsystem/Sas.pm \
+ HP/Proliant/Component/DiskSubsystem/Scsi/CLI.pm \
+ HP/Proliant/Component/DiskSubsystem/Scsi/SNMP.pm \
+ HP/Proliant/Component/DiskSubsystem/Scsi.pm \
+ HP/Proliant/Component/DiskSubsystem/Ide/CLI.pm \
+ HP/Proliant/Component/DiskSubsystem/Ide/SNMP.pm \
+ HP/Proliant/Component/DiskSubsystem/Ide.pm \
+ HP/Proliant/Component/DiskSubsystem/Fca/CLI.pm \
+ HP/Proliant/Component/DiskSubsystem/Fca/SNMP.pm \
+ HP/Proliant/Component/DiskSubsystem/Fca.pm \
+ HP/Proliant/Component/DiskSubsystem.pm \
+ HP/Proliant/Component/BatterySubsystem/CLI.pm \
+ HP/Proliant/Component/BatterySubsystem/SNMP.pm \
+ HP/Proliant/Component/BatterySubsystem.pm \
+ HP/Proliant/Component.pm \
+ HP/Proliant.pm \
+ HP/BladeSystem/Component/CommonEnclosureSubsystem.pm \
+ HP/BladeSystem/Component/CommonEnclosureSubsystem/FanSubsystem.pm \
+ HP/BladeSystem/Component/CommonEnclosureSubsystem/TempSubsystem.pm \
+ HP/BladeSystem/Component/CommonEnclosureSubsystem/FuseSubsystem.pm \
+ HP/BladeSystem/Component/CommonEnclosureSubsystem/ManagerSubsystem.pm \
+ HP/BladeSystem/Component/PowerEnclosureSubsystem.pm \
+ HP/BladeSystem/Component/PowerSupplySubsystem.pm \
+ HP/BladeSystem/Component/NetConnectorSubsystem.pm \
+ HP/BladeSystem/Component/ServerBladeSubsystem.pm \
+ HP/BladeSystem/Component.pm \
+ HP/BladeSystem.pm \
+ HP/Storage.pm \
+ HP/StorageWorks.pm \
+ HP/Server.pm
+EXTRA_DIST=check_hpasm.pl $(EXTRA_MODULES)
+
+CLEANFILES=$(libexec_SCRIPTS)
+
+AM_INSTALL_PROGRAM_FLAGS=@INSTALL_OPTS@
+
+.pm :
+ $(AWK) -f ./subst $< > $@
+ chmod +x $@
+
+.pl :
+ $(AWK) -f ./subst $< > $@
+ chmod +x $@
+
+.sh :
+ $(AWK) -f ./subst $< > $@
+ chmod +x $@
+
+$(libexec_SCRIPTS) : $(EXTRA_DIST)
+ $(ECHO) "#! #PERL# -w" | $(AWK) -f ./subst > $@
+ $(ECHO) >> $@
+ for m in ${EXTRA_MODULES}; do \
+ $(SED) -e 's/^1;//g' < $$m | $(AWK) -f ./subst | $(GREP) -v "use Nagios::Plugin" >> $@; \
+ done
+ $(ECHO) "package main;" >> $@
+ $(CAT) check_hpasm.pl | $(AWK) -f ./subst >> $@
+ chmod +x $@
+#| $(GREP) -v "use Nagios" >> $@;
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/Makefile.in b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/Makefile.in
new file mode 100644
index 0000000..e885fb4
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/Makefile.in
@@ -0,0 +1,574 @@
+# Makefile.in generated by automake 1.15 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = plugins-scripts
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES = subst
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(libexecdir)"
+SCRIPTS = $(libexec_SCRIPTS)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/subst.in
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+VPATH = $(top_srcdir) $(top_srcdir)/plugins-scripts $(top_srcdir)/plugins-scripts/t
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CELSIUS = @CELSIUS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EXTENDEDINFO = @EXTENDEDINFO@
+HPACUCLI = @HPACUCLI@
+HWINFO = @HWINFO@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_OPTS = @INSTALL_OPTS@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NOINSTLEVEL = @NOINSTLEVEL@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERFDATA = @PERFDATA@
+PERL = @PERL@
+RELEASE = @RELEASE@
+SET_MAKE = @SET_MAKE@
+SH = @SH@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SUPPORT = @SUPPORT@
+VERSION = @VERSION@
+WARRANTY = @WARRANTY@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+with_nagios_group = @with_nagios_group@
+with_nagios_user = @with_nagios_user@
+SED = /bin/sed
+GREP = /bin/grep
+CAT = /bin/cat
+ECHO = /bin/echo
+SUFFIXES = .pl .pm .sh
+libexec_SCRIPTS = check_hpasm
+MY_MODULES =
+EXTRA_MODULES = \
+ Nagios/MiniPlugin.pm \
+ HP/SNMP/Utils.pm \
+ HP/Proliant/Component/EventSubsystem.pm \
+ HP/Proliant/Component/EventSubsystem/CLI.pm \
+ HP/Proliant/Component/EventSubsystem/SNMP.pm \
+ HP/Proliant/Component/PowersupplySubsystem.pm \
+ HP/Proliant/Component/PowersupplySubsystem/CLI.pm \
+ HP/Proliant/Component/PowersupplySubsystem/SNMP.pm \
+ HP/Proliant/Component/TemperatureSubsystem.pm \
+ HP/Proliant/Component/TemperatureSubsystem/CLI.pm \
+ HP/Proliant/Component/TemperatureSubsystem/SNMP.pm \
+ HP/Proliant/Component/CpuSubsystem.pm \
+ HP/Proliant/Component/CpuSubsystem/CLI.pm \
+ HP/Proliant/Component/CpuSubsystem/SNMP.pm \
+ HP/Proliant/Component/FanSubsystem.pm \
+ HP/Proliant/Component/FanSubsystem/CLI.pm \
+ HP/Proliant/Component/FanSubsystem/SNMP.pm \
+ HP/Proliant/Component/MemorySubsystem/CLI.pm \
+ HP/Proliant/Component/MemorySubsystem/SNMP.pm \
+ HP/Proliant/Component/MemorySubsystem.pm \
+ HP/Proliant/Component/NicSubsystem/SNMP.pm \
+ HP/Proliant/Component/NicSubsystem.pm \
+ HP/Proliant/Component/AsrSubsystem/CLI.pm \
+ HP/Proliant/Component/AsrSubsystem/SNMP.pm \
+ HP/Proliant/Component/AsrSubsystem.pm \
+ HP/Proliant/Component/SNMP.pm \
+ HP/Proliant/Component/DiskSubsystem/Da/CLI.pm \
+ HP/Proliant/Component/DiskSubsystem/Da/SNMP.pm \
+ HP/Proliant/Component/DiskSubsystem/Da.pm \
+ HP/Proliant/Component/DiskSubsystem/Sas/CLI.pm \
+ HP/Proliant/Component/DiskSubsystem/Sas/SNMP.pm \
+ HP/Proliant/Component/DiskSubsystem/Sas.pm \
+ HP/Proliant/Component/DiskSubsystem/Scsi/CLI.pm \
+ HP/Proliant/Component/DiskSubsystem/Scsi/SNMP.pm \
+ HP/Proliant/Component/DiskSubsystem/Scsi.pm \
+ HP/Proliant/Component/DiskSubsystem/Ide/CLI.pm \
+ HP/Proliant/Component/DiskSubsystem/Ide/SNMP.pm \
+ HP/Proliant/Component/DiskSubsystem/Ide.pm \
+ HP/Proliant/Component/DiskSubsystem/Fca/CLI.pm \
+ HP/Proliant/Component/DiskSubsystem/Fca/SNMP.pm \
+ HP/Proliant/Component/DiskSubsystem/Fca.pm \
+ HP/Proliant/Component/DiskSubsystem.pm \
+ HP/Proliant/Component/BatterySubsystem/CLI.pm \
+ HP/Proliant/Component/BatterySubsystem/SNMP.pm \
+ HP/Proliant/Component/BatterySubsystem.pm \
+ HP/Proliant/Component.pm \
+ HP/Proliant.pm \
+ HP/BladeSystem/Component/CommonEnclosureSubsystem.pm \
+ HP/BladeSystem/Component/CommonEnclosureSubsystem/FanSubsystem.pm \
+ HP/BladeSystem/Component/CommonEnclosureSubsystem/TempSubsystem.pm \
+ HP/BladeSystem/Component/CommonEnclosureSubsystem/FuseSubsystem.pm \
+ HP/BladeSystem/Component/CommonEnclosureSubsystem/ManagerSubsystem.pm \
+ HP/BladeSystem/Component/PowerEnclosureSubsystem.pm \
+ HP/BladeSystem/Component/PowerSupplySubsystem.pm \
+ HP/BladeSystem/Component/NetConnectorSubsystem.pm \
+ HP/BladeSystem/Component/ServerBladeSubsystem.pm \
+ HP/BladeSystem/Component.pm \
+ HP/BladeSystem.pm \
+ HP/Storage.pm \
+ HP/StorageWorks.pm \
+ HP/Server.pm
+
+EXTRA_DIST = check_hpasm.pl $(EXTRA_MODULES)
+CLEANFILES = $(libexec_SCRIPTS)
+AM_INSTALL_PROGRAM_FLAGS = @INSTALL_OPTS@
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .pl .pm .sh
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins-scripts/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu plugins-scripts/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+subst: $(top_builddir)/config.status $(srcdir)/subst.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-libexecSCRIPTS: $(libexec_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ @list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libexecdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libexecdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-libexecSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ dir='$(DESTDIR)$(libexecdir)'; $(am__uninstall_files_from_dir)
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS)
+installdirs:
+ for dir in "$(DESTDIR)$(libexecdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libexecSCRIPTS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libexecSCRIPTS
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic cscopelist-am \
+ ctags-am distclean distclean-generic distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-libexecSCRIPTS install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags-am uninstall uninstall-am \
+ uninstall-libexecSCRIPTS
+
+.PRECIOUS: Makefile
+
+
+.pm :
+ $(AWK) -f ./subst $< > $@
+ chmod +x $@
+
+.pl :
+ $(AWK) -f ./subst $< > $@
+ chmod +x $@
+
+.sh :
+ $(AWK) -f ./subst $< > $@
+ chmod +x $@
+
+$(libexec_SCRIPTS) : $(EXTRA_DIST)
+ $(ECHO) "#! #PERL# -w" | $(AWK) -f ./subst > $@
+ $(ECHO) >> $@
+ for m in ${EXTRA_MODULES}; do \
+ $(SED) -e 's/^1;//g' < $$m | $(AWK) -f ./subst | $(GREP) -v "use Nagios::Plugin" >> $@; \
+ done
+ $(ECHO) "package main;" >> $@
+ $(CAT) check_hpasm.pl | $(AWK) -f ./subst >> $@
+ chmod +x $@
+#| $(GREP) -v "use Nagios" >> $@;
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/Nagios/MiniPlugin.pm b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/Nagios/MiniPlugin.pm
new file mode 100755
index 0000000..c4ad442
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/Nagios/MiniPlugin.pm
@@ -0,0 +1,333 @@
+package Nagios::MiniPlugin;
+
+use strict;
+use Getopt::Long qw(:config no_ignore_case bundling);
+
+our @STATUS_CODES = qw(OK WARNING CRITICAL UNKNOWN DEPENDENT);
+
+require Exporter;
+our @ISA = qw(Exporter);
+our @EXPORT = (@STATUS_CODES, qw(nagios_exit nagios_die check_messages));
+our @EXPORT_OK = qw(%ERRORS);
+
+use constant OK => 0;
+use constant WARNING => 1;
+use constant CRITICAL => 2;
+use constant UNKNOWN => 3;
+use constant DEPENDENT => 4;
+
+our %ERRORS = (
+ 'OK' => OK,
+ 'WARNING' => WARNING,
+ 'CRITICAL' => CRITICAL,
+ 'UNKNOWN' => UNKNOWN,
+ 'DEPENDENT' => DEPENDENT,
+);
+
+our %STATUS_TEXT = reverse %ERRORS;
+
+sub new {
+ my $class = shift;
+ my %params = @_;
+ my $self = {
+ perfdata => [],
+ messages => {
+ ok => [],
+ warning => [],
+ critical => [],
+ unknown => [],
+ },
+ args => [],
+ opts => Nagios::MiniPlugin::Getopt->new(%params),
+ };
+ foreach (qw(shortname usage version url plugin blurb extra
+ license timeout)) {
+ $self->{$_} = $params{$_};
+ }
+ bless $self, $class;
+}
+
+sub add_arg {
+ my $self = shift;
+ $self->{opts}->add_arg(@_);
+}
+
+sub getopts {
+ my $self = shift;
+ $self->{opts}->getopts();
+}
+
+sub opts {
+ my $self = shift;
+ return $self->{opts};
+}
+
+sub add_message {
+ my $self = shift;
+ my ($code, @messages) = @_;
+ $code = (qw(ok warning critical unknown))[$code] if $code =~ /^\d+$/;
+ $code = lc $code;
+ push @{$self->{messages}->{$code}}, @messages;
+}
+
+sub remove_message {
+ my $self = shift;
+ my ($code, @messages) = @_;
+ $code = (qw(ok warning critical unknown))[$code] if $code =~ /^\d+$/;
+ $code = lc $code;
+ pop @{$self->{messages}->{$code}};
+}
+
+sub add_perfdata {
+ my ($self, %args) = @_;
+ my $str = $args{label}.'='.$args{value};
+ if ($args{uom}) {
+ $str .= $args{uom};
+ }
+ if ($args{warning}) {
+ $str .= ';'.$args{warning};
+ }
+ if ($args{critical}) {
+ $str .= ';'.$args{critical};
+ }
+ push @{$self->{perfdata}}, $str;
+}
+
+
+sub check_messages {
+ my $self = shift;
+ my %args = @_;
+
+ # Add object messages to any passed in as args
+ for my $code (qw(critical warning unknown ok)) {
+ my $messages = $self->{messages}->{$code} || [];
+ if ($args{$code}) {
+ unless (ref $args{$code} eq 'ARRAY') {
+ if ($code eq 'ok') {
+ $args{$code} = [ $args{$code} ];
+ }
+ }
+ push @{$args{$code}}, @$messages;
+ } else {
+ $args{$code} = $messages;
+ }
+ }
+ my %arg = %args;
+ $arg{join} = ' ' unless defined $arg{join};
+
+ # Decide $code
+ my $code = OK;
+ $code ||= CRITICAL if @{$arg{critical}};
+ $code ||= WARNING if @{$arg{warning}};
+ $code ||= UNKNOWN if @{$arg{unknown}};
+ return $code unless wantarray;
+
+ # Compose message
+ my $message = '';
+ if ($arg{join_all}) {
+ $message = join( $arg{join_all},
+ map { @$_ ? join( $arg{'join'}, @$_) : () }
+ $arg{critical},
+ $arg{warning},
+ $arg{unknown},
+ $arg{ok} ? (ref $arg{ok} ? $arg{ok} : [ $arg{ok} ]) : []
+ );
+ }
+
+ else {
+ $message ||= join( $arg{'join'}, @{$arg{critical}} )
+ if $code == CRITICAL;
+ $message ||= join( $arg{'join'}, @{$arg{warning}} )
+ if $code == WARNING;
+ $message ||= join( $arg{'join'}, @{$arg{unknown}} )
+ if $code == UNKNOWN;
+ $message ||= ref $arg{ok} ? join( $arg{'join'}, @{$arg{ok}} ) : $arg{ok}
+ if $arg{ok};
+ }
+
+ return ($code, $message);
+}
+
+sub nagios_exit {
+ my $self = shift;
+ my ($code, $message, $arg) = @_;
+ $code = $ERRORS{$code} if defined $code && exists $ERRORS{$code};
+ $code = UNKNOWN unless defined $code && exists $STATUS_TEXT{$code};
+ $message = '' unless defined $message;
+ if (ref $message && ref $message eq 'ARRAY') {
+ $message = join(' ', map { chomp; $_ } @$message);
+ } else {
+ chomp $message;
+ }
+ my $output = "$STATUS_TEXT{$code}";
+ $output .= " - $message" if defined $message && $message ne '';
+ if (scalar (@{$self->{perfdata}})) {
+ $output .= " | ".join(" ", @{$self->{perfdata}});
+ }
+ $output .= "\n";
+ print $output;
+ exit $code;
+}
+
+package Nagios::MiniPlugin::Getopt;
+
+use strict;
+use File::Basename;
+use Data::Dumper;
+use Getopt::Long qw(:config no_ignore_case bundling);
+
+# Standard defaults
+my %DEFAULT = (
+ timeout => 60,
+ verbose => 0,
+ license =>
+"This nagios plugin is free software, and comes with ABSOLUTELY NO WARRANTY.
+It may be used, redistributed and/or modified under the terms of the GNU
+General Public Licence (see http://www.fsf.org/licensing/licenses/gpl.txt).",
+);
+# Standard arguments
+my @ARGS = ({
+ spec => 'usage|?',
+ help => "-?, --usage\n Print usage information",
+ }, {
+ spec => 'help|h',
+ help => "-h, --help\n Print detailed help screen",
+ }, {
+ spec => 'version|V',
+ help => "-V, --version\n Print version information",
+ }, {
+ #spec => 'extra-opts:s@',
+ #help => "--extra-opts=[<section>[@<config_file>]]\n Section and/or config_file from which to load extra options (may repeat)",
+ }, {
+ spec => 'timeout|t=i',
+ help => "-t, --timeout=INTEGER\n Seconds before plugin times out (default: %s)",
+ default => $DEFAULT{timeout},
+ }, {
+ spec => 'verbose|v+',
+ help => "-v, --verbose\n Show details for command-line debugging (can repeat up to 3 times)",
+ default => $DEFAULT{verbose},
+ },
+);
+# Standard arguments we traditionally display last in the help output
+my %DEFER_ARGS = map { $_ => 1 } qw(timeout verbose);
+
+sub _init
+{
+ my $self = shift;
+ my %params = @_;
+ # Check params
+ my $plugin = basename($ENV{NAGIOS_PLUGIN} || $0);
+ #my %attr = validate( @_, {
+ my %attr = (
+ usage => 1,
+ version => 0,
+ url => 0,
+ plugin => { default => $plugin },
+ blurb => 0,
+ extra => 0,
+ 'extra-opts' => 0,
+ license => { default => $DEFAULT{license} },
+ timeout => { default => $DEFAULT{timeout} },
+ );
+
+ # Add attr to private _attr hash (except timeout)
+ $self->{timeout} = delete $attr{timeout};
+ $self->{_attr} = { %attr };
+ foreach (keys %{$self->{_attr}}) {
+ if (exists $params{$_}) {
+ $self->{_attr}->{$_} = $params{$_};
+ } else {
+ $self->{_attr}->{$_} = $self->{_attr}->{$_}->{default}
+ if ref ($self->{_attr}->{$_}) eq 'HASH' &&
+ exists $self->{_attr}->{$_}->{default};
+ }
+ }
+ # Chomp _attr values
+ chomp foreach values %{$self->{_attr}};
+
+ # Setup initial args list
+ $self->{_args} = [ grep { exists $_->{spec} } @ARGS ];
+
+ $self
+}
+
+sub new
+{
+ my $class = shift;
+ my $self = bless {}, $class;
+ $self->_init(@_);
+}
+
+sub add_arg {
+ my $self = shift;
+ my %arg = @_;
+ push (@{$self->{_args}}, \%arg);
+}
+
+sub getopts {
+ my $self = shift;
+ my %commandline = ();
+ my @params = map { $_->{spec} } @{$self->{_args}};
+ if (! GetOptions(\%commandline, @params)) {
+ $self->print_help();
+ exit 0;
+ } else {
+ no strict 'refs';
+ do { $self->print_help(); exit 0; } if $commandline{help};
+ do { $self->print_version(); exit 0 } if $commandline{version};
+ do { $self->print_usage(); exit 0 } if $commandline{usage};
+ foreach (map { $_->{spec} =~ /^([\w\-]+)/; $1; } @{$self->{_args}}) {
+ my $field = $_;
+ *{"$field"} = sub {
+ return $self->{opts}->{$field};
+ };
+ }
+ foreach (grep { exists $_->{default} } @{$self->{_args}}) {
+ $_->{spec} =~ /^([\w\-]+)/;
+ my $spec = $1;
+ $self->{opts}->{$spec} = $_->{default};
+ }
+ foreach (keys %commandline) {
+ $self->{opts}->{$_} = $commandline{$_};
+ }
+ }
+}
+
+sub get {
+ my $self = shift;
+ my $opt = shift;
+ return $self->{opts}->{$opt};
+}
+
+sub print_help {
+ my $self = shift;
+ $self->print_version();
+ printf "\n%s\n", $self->{_attr}->{license};
+ printf "\n%s\n\n", $self->{_attr}->{blurb};
+ $self->print_usage();
+ foreach (@{$self->{_args}}) {
+ printf " %s\n", $_->{help};
+ }
+ exit 0;
+}
+
+sub print_usage {
+ my $self = shift;
+ printf $self->{_attr}->{usage}, $self->{_attr}->{plugin};
+ print "\n";
+}
+
+sub print_version {
+ my $self = shift;
+ printf "%s %s", $self->{_attr}->{plugin}, $self->{_attr}->{version};
+ printf " [%s]", $self->{_attr}->{url} if $self->{_attr}->{url};
+ print "\n";
+}
+
+sub print_license {
+ my $self = shift;
+ printf "%s\n", $self->{_attr}->{license};
+ print "\n";
+}
+
+1;
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/check_hpasm.pl b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/check_hpasm.pl
new file mode 100755
index 0000000..65495f6
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/check_hpasm.pl
@@ -0,0 +1,215 @@
+#! /usr/bin/perl
+
+use strict;
+
+my $CELSIUS = 1;
+my $PERFDATA = 1;
+my $EXTENDEDINFO = 1;
+my $HWINFO = 1;
+my $HPACUCLI = 1;
+my $NOINSTLEVEL = 'unknown';
+
+use constant OK => 0;
+use constant WARNING => 1;
+use constant CRITICAL => 2;
+use constant UNKNOWN => 3;
+use constant DEPENDENT => 4;
+
+my $plugin = Nagios::MiniPlugin->new(
+ shortname => '',
+ usage => 'Usage: %s [ -v|--verbose ] [ -t <timeout> ] '.
+ '--hostname <proliant> --community <snmp-community>'.
+ ' ...]',
+ version => '4.0',
+ blurb => 'This plugin checks the hardware of hp/compaq proliant servers',
+ url => 'http://labs.consol.de/nagios/check_hpasm',
+ timeout => 60,
+ shortname => '',
+);
+$plugin->add_arg(
+ spec => 'blacklist|b=s',
+ help => '--blacklist
+ Blacklist some (missing/failed) components',
+ required => 0,
+ default => '',
+);
+$plugin->add_arg(
+ spec => 'ignore-dimms|i',
+ help => '--ignore-dimms
+ Ignore "N/A"-DIMM status on misc. servers (e.g. older DL320)',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'ignore-fan-redundancy',
+ help => '--ignore-fan-redundancy
+ Ignore missing redundancy partners',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'customthresholds|c=s',
+ help => '--customthresholds
+ Use custom thresholds for certain temperatures',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'eventrange=s',
+ help => '--eventrange=<warningrange>/<criticalrange>
+ Period of time before critical IML events respecively become warnings or vanish
+ A range is descibed as a number and a unit (s, m, h, d), e.g. --eventrange 1h/20m',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'perfdata=s',
+ help => '--perfdata=[short]
+ Output performance data. If your performance data string becomes
+ too long and is truncated by Nagios, then you can use --perfdata=short
+ instead. This will output temperature tags without location information',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'hostname|H=s',
+ help => '--hostname
+ Hostname or IP-address of the server (SNMP mode only)',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'port=i',
+ help => '--port
+ The SNMP port to use (default: 161)',
+ required => 0,
+ default => 161,
+);
+$plugin->add_arg(
+ spec => 'protocol|P=s',
+ help => '--protocol
+ The SNMP protocol to use (default: 2c, other possibilities: 1,3)',
+ required => 0,
+ default => '2c',
+);
+$plugin->add_arg(
+ spec => 'domain|d=s',
+ help => '--domain
+ The transport protocol to use (default: udp, other possibilities: tcp)',
+ required => 0,
+ default => 'udp',
+);
+$plugin->add_arg(
+ spec => 'community|C=s',
+ help => '--community
+ SNMP community of the server (SNMP v1/2 only)',
+ required => 0,
+ default => 'public',
+);
+$plugin->add_arg(
+ spec => 'username=s',
+ help => '--username
+ The securityName for the USM security model (SNMPv3 only)',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'authpassword=s',
+ help => '--authpassword
+ The authentication password for SNMPv3',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'authprotocol=s',
+ help => '--authprotocol
+ The authentication protocol for SNMPv3 (md5|sha)',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'privpassword=s',
+ help => '--privpassword
+ The password for authPriv security level',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'privprotocol=s',
+ help => '--privprotocol
+ The private protocol for SNMPv3 (des|aes|aes128|3des|3desde)',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'snmpwalk=s',
+ help => '--snmpwalk
+ A file with the output of snmpwalk 1.3.6.1.4.1.232',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'hpasmcli=s',
+ help => '--hpasmcli
+ A file with the output of hpasmcli',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'servertype=s',
+ help => '--servertype
+ The type of the server: proliant (default) or bladesystem',
+ required => 0,
+);
+$plugin->add_arg(
+ spec => 'eval-nics',
+ help => '--eval-nics
+ Check network interfaces (and groups). Try it and report me whyt you think about it. I need to build up some know how on this subject. If get an error and you think, it is not justified for your configuration, please tell me about it. (alwasy send the output of "snmpwalk -On .... 1.3.6.1.4.1.232" and a description how you setup your nics and why it is correct opposed to the plugins error message',
+ required => 0,
+);
+
+$plugin->getopts();
+if (! $PERFDATA && $plugin->opts->get('perfdata')) {
+ $PERFDATA = 1;
+}
+if ($PERFDATA && $plugin->opts->get('perfdata') &&
+ ($plugin->opts->get('perfdata') eq 'short')) {
+ $PERFDATA = 2;
+}
+$plugin->{messages}->{unknown} = []; # wg. add_message(UNKNOWN,...)
+
+$plugin->{info} = []; # gefrickel
+
+$SIG{'ALRM'} = sub {
+ printf "UNKNOWN - check_hpasm timed out after %d seconds\n",
+ $plugin->opts->get('timeout');
+ exit $ERRORS{UNKNOWN};
+};
+alarm($plugin->opts->get('timeout'));
+
+my $server = HP::Server->new( runtime => {
+ plugin => $plugin,
+ options => {
+ servertype => $plugin->opts->get('servertype'),
+ verbose => $plugin->opts->get('verbose'),
+ scrapiron => 0,
+ ignore_fan_redundancy => $plugin->opts->get('ignore-fan-redundancy'),
+ ignore_dimms => $plugin->opts->get('ignore-dimms'),
+ customthresholds => $plugin->opts->get('customthresholds'),
+ eventrange => $plugin->opts->get('eventrange'),
+ blacklist => $plugin->opts->get('blacklist'),
+ celsius => $CELSIUS,
+ perfdata => $PERFDATA,
+ extendedinfo => $EXTENDEDINFO,
+ hwinfo => $HWINFO,
+ hpacucli => $HPACUCLI,
+ noinstlevel => $NOINSTLEVEL,
+ },
+},);
+if (! $plugin->check_messages()) {
+ $server->init();
+ $plugin->add_message(OK, $server->identify()) if $HWINFO;
+ if (! $plugin->check_messages()) {
+ $plugin->add_message(OK, 'hardware working fine');
+ $plugin->add_message(OK, $server->get_summary())
+ if $server->get_summary();
+ $plugin->add_message(OK, $server->get_extendedinfo())
+ if $server->get_extendedinfo();
+ }
+} else {
+ $plugin->add_message(CRITICAL, 'wrong device');
+}
+
+my ($code, $message) = $plugin->check_messages(join => ', ', join_all => ', ');
+$message .= sprintf "\n%s\n", join("\n", @{$plugin->{info}})
+ if $plugin->opts->get('verbose') >= 1;
+#printf "%s\n", Data::Dumper::Dumper($plugin->{info});
+$plugin->nagios_exit($code, $message);
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/subst.in b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/subst.in
new file mode 100755
index 0000000..7ddb10c
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/check_hpasm-4.8/plugins-scripts/subst.in
@@ -0,0 +1,64 @@
+#!/usr/bin/awk
+
+function which(c,path) {
+ cmd = "test -x " c;
+
+ if (system(cmd)==0) {
+ return c;
+ }
+
+ sub(/\/.*\//,"",c);
+ for (dir in path) {
+ cmd = "test -x " path[dir] "/" c;
+ if (system(cmd)==0) {
+ return path[dir] "/" c;
+ }
+ }
+
+
+ return c;
+}
+
+# used to replace "use lib utils.pm" with "use lib @libexecdir"
+#
+function led() {
+ led1 = "@libexecdir@";
+ led2 = "@exec_prefix@";
+ led3 = "@prefix@";
+ if ( match(led1, /^\$\{exec_prefix\}/ ) != 0 ) {
+ return "\"" led3 "/libexec\" " ;
+
+ }
+ return "\"" led1 "\"" ;
+}
+
+BEGIN {
+ split(ENVIRON["PATH"] ":/sbin:/usr/sbin",path,/:/);
+
+}
+
+# scripting language (first line)
+
+/^#! ?\/.*\/python/ {sub(/^#! ?\/.*\/python/,"#! @PYTHON@");}
+/^#! ?\/.*\/perl/ {sub(/^#! ?\/.*\/perl/,"#! @PERL@");}
+/^#! ?\/.*\/[a-z]{0,2}awk/ {sub(/^#! ?\/.*\/[a-z]{0,2}awk/,"#! @AWK@");}
+/^#! ?\/.*\/sh/ {sub(/^#! ?\/.*\/sh/,"#! @SHELL@");}
+
+# add to libexecdir to INC for perl utils.pm
+/^use/ { if (/lib/) { if (/utils.pm|"."/ ) {sub(/utils.pm|"."/,led() )} } }
+
+
+# Replace the placeholders with the values from configure
+/#PERL#/ {sub(/#PERL#/,"@PERL@");}
+/my \$NOINSTLEVEL = 'unknown'/ {sub(/unknown/,"@NOINSTLEVEL@");}
+/my \$CELSIUS = 1;/ {sub(/1/,"@CELSIUS@");}
+/my \$PERFDATA = 1;/ {sub(/1/,"@PERFDATA@");}
+/my \$EXTENDEDINFO = 1;/ {sub(/1/,"@EXTENDEDINFO@");}
+/my \$HWINFO = 1;/ {sub(/1/,"@HWINFO@");}
+/my \$HPACUCLI = 1;/ {sub(/1/,"@HPACUCLI@");}
+/version => '.*',/ {sub(/'.*'/,"'@PACKAGE_VERSION@'");}
+
+{
+ print;
+}
+
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/control b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/control
new file mode 100644
index 0000000..fc2d222
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/control
@@ -0,0 +1,18 @@
+Homepage: http://labs.consol.de/lang/en/nagios/check_hpasm/
+Watch: http://labs.consol.de/lang/en/nagios/check_hpasm/ check_hpasm-([0-9.]+)\.tar\.gz
+Uploaders: Bernd Zeimetz <bzed@debian.org>
+Description: plugin to check the hardware health of
+ HP Proliant Servers
+ It either uses snmp or - if installed - the hpasm package locally.
+ The plugin checks the health of
+ * Processors
+ * Power supplies
+ * Memory modules
+ * Fans
+ * CPU- and board-temperatures
+ * Raids
+ and alerts you if one of these components is faulty or operates
+ outside its normal parameters.
+Build-Depends: autotools-dev
+Recommends: snmp
+Version: 4.8
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/copyright b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/copyright
new file mode 100644
index 0000000..f6a171b
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/copyright
@@ -0,0 +1,19 @@
+AUTHOR: Gerhard Lausser <gerhard.lausser@consol.de>
+License: GPL v2
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/src b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/src
new file mode 120000
index 0000000..c8ffc86
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hpasm/src
@@ -0,0 +1 @@
+check_hpasm-4.8 \ No newline at end of file