Hi,
An easy one ... or two.
1 - I need to start up ser automatically on the boot of the machine ... i am sure there are scripts and instructions on how to do it. Any pointer?
2 - I need a way to monitor the status of ser (and sems), so that in case of a crash they are automatically killed and restarted. I thought about writing some kind of cron thingy using serctl ... Again, pointers?
Regards,
Cesc
write
/usr/local/sbin/ser #<path to ser>
in /etc/rc.d/rc.local
From: Cesc cesc.santa@gmail.com To: SER-Users serusers@lists.iptel.org, OpenSER-users users@openser.org Subject: [Serusers] How to start ser on boot? how to monitor it? Date: Tue, 13 Dec 2005 00:11:37 +0100
Hi,
An easy one ... or two.
1 - I need to start up ser automatically on the boot of the machine ... i am sure there are scripts and instructions on how to do it. Any pointer?
2 - I need a way to monitor the status of ser (and sems), so that in case of a crash they are automatically killed and restarted. I thought about writing some kind of cron thingy using serctl ... Again, pointers?
Regards,
Cesc
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
_________________________________________________________________ Tried the new MSN Messenger? ItÂ’s cool! Download now. http://messenger.msn.com/Download/Default.aspx?mkt=en-in
An easy one ... or two.
1 - I need to start up ser automatically on the boot of the machine ... i am sure there are scripts and instructions on how to do it. Any pointer?
ONsip.org has scripts available:
http://www.onsip.org/modules/mydownloads/singlefile.php?cid=9&lid=23
2 - I need a way to monitor the status of ser (and sems), so that in case of a crash they are automatically killed and restarted. I thought about writing some kind of cron thingy using serctl ... Again, pointers?
Most rebust will be to use sipsak to send PING or OPTIONS to the server. Then you know it will respond, you are also less vulnerable to potential changes in serctl etc. g-)
Cesc wrote:
Hi,
An easy one ... or two.
1 - I need to start up ser automatically on the boot of the machine ... i am sure there are scripts and instructions on how to do it. Any pointer?
When using debian packages (make deb) the startup scrtipts will be installed automatically, and openser will be started at startup. Otheriwse (on debain) just cp packaging/debian/openser.init /etc/init.d/openser maybe you have tomodify the path inisde the startup script to fit your needs. chmod a+x /etc/init.d/openser update-rc.d openser defaults
2 - I need a way to monitor the status of ser (and sems), so that in case of a crash they are automatically killed and restarted. I thought about writing some kind of cron thingy using serctl ... Again, pointers?
We montior using a cron job: # passive check if SER is alive */5 * * * * /usr/lib/ser/checker
/usr/lib/ser/checker: ---------------------- #!/bin/sh
NETCOUNT=`netstat -antu | fgrep 5060 | fgrep 0.0.0.0: | wc -l`
if [ $NETCOUNT -lt 2 ] ; then echo "SER does not seem to listen on udp/tcp 5060. Restarting." /etc/init.d/openser restart fi
klaus
Hi all,
Thanks for the responses. It seems that the ser part is covered well, though i need also to monitor sems ... i could simply monitor by pid or by sending some command via the fifo/unixsock and check the reply ... Anyone doing something like this?
Regards,
Cesc
On 12/13/05, Klaus Darilion klaus.mailinglists@pernau.at wrote:
Cesc wrote:
Hi,
An easy one ... or two.
1 - I need to start up ser automatically on the boot of the machine ... i am sure there are scripts and instructions on how to do it. Any pointer?
When using debian packages (make deb) the startup scrtipts will be installed automatically, and openser will be started at startup. Otheriwse (on debain) just cp packaging/debian/openser.init /etc/init.d/openser maybe you have tomodify the path inisde the startup script to fit your needs. chmod a+x /etc/init.d/openser update-rc.d openser defaults
2 - I need a way to monitor the status of ser (and sems), so that in case of a crash they are automatically killed and restarted. I thought about writing some kind of cron thingy using serctl ... Again, pointers?
We montior using a cron job: # passive check if SER is alive */5 * * * * /usr/lib/ser/checker
/usr/lib/ser/checker:
#!/bin/sh
NETCOUNT=`netstat -antu | fgrep 5060 | fgrep 0.0.0.0: | wc -l`
if [ $NETCOUNT -lt 2 ] ; then echo "SER does not seem to listen on udp/tcp 5060. Restarting." /etc/init.d/openser restart fi
klaus
I send INVITE requests to SEMS with fake To tag. This will trigger Call leg/transaction does not exist reply. If I get the reply then I know SEMS is up and running.
Jan.
On 13-12-2005 12:02, Cesc wrote:
Hi all,
Thanks for the responses. It seems that the ser part is covered well, though i need also to monitor sems ... i could simply monitor by pid or by sending some command via the fifo/unixsock and check the reply ... Anyone doing something like this?
Regards,
Cesc
On 12/13/05, Klaus Darilion klaus.mailinglists@pernau.at wrote:
Cesc wrote:
Hi,
An easy one ... or two.
1 - I need to start up ser automatically on the boot of the machine ... i am sure there are scripts and instructions on how to do it. Any pointer?
When using debian packages (make deb) the startup scrtipts will be installed automatically, and openser will be started at startup. Otheriwse (on debain) just cp packaging/debian/openser.init /etc/init.d/openser maybe you have tomodify the path inisde the startup script to fit your needs. chmod a+x /etc/init.d/openser update-rc.d openser defaults
2 - I need a way to monitor the status of ser (and sems), so that in case of a crash they are automatically killed and restarted. I thought about writing some kind of cron thingy using serctl ... Again, pointers?
We montior using a cron job: # passive check if SER is alive */5 * * * * /usr/lib/ser/checker
/usr/lib/ser/checker:
#!/bin/sh
NETCOUNT=`netstat -antu | fgrep 5060 | fgrep 0.0.0.0: | wc -l`
if [ $NETCOUNT -lt 2 ] ; then echo "SER does not seem to listen on udp/tcp 5060. Restarting." /etc/init.d/openser restart fi
klaus
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Great ... i will get my hands on it ...
The thing is ... i have to give a demo ... and you know, demo effect ... everything crashes at the most inapropriate time :D Monitoring and restarting is not a fix ... but it will do the trick for a while :D
Regards,
Cesc
On 12/13/05, Jan Janak jan@iptel.org wrote:
I send INVITE requests to SEMS with fake To tag. This will trigger Call leg/transaction does not exist reply. If I get the reply then I know SEMS is up and running.
Jan.
On 13-12-2005 12:02, Cesc wrote:
Hi all,
Thanks for the responses. It seems that the ser part is covered well, though i need also to monitor sems ... i could simply monitor by pid or by sending some command via the fifo/unixsock and check the reply ... Anyone doing something like this?
Regards,
Cesc
On 12/13/05, Klaus Darilion klaus.mailinglists@pernau.at wrote:
Cesc wrote:
Hi,
An easy one ... or two.
1 - I need to start up ser automatically on the boot of the machine ... i am sure there are scripts and instructions on how to do it. Any pointer?
When using debian packages (make deb) the startup scrtipts will be installed automatically, and openser will be started at startup. Otheriwse (on debain) just cp packaging/debian/openser.init /etc/init.d/openser maybe you have tomodify the path inisde the startup script to fit your needs. chmod a+x /etc/init.d/openser update-rc.d openser defaults
2 - I need a way to monitor the status of ser (and sems), so that in case of a crash they are automatically killed and restarted. I thought about writing some kind of cron thingy using serctl ... Again, pointers?
We montior using a cron job: # passive check if SER is alive */5 * * * * /usr/lib/ser/checker
/usr/lib/ser/checker:
#!/bin/sh
NETCOUNT=`netstat -antu | fgrep 5060 | fgrep 0.0.0.0: | wc -l`
if [ $NETCOUNT -lt 2 ] ; then echo "SER does not seem to listen on udp/tcp 5060. Restarting." /etc/init.d/openser restart fi
klaus
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
One more thing -- if you want to make SER restarts really reliable then you can use -G command line option. SER would write the process group of all SER processes into the specified file. You can then pass this value as negative number to kill and it will kill all ser processes.
Jan.
On 13-12-2005 12:15, Cesc wrote:
Great ... i will get my hands on it ...
The thing is ... i have to give a demo ... and you know, demo effect ... everything crashes at the most inapropriate time :D Monitoring and restarting is not a fix ... but it will do the trick for a while :D
Regards,
Cesc
On 12/13/05, Jan Janak jan@iptel.org wrote:
I send INVITE requests to SEMS with fake To tag. This will trigger Call leg/transaction does not exist reply. If I get the reply then I know SEMS is up and running.
Jan.
On 13-12-2005 12:02, Cesc wrote:
Hi all,
Thanks for the responses. It seems that the ser part is covered well, though i need also to monitor sems ... i could simply monitor by pid or by sending some command via the fifo/unixsock and check the reply ... Anyone doing something like this?
Regards,
Cesc
On 12/13/05, Klaus Darilion klaus.mailinglists@pernau.at wrote:
Cesc wrote:
Hi,
An easy one ... or two.
1 - I need to start up ser automatically on the boot of the machine ... i am sure there are scripts and instructions on how to do it. Any pointer?
When using debian packages (make deb) the startup scrtipts will be installed automatically, and openser will be started at startup. Otheriwse (on debain) just cp packaging/debian/openser.init /etc/init.d/openser maybe you have tomodify the path inisde the startup script to fit your needs. chmod a+x /etc/init.d/openser update-rc.d openser defaults
2 - I need a way to monitor the status of ser (and sems), so that in case of a crash they are automatically killed and restarted. I thought about writing some kind of cron thingy using serctl ... Again, pointers?
We montior using a cron job: # passive check if SER is alive */5 * * * * /usr/lib/ser/checker
/usr/lib/ser/checker:
#!/bin/sh
NETCOUNT=`netstat -antu | fgrep 5060 | fgrep 0.0.0.0: | wc -l`
if [ $NETCOUNT -lt 2 ] ; then echo "SER does not seem to listen on udp/tcp 5060. Restarting." /etc/init.d/openser restart fi
klaus
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Hi Cesc,
try to use "monit" to perform pid-based monitoring.
regards, bogdan
Cesc wrote:
Hi all,
Thanks for the responses. It seems that the ser part is covered well, though i need also to monitor sems ... i could simply monitor by pid or by sending some command via the fifo/unixsock and check the reply ... Anyone doing something like this?
Regards,
Cesc
On 12/13/05, Klaus Darilion klaus.mailinglists@pernau.at wrote:
Cesc wrote:
Hi,
An easy one ... or two.
1 - I need to start up ser automatically on the boot of the machine ... i am sure there are scripts and instructions on how to do it. Any pointer?
When using debian packages (make deb) the startup scrtipts will be installed automatically, and openser will be started at startup. Otheriwse (on debain) just cp packaging/debian/openser.init /etc/init.d/openser maybe you have tomodify the path inisde the startup script to fit your needs. chmod a+x /etc/init.d/openser update-rc.d openser defaults
2 - I need a way to monitor the status of ser (and sems), so that in case of a crash they are automatically killed and restarted. I thought about writing some kind of cron thingy using serctl ... Again, pointers?
We montior using a cron job: # passive check if SER is alive */5 * * * * /usr/lib/ser/checker
/usr/lib/ser/checker:
#!/bin/sh
NETCOUNT=`netstat -antu | fgrep 5060 | fgrep 0.0.0.0: | wc -l`
if [ $NETCOUNT -lt 2 ] ; then echo "SER does not seem to listen on udp/tcp 5060. Restarting." /etc/init.d/openser restart fi
klaus
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users