SMS Server Tools 3
This site is hosted by Kekekasvi.com
 Menu
Basic information:
Additional information:
Support:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

 Search
Custom Search

 Visitor locations
 
 SMS Server Tools 3 Community
Welcome, Guest. Please login or register. Fri Mar 29, 2024 10:23
SMSTools3 Community » Help and support Bottom

[answered] Modem handler terminated abnormally - what are the typical causes for this?

  This topic is locked

Page:  1

Author Post
Member
Registered:
Aug 2009
Location: Finland
Operating system name and version: OperatLinux OpenWrt 2.6.25.17 #16 Sun Feb 15 00:19:46 CET 2009 mips unknown - ASUS WL-500G Premium - Kamikaze 8.09, r14511
Version of smsd: 3.1.5
Smsd installed from: sources
Name and model of a modem / phone: Nokia 6210
Interface: serial


What are the typical causes for Modem handler to terminate abnormally? Below a log for a case where such a thing happened [last line in log]

How does people here recover from this i.e. any comments on how to detect abnormal termination and restart smsd?



smsd.conf
#
devices = paarsim
user = root

loglevel = 5
logfile    = /mnt/usbdrive/sms/spool/smsd.log
outgoing   = /mnt/usbdrive/sms/spool/outgoing
sent       = /mnt/usbdrive/sms/spool/sent
phonecalls = /mnt/usbdrive/sms/spool/phonecalls
saved      = /mnt/usbdrive/sms/spool/saved
spool      = /mnt/usbdrive/sms/spool/outgoing
incoming   = /mnt/usbdrive/sms/spool/incoming
checked    = /mnt/usbdrive/sms/spool/checked

internal_combine = yes
eventhandler = /mnt/usbdrive/sms/perl/event.sh

[paarsim]
device = /dev/ttyUSB1
incoming = yes
baudrate = 19200
phonecalls = yes
pin = xxxx
 
'smsdconf' Syntax Highlight powered by GeSHi


Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
I think that there are no "typical" causes for termination.

In production systems the PIN could be disabled. It does not offer any additional security, and is just a thing which can go wrong.

Alarmhandler can be used to track problems with a modem. For example if there are "The modem did not answer" errors too many times, that script can create an alarm using some another system. It can also create a flag-file which can be detected by the script running by cron. That script can restart the daemon, if necessary.

I do not have any samples for alarmhandler, but the following script can detect if a daemon is not running:

#!/bin/bash

checkProcess()
{
  PSLIST=`ps -efj | grep -v grep`
  for ARG in "$@"
  do
    if ! echo -n "$PSLIST" | grep "$ARG" >/dev/null; then
      echo -n "$ARG "
    fi
  done
}

MESSAGE=`checkProcess "smsd MAINPROCESS" SONERA_ ELISA_ DNA_ SAUNALAHTI_ DNAPREPAID_ SONERAPREPAID_ ELISAPREPAID_ apache mysql`
MESSAGE=`echo "$MESSAGE" | sed 's/_//g'`

if [ "x$MESSAGE" != "x" ]; then
  MESSAGE="$MESSAGE not running."

  echo "$MESSAGE" # Create an alert, restart smsd, do something else...

fi
 
'bash' Syntax Highlight powered by GeSHi


However, that kind of script has been running on production almost two years continuously, and has never detected a missing daemon...

You have an interesting environment. Did you have to modify the sources to get smsd compiled?

Member
Registered:
Aug 2009
Location: Finland
Topic owner
ok. thanks for script, pointing to look for alarmhandler and ideas around it.

Didn't need to change the code at all - so big thanks for easy "portability".

  This topic is locked

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.