BB Unix Network Monitor - Message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE : {bb} WSH Errors Running bb-sqlserver.vbs



Hi, 

Looking at the script (bb-sqlserver.vbs) near line 188 : 
' This is used to get a percentage value from WMI. It requires the value and the base objects.
' It then returns the percentage
FUNCTION GetWMIPercent(strCollection,strInstance,strObject,strBaseObject)
    SET counterCollection = GETOBJECT("winmgmts:" & strCollection & "=" & strInstance)
    FOR EACH cntproperty IN counterCollection.properties_
        IF cntproperty.name = strObject THEN
            iObjectValue = cntproperty
        ELSEIF cntproperty.name = strBaseObject THEN
            iObjectBaseValue = cntproperty
        END IF
    NEXT
    GetWMIPercent = ROUND(CDbl(iObjectValue) / CDBL(iObjectBaseValue) * CDBL(100),0)
END FUNCTION

So it looks like one of the values "iObjectValue" or "iObjectBaseValue" is undefined, so 
Cdbl generates an error. 

You should perhaps try to copy the script in a temporary directory, modify the end so it won't generate a log file but instead print the result to the stdout, and add two lines like 
	Wscript.echo iObjectValue
	Wscript.echo iObjectBaseValue
Before the GetWMIPercent  at line 188. 

N F 

-----Message d'origine-----
De : owner-bb@bb4.com [mailto:owner-bb@bb4.com] De la part de Andy France
Envoyé : jeudi 23 juin 2005 10:23
À : bb@bb4.com
Objet : {bb} WSH Errors Running bb-sqlserver.vbs








I have a server running:

  Windows 2003 Server SE (Version 5.2 Build 3790.srv03_gdr.040410-1234)
  MS-SQL 2000 (8.00.760)
  The bb-sqlserver.vbs script from deadcat.net.

It has been running OK for a while (since May 2nd this year in fact), but has stopped reporting after a recent reboot.  If I run the script manually (by double-clicking from Explorer) I get the following error:

  Windows Script Host
  Script: C:\Program Files\Quest Software\Big Brother BTF\BBNT\1.08d\bin\bb-sqlserver.vbs
  Line:   188
  Char:   5
  Error:  Invalid use of Null: 'CDBL'
  Code:   800A005E
  Source: Microsoft VBScript runtime error

Does anybody have an idea what this means?

TIA,
Andy.

#####################################################################################

This email is intended for the person to whom it is addressed only. If you are not the intended recipient, do not read, copy or use the contents in any way. The opinions expressed may not necessarily reflect those of ZESPRI Group of Companies ('ZESPRI').

While every effort has been made to verify the information contained herein, ZESPRI does not make any representations 
as to the accuracy of the information or to the performance
of any data, information or the products mentioned herein. ZESPRI will not accept liability for any losses, damage or consequence, however, resulting directly or indirectly from the use of this e-mail/attachments. #####################################################################################

-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or- subscribe bb-digest in the BODY of the message.

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.


Home | Main Index | Thread Index