[Xymon] Solaris 10 xymon SMF

Root, Paul Paul.Root at CenturyLink.com
Wed Aug 29 16:10:03 CEST 2012


One small problem. If you are stopping xymon in the global zone, you'll kill the iostat and vmstat of the NGZ machines as well.

So a small changed

pkill 'iostat|vmstat' -U xymon -z `zonename`



Paul Root    - Senior Engineer
Managed Services Systems - CenturyLink


From: Root, Paul
Sent: Wednesday, August 29, 2012 8:59 AM
To: 'Roland Soderstrom'; xymon at xymon.com
Subject: RE: Solaris 10 xymon SMF

The same thing happens in my Linux installs (and my Solaris installs). I generally do a:

ps -ef |grep xymon  |awk '{print $2}' |xargs kill.


I think I like yours better.


Paul Root    - Senior Engineer
Managed Services Systems - CenturyLink


From: xymon-bounces at xymon.com<mailto:xymon-bounces at xymon.com> [mailto:xymon-bounces at xymon.com] On Behalf Of Roland Soderstrom
Sent: Tuesday, August 28, 2012 4:48 PM
To: xymon at xymon.com<mailto:xymon at xymon.com>
Subject: [Xymon] Solaris 10 xymon SMF

Hi,

There is a minor issue with the Solaris 10 SMF for xymon by Galen Johnson that I improved a bit.
Thanks Galen for the nice work :D
At least it works fine for us.
When you disable the xymon service it could wait for up to 5 min before disabling it because the iostat and vmstat are running. (300 min)

I been trying some different approaches in the manifest but it doesn't really work properly.
I had to change the default timeout (30) to 300 to cater for the 300min possible run time of iostat, vmstat.
Otherwise it will go into maintenance mode.
Today I had a different approach and changed the xymon.sh script instead, that worked really nice.
In server/bin/xymon.sh I added these simple lines to the stop function. (works in Solaris 10)

"stop")
        if test -s /usr/local/xymon/logs/xymonlaunch.pid
        then
                kill -TERM `cat /usr/local/xymon/logs/xymonlaunch.pid`
                echo "Xymon stopped"
        else
                echo "Xymon is not running"
        fi
        rm -f /usr/local/xymon/logs/xymonlaunch.pid
        # kill off the remaining xymon processes, ie vmstat iostat etc.
        sleep 2
        pkill 'iostat|vmstat' -U xymon
        ;;

Maybe it could help someone else out there.
I'm running 4.3.10


-          Roland
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20120829/619fbc66/attachment.html>


More information about the Xymon mailing list