Xymon Mailing List Archive search

Solaris 10 xymon SMF

6 messages in this thread

list Roland Soderstrom · Tue, 28 Aug 2012 21:47:35 +0000 ·
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
list Paul Root · Wed, 29 Aug 2012 13:58:34 +0000 ·
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
quoted from Roland Soderstrom


From: 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
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
list Paul Root · Wed, 29 Aug 2012 14:10:03 +0000 ·
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`
quoted from Paul Root


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
list Roland Soderstrom · Wed, 29 Aug 2012 21:34:09 +0000 ·
Excellent spotted.
Really, it doesn't matter that much to kill off all the zones iostat as well, they just restart within 5min anyway.
But this approached is very clean and will not mess up anything.
And it works in the zone as well.


-          Roland
quoted from Paul Root


From: Root, Paul [mailto:user-76fdb6883669@xymon.invalid]
Sent: Thursday, 30 August 2012 12:10 AM
To: Root, Paul; Roland Soderstrom; 'xymon at xymon.com'
Subject: RE: Solaris 10 xymon SMF

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<mailto: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
list Paul Root · Fri, 30 Nov 2012 09:14:43 -0600 ·
I've done the same thing with Linux and solaris init scripts.
quoted from Roland Soderstrom

From: 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
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

This communication is the property of CenturyLink and may contain confidential or privileged information. Unauthorized use of this communication is strictly
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and destroy
all copies of the communication and any attachments.
list Galen Johnson · Fri, 30 Nov 2012 17:30:49 +0000 ·
I'm glad to hear that it's working for you (I basically modeled it after a BB manifest file I found somewhere) If you haven't already done so, and the improvements work in a Solaris environment (I no longer have any to test with), feel free to update the Xymonton page...it's just a wiki after all :-).

=G=
quoted from Paul Root

From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of Root, Paul
Sent: Friday, November 30, 2012 10:15 AM
To: 'Roland Soderstrom'; xymon at xymon.com
Subject: Re: [Xymon] Solaris 10 xymon SMF

I've done the same thing with Linux and solaris init scripts.

From: 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
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

This communication is the property of CenturyLink and may contain confidential or privileged information. Unauthorized use of this communication is strictly
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and destroy
all copies of the communication and any attachments.