quark server

Lewis Getschel lgetschel at denver.westerngeco.slb.com
Mon Apr 18 18:53:34 CEST 2005


Todd-
It would seem that you (and I) aren't the only ones with license server 
issues <smile>
I'm not familiar with what a 'Quark server' is, but there is the 
check_procs plugin that you can use for checking that there are exactly 
2 processes, or less than 4 processes, etc.

That didn't fit my needs for our flexlm server (I didn't see the 
check_flexlm plugin, so I didn't use that, (next time I'll look first 
before I start coding <grin>)
Here is my plugin that I just wrote last week for a problem that we had.

In my case we found that the lmgrd process wouldn't start (again) 
because a child process was left behind by another process.  The 
criteria that _I_ was given in order to write this was that the child 
process MUST have the license manager process as it's parent (using ps 
id's). NO other combination would be accepted. Hence, I came up with 
this plugin.

Modify as you see fit to fit your needs.
Lewis

----- cut here -----
#!/bin/sh
# -x
# Script to check the lmgrd daemon for the flexlm license manager process
#
# Written by:   Lewis Getschel
# Date:         4/13/05
# Parameters:   NONE, this checks the local system. Use NRPE to check 
remote systems
# Operation:    Check system for the omega license manager process lmgrd
#               AND make sure that the child process has matching pid#
# Limitiation:  uses nagios recommendation of absolute paths for 
commands, be careful when modifying to keep this in mind!

# Example of expected input from grep command:
#   $ ps -ef | grep lmgrd | grep -v grep
#   root     20648     1  0 15:11 ?        00:00:00 
/wg/omega/1.8.3rh9/sys1/wgc/flexlm.7.2/bin/linux_2.4/lmgrd -c 
/wg/omega/support/licenses/Omega/Flex72_denver/dv.dvjs001.license.dat
#   root     20649 20648  0 15:11 ?        00:00:00 wgc -T dvjs001 7.2 3 
-c /wg/omega/support/licenses/Omega/Flex72_denver/dv.dvjs001.license.dat 
--lmgrd_start 4256f391
#
# I'm looking at the 1st line as having childid of 20648 and Parent is 1
#                    2nd line as havine childid of 20649 and parent is 20648
# (showing that 2nd has 1st as it's parent.


grepcmd='/bin/grep'
wccmd='/usr/bin/wc'
pscmd='/bin/ps'
awkcmd='/bin/awk'
headcmd='/usr/bin/head'
tailcmd='/usr/bin/tail'
echocmd='/bin/echo'

number_of_processes=`$pscmd -ef | $grepcmd lmgrd | $grepcmd -v $grepcmd 
| $wccmd -l | $awkcmd '{print $1}'`

if [ "$number_of_processes" -eq "2" ];
   then
      # NOTE: I know the "| head -2 | tail -1" looks odd, I took that 
from another script that used multiple lines that weren't as easily gotten.
      first_ids=`$pscmd -ef | $grepcmd lmgrd | $grepcmd -v grep | 
$headcmd -1 | $tailcmd -1 | $awkcmd '{print $2,$3}'`
      second_ids=`$pscmd -ef | $grepcmd lmgrd | $grepcmd -v grep | 
$headcmd -2 | $tailcmd -1 | $awkcmd '{print $2,$3}'`
      first_childid=`$echocmd $first_ids | $awkcmd '{print $1}'`
      first_parentid=`$echocmd $first_ids | $awkcmd '{print $2}'`
      second_childid=`$echocmd $second_ids | $awkcmd '{print $1}'`
      second_parentid=`$echocmd $second_ids | $awkcmd '{print $2}'`

      # Now, make SURE that 2 is child of 1
      if [ "$second_parentid" -eq "$first_childid" ];
         then
         $echocmd "OK - lmgrd and child wgc match each other"
         exit 0
      fi
      # ANY other combination should be a CRITICAL error
      $echocmd "CRITICAL - 1st process IDs=$first_ids, 2nd IDs=$second_ids"
      exit 2
fi
# If we get here, there aren't 2 processes, thats a CRITICAL error
$echocmd "CRITICAL - there's $number_of_processes process, there should 
be 2"
exit 2
----- cut here -----

Todd Richmond wrote:

> I have a request from a different department to monitor there quark 
> server.  The machine almost never goes down but the license server 
> part goes down all the time so ping is not a good check.  Has anyone 
> tried to monitor a quark server?
>
> Thanks
> Todd
>
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when 
> reporting any issue. ::: Messages without supporting info will risk 
> being sent to /dev/null
>

-- 
Lewis Getschel             | Today is done...
WesternGeco                |     Today was fun...
1625 Broadway              |         Tomorrow is another one.
Denver, CO 80202           |
Direct Phone - 303-389-4407|        -- Dr. Seuss --



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list