Notification for exceeding uptime?

Aww shucks… !shy

Glad it’s now all working as advertised, it’s been fun!

If you do ever want to delve a bit deeper into Perl/CGI, you could do worse than having a peek at Robert’s Perl Tutorial - a half decent basic walkthrough of Perl from first principles - mirrored all over the web on sites such as http://www.sthomas.net/roberts-perl-tutorial.htm so it’s a sight cheaper than buying a book! - I’m by no means an expert so I constantly refer to it when I get myself in a fix… Might help you on your way with your Oracle check anyway :wink:

/S

Hi Strides,

Here I am again :s

Do you have any idea about a command to check the open handles (named HANDLE COUNT in windows taskmanager)

Thanks in advance!

Grtz,

Goldie

Hi Goldie

Nothing that I know of, but I can offer up another Sysinternals tool called “handle”. If you install this little gem on your server and run “handle -s”, it’ll give you a count of all open handles, including (helpfully) a figure for total handles. Reckon it’d be not too much trouble to create a script that would capture that figure and then run it locally on your windows server via nagios + NRPE
Looks like it’s time to stretch your scripting muscles matey :wink:

Shout if you get stuck

HTH

/S

Yo Strides,

I cannot stat the count of open handles of oracle.exe, the output shows me all the open handles, not making a count of them. Unfortunately there is no syntax-option which makes the count for me :frowning:
Would you suggest perl for resolving this prob?
Been looking througt Roberts tutorial a few times (will begin practicing next week, time, time ,time…) and found the “open” command, is that the right track to walk the path…?

Grtz!

Hi Goldie

Indeed, Perl could well be considered a good tool for this job… in a nutshell, you’d define an array, say @input, to take output from the handle command,then parse each $line of the array to see if it contains the path of the process you are looking for, incrementing a counter as it goes. Then at the end assess that counter and write it out along with OK or Critical or whatever and the appropriate exitcode. Call it via NRPE and you are laughing.

Of course, if you are just looking for a count and are not concerned if it is more or less than a threshold, you could even not bother with perl go grab UnixUtils from sourceforge.net/projects/unxutils to make use of “grep” and “wc”…
Say I’m looking for the count of open handles on my PC here for MSN Messenger, i’d run handle, pipe the output of that through to grep (to capture any lines that match the requirement) and then finally through to wc (using -l to count the number lines)…

C:\Documents and Settings\kevg\Desktop\Handle>handle | grep "MSN Messenger\\msnmsgr.exe" | wc -l 4
…that gives me 4, which is correct. Happy days :slight_smile:

Depends on your needs I guess, but if you go perl and want a hand, I’m more than happy to point you in the right direction.

Cheers

/S