Xymon Mailing List Archive search

prtdiag.sh and Soalris 10 x86 fix

5 messages in this thread

list TJ Yang · Mon, 19 Apr 2010 14:41:47 -0500 ·
FYI, this is how I fix bb-prtdiag.sh to monitor my solar10 x86
machines(include vmware session).

Problem: bb-prtdiag.sh always report red on x86 solaris

Cause: output prtdiag -v contains  "available" keyword which grepped
by prtdiag.sh script using "$GREP ail".
intended for [F|f]ail by also match "available".

<snip>
1   in use    PCI              PCI Slot J11
2   in use    PCI              PCI Slot J12
3   in use    PCI              PCI Slot J13
4   available PCI              PCI Slot J14
<snip>

Fix:

"$GREP ail" changed to "$EGREP -i fail" to catch [F|f]ail exactly.


-- 
T.J. Yang
list Craig Cook · Tue, 20 Apr 2010 12:10:02 -0400 ·
New version released to deadcat.

Also corrected a comment from:
#                  INTERVAL 5

To

#                  INTERVAL 5m

The previous line actually means run the script every 5 seconds, not 5 minutes.

Btw, I don't understand how virtual hardware can fail in vmware.

Craig
list Ryan Novosielski · Tue, 20 Apr 2010 15:06:25 -0400 ·
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
quoted from Craig Cook

Craig Cook wrote:
New version released to deadcat.

Also corrected a comment from:
#                  INTERVAL 5

To

#                  INTERVAL 5m

The previous line actually means run the script every 5 seconds, not 5 minutes.

Btw, I don't understand how virtual hardware can fail in vmware.
Is it possible to fail virtual hardware for testing hardware failure
(and how a system responds)? I don't use VMware much.

- --
- ---- _  _ _  _ ___  _  _  _
|Y#| |  | |\/| |  \ |\ |  | |Ryan Novosielski - Systems Programmer II
|$&| |__| |  | |__/ | \| _| |user-ae4522577e16@xymon.invalid - 973/972.0922 (2-0922)
\__/ Univ. of Med. and Dent.|IST/CST - NJMS Medical Science Bldg - C630
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkvN+zEACgkQmb+gadEcsb5rTwCgxQQHOqwUEcpEK9a22V5jHXkI
VhcAniJrAWd3V34uSZBMMjTd+h0oDBDB
=h0TM
-----END PGP SIGNATURE-----
list TJ Yang · Tue, 20 Apr 2010 14:44:36 -0500 ·
Hi, Craig

Thanks for the quick fix.
1.  $EGREP -e "[F|f]ail" is a better fix.
2. also I found prtdiag on opensolaris (snv_134,in my case) has been
moved fixed place as /usr/sbin/prtdiag, you may want to prepare a
PRTDIAG_COMMAND line in your code for opensolaris machine.

3. Another loose coding is " $GREP ault ", hope it can be changed to
$EGREP -e "[F|f]ault" also.
4. I don't how prtdiag got implemented for VMWare session either, but
it does report list of components.
quoted from Craig Cook

On Tue, Apr 20, 2010 at 11:10 AM, Craig Cook <user-850f03189cf7@xymon.invalid> wrote:
New version released to deadcat.

Also corrected a comment from:
#                  INTERVAL 5

To

#                  INTERVAL 5m

The previous line actually means run the script every 5 seconds, not 5 minutes.

Btw, I don't understand how virtual hardware can fail in vmware.

Craig

-- 

T.J. Yang
list TJ Yang · Tue, 20 Apr 2010 14:52:02 -0500 ·
Also followings are two output of prtdiag that you may interested to
include in your src tree.

1. opensolaris as VMWare session.
bash-4.0$ /usr/sbin/prtdiag  -v
System Configuration: VMware, Inc. VMware Virtual Platform
BIOS Configuration: Phoenix Technologies LTD 6.00 09/22/2009

==== Processor Sockets ====================================

Version                          Location Tag
-------------------------------- --------------------------
                                 CPU socket #0

==== Memory Device Sockets ================================

Type        Status Set Device Locator      Bank Locator
----------- ------ --- ------------------- ----------------
DRAM        in use 0   RAM slot #0         RAM slot #0
DRAM        empty  0   RAM slot #1         RAM slot #1
DRAM        empty  0   RAM slot #2         RAM slot #2
DRAM        empty  0   RAM slot #3         RAM slot #3
DRAM        empty  0   RAM slot #4         RAM slot #4
DRAM        empty  0   RAM slot #5         RAM slot #5
DRAM        empty  0   RAM slot #6         RAM slot #6
DRAM        empty  0   RAM slot #7         RAM slot #7
DRAM        empty  0   RAM slot #8         RAM slot #8
DRAM        empty  0   RAM slot #9         RAM slot #9
DRAM        empty  0   RAM slot #10        RAM slot #10
DRAM        empty  0   RAM slot #11        RAM slot #11
DRAM        empty  0   RAM slot #12        RAM slot #12
DRAM        empty  0   RAM slot #13        RAM slot #13
DRAM        empty  0   RAM slot #14        RAM slot #14

==== On-Board Devices =====================================
VMware SVGA II
ES1371

==== Upgradeable Slots ====================================

ID  Status    Type             Description
--- --------- ---------------- ----------------------------
0   unknown   ISA              ISA Slot J8
0   unknown   ISA              ISA Slot J9
0   unknown   ISA              ISA Slot J10
quoted from TJ Yang
1   in use    PCI              PCI Slot J11
2   in use    PCI              PCI Slot J12
3   in use    PCI              PCI Slot J13
4   available PCI              PCI Slot J14

bash-4.0$ cat /etc/release
                       OpenSolaris Development snv_134 X86
           Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                             Assembled 01 March 2010
bash-4.0$

1. opensolaris on physical machine.

root at os134:~# /usr/sbin/prtdiag -v
System Configuration: Dell Inc. Latitude D610
BIOS Configuration: Dell Inc. A06 10/02/2005

==== Processor Sockets ====================================

Version                          Location Tag
-------------------------------- --------------------------
Pentium M                        Microprocessor

==== Memory Device Sockets ================================

Type        Status Set Device Locator      Bank Locator
----------- ------ --- ------------------- ----------------
DDR         in use 0   DIMM_A
DDR         in use 0   DIMM_B

==== On-Board Devices =====================================
Intel 915GM Graphics
Sigmatel 9751

==== Upgradeable Slots ====================================

ID  Status    Type             Description
--- --------- ---------------- ----------------------------
0   available PCMCIA           PCMCIA 0
1   available other            MiniPCI
root at os134:~#
quoted from TJ Yang


On Tue, Apr 20, 2010 at 2:44 PM, TJ Yang <user-61afc885aa73@xymon.invalid> wrote:
Hi, Craig

Thanks for the quick fix.
1.  $EGREP -e "[F|f]ail" is a better fix.
2. also I found prtdiag on opensolaris (snv_134,in my case) has been
moved fixed place as /usr/sbin/prtdiag, you may want to prepare a
PRTDIAG_COMMAND line in your code for opensolaris machine.

3. Another loose coding is " $GREP ault ", hope it can be changed to
$EGREP -e "[F|f]ault" also.
4. I don't how prtdiag got implemented for VMWare session either, but
it does report list of components.

On Tue, Apr 20, 2010 at 11:10 AM, Craig Cook <user-850f03189cf7@xymon.invalid> wrote:
New version released to deadcat.

Also corrected a comment from:
#                  INTERVAL 5

To

#                  INTERVAL 5m

The previous line actually means run the script every 5 seconds, not 5 minutes.

Btw, I don't understand how virtual hardware can fail in vmware.

Craig

--
T.J. Yang
-- 

T.J. Yang