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. Thu Mar 28, 2024 12:03
SMSTools3 Community » Help and support Bottom

[outdated] GUI Status Monitor

  This topic is locked

Page:  1  2  Next

Author Post
Member
Registered:
Feb 2011
Location: New Delhi, India
Operating system name and version: Debain lenny6
Version of smsd: 3.1.14
Smsd installed from: sources
Name and model of a modem / phone: Itegno3800
Interface: USB

Sir,

I am running SMStools3 with PlaySMS for past over one month & is working fine.

It stopped sending/receiving messages 2 times in month & I rebooted my server & Sending/receiving got Okay

Is there any Graphical Interface to Monitor the Status of Smstools3

Thanks & regards,

Tummy

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
First we need to know why your system stopped sending/receiving. Can you see the reason in smsd.log, and/or do you have any alarmhandler installed?

Member
Registered:
Feb 2011
Location: New Delhi, India
Topic owner
Sir,

I have not yet installed alarmhandler.

Could you please advice How to install alarmhandler

regards,

Tummy

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
For example see this post.

You of course have smsd.log available, so what errors did you see in the log?

Member
Registered:
Feb 2011
Location: New Delhi, India
Topic owner
Dear Sir,

You mean to say that I should first create smsd_alarmhandler.sh in the folder /local/bin/smsd_alarmhandler.sh

I should create smsd_alarmhandler.sh as under;


#!/bin/bash

LOG="/var/log/smsd_alarmhandler.log"

# $1 the keyword ALARM
# $2 a date in the format yyyy-mm-dd
# $3 a time in the format hh:mm:ss
# $4 the alarm severity (1 digit number)
# $5 the modem name or SMSD
# $6 the alarm text

echo "$2 $3,$4, $5: $6" >> $LOG

if echo -n "$6" | grep "MODEM IS NOT REGISTERED, WAITING 1 SEC. BEFORE RETRYING 3. TIME" >/dev/null; then

EMAIL="sysadmin@localhost"
subject="$6"
message="$*"

echo "$message" | /usr/bin/mail \
-a "From: smsd@localhost" \
-s "$subject" \
"$EMAIL"
fi

My present smsd.conf is as under


# Global configuration

devices = modem1

loglevel = 4

logfile = /var/log/sms/smstools.log

outgoing = /var/spool/sms/outgoing
checked = /var/spool/sms/checked
failed = /var/spool/sms/failed
incoming = /var/spool/sms/incoming
sent = /var/spool/sms/sent

delaytime = 6
errorsleeptime = 12
blocktime = 180

autosplit = 3
receive_before_send = yes

# Modem configuration

# iTegno 3000 USB
[modem1]
#init =
device = /dev/ttyUSB0

incoming = yes
#pin =
baudrate = 115200

Then do I need to add the following in smsd.conf

alarmhandler = /usr/local/bin/smsd_alarmhandler

Please advice

Thanks

Tummy

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
tummyg wrote
You mean to say that I should first create smsd_alarmhandler.sh in the folder /local/bin/smsd_alarmhandler.sh

Yes, but in the folder /usr/local/bin, as there is no /local tree.

As your log is under /var/log/sms, change it in the script too.

Member
Registered:
Feb 2011
Location: New Delhi, India
Topic owner
Sir,

I have done the changes as per your advice

Please advice further, Now by installing Alarmhandler, would I get an email alert in case of problem with Modem

Correct if I am wrong.

regards,

Tummy

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
1) In the post #2 and #4 I was asking for the log. Unfortunately you did not answer. :(

I repeat: First we need to know why your system stopped sending/receiving.

So, do you have this information, or is it lost? Please answer.

2) The alarmhandler is for future purposes. After you have installed it, any alarms in the future will be logged to the log which is defined in the alarmhandler script. With the information in this log you can see what kind of alarms are happening, and you can decide what to do with them. If we know the original reason why your system stopped sending/receiving, we could do something even now. But without knowing the reason, not much can be done, other than wait for new failures.

The line:
if echo -n "$6" | grep "MODEM IS NOT REGISTERED, WAITING 1 SEC. BEFORE RETRYING 3. TIME" >/dev/null; then

...in the alarmhandler script means that if the alarm is "MODEM IS NOT REGISTERED, WAITING 1 SEC. BEFORE RETRYING 3. TIME", email is sent. With other alarms email is not sent. It's up to you to decide which kind of alarms should generate email. Remember that the script is just an example, and in usual cases examples should be customized.

Member
Registered:
Feb 2011
Location: New Delhi, India
Topic owner
Sir,

I am really sorry for not sending Log file.

Please find below log file.

Further note, you would see some Modem2 is not attached to the server, whereas Modem is defined in smsd.conf.


( log removed by keke, it was huge and did not show any errors )


« Last edit by keke on Mon May 16, 2011 12:54, 156 months ago. »
Member
Registered:
Feb 2011
Location: New Delhi, India
Topic owner
Sir,

My log file is too big, can not copy & post here maybe due to some limitations.

Even I can not find way to attach a file

Please advice

regards,

Tummy

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
In the log shown there are no any problems, and also smsd has not restarted, or stopped. There is one message received successfully, then one message is sent and received successfully too.

Perhaps you should just continue using smsd, and when something abnormal happens, carefully check what is in the log of alarmhandler.

Or do you mean that when three last lines are:
2011-03-26 16:26:24,6, Itegno: Checking memory size
2011-03-26 16:26:24,7, Itegno: -> AT+CPMS?
2011-03-
the log really has ended like this, "2011-03-" and then nothing? I was assuming that you have just copied a part from the log.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Can you just locate the error in the log, and then send some 50 lines around the error?

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
On more tip for the future: in the smsd.conf use the following settings:

loglevel = notice
smart_logging = yes


With these setting the main log does not grow, and in the case of any errors, you will have another log which contains all the data using loglevel 7. In you case the another log will be /var/log/sms/smstools_trouble.log.

Member
Registered:
Feb 2011
Location: New Delhi, India
Topic owner
Sir,

My smsd.conf is as under;


# Global configuration

devices = modem1,

loglevel = 4

logfile = /var/log/sms/smstools.log

outgoing = /var/spool/sms/outgoing
checked = /var/spool/sms/checked
failed = /var/spool/sms/failed
incoming = /var/spool/sms/incoming
sent = /var/spool/sms/sent
alarmhandler = /usr/local/bin/smsd_alarmhandler
eventhandler = /usr/local/bin/smsd_eventhandler.sh
loglevel = notice
smart_logging = yes

delaytime = 6
errorsleeptime = 12
blocktime = 180

autosplit = 3
receive_before_send = yes

# Modem configuration

# iTegno 3000 USB
[modem1]
#init =
device = /dev/ttyUSB0

incoming = yes
#pin =
baudrate = 115200

with the above settings, In PlaySMS the outgoing SMS, it keeps showing Pending & does not send messages

if I comment out
#alarmhandler = /usr/local/bin/smsd_alarmhandler

Messages gets Sent & messages start going

Please advice

Thanks & regards,

Tummy

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Run: pgrep playsmsd

What does it say, some number or nothing?

Member
Registered:
Feb 2011
Location: New Delhi, India
Topic owner
root@server1:~# pgrep playsmsd
2753
2754
root@server1:~#

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
I think that there should be only one playsmsd running. You could pkill playsmsd, and start that only once (playsmsd_start).

If you are using sms3 script to start and stop smsd, upgrade it. See this topic: [fix] init.d script sms3 conflicts with playsmsd. The bug caused that playsmsd was stopped when stopping smsd with sms3 script.

If playsmsd is not running, messages in playSMS user interface stay in state "Pending". The alarmhandler has nothing to do with this. You should enable it, as you really need the information which is provided by alarmhandler.

When you start smsd with alarmhandler enabled, do you see any errors on screen and log?

Member
Registered:
Feb 2011
Location: New Delhi, India
Topic owner
Sir,

I killed it by "pkill playsmsd" & again started playsmsd_start

Also uncommented
alarmhandler = /usr/local/bin/smsd_alarmhandler
eventhandler = /usr/local/bin/smsd_eventhandler.sh
loglevel = notice
smart_logging = yes

Now SMS is shown sent in PlaySMS

Thanks & regards

Tummy

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Great. 8)

tummyg wrote
Is there any Graphical Interface to Monitor the Status of Smstools3

Now we can continue with this...

Graphical interface depends on the system, but it's easy to create if smsd has statistics feature (libmm) enabled. In your case, while you are using playSMS, status of SMSTools3 could be a part of it's user interface.

As your configuration does not define stats directory, you probably have not installed libmm. You could install it first.

Member
Registered:
Feb 2011
Location: New Delhi, India
Topic owner
Sir,

First let me thank you so much for your cooperation & patience.

I have already installed libmm by following method;

First I downloaded libmm-1.4.2.tar

then

/usr/local/bin/tar -xvzf libmm-1.4.2.tar.gz

cd mm-1.4.2

./configure
make
make install

Thanks & regards,

Tummy

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Okay, if you have not compiled smsd with statistics enabled, do it:

- go to smstools3/src
- edit the Makefile (as instructed inside it)
- make clean smsd
- cp -p smsd $(which smsd)

Then add the following to the global part of smsd.conf:

stats = /var/spool/sms/stats
stats_interval = 0


Create that directory and make it writable for smsd.

After restarting smsd, you should have a file /var/spool/sms/stats/status. See what is the content of it.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Do you now have stats up and running?

Member
Registered:
Feb 2011
Location: New Delhi, India
Topic owner
Sir,

Let me brief what I did

root@server1:~# cd /usr/local/src/smstools3/src/

root@server1:/usr/local/src/smstools3/src# vi Makefile

Then I commented out as under in Makefile

# Comment this out, to enable statistics
#CFLAGS += -D NOSTATS

Then

root@server1:/usr/local/src/smstools3/src# make ckean smsd

Output as under

root@server1:/usr/local/src/smstools3/src# make clean smsd
rm -f *.o smsd *.exe *~
cc -D NUMBER_OF_MODEMS=64 -W -Wall -D_FILE_OFFSET_BITS=64 -c -o extras.o extra
s.c
cc -D NUMBER_OF_MODEMS=64 -W -Wall -D_FILE_OFFSET_BITS=64 -c -o locking.o lock
ing.c
cc -D NUMBER_OF_MODEMS=64 -W -Wall -D_FILE_OFFSET_BITS=64 -c -o cfgfile.o cfgf
ile.c
cc -D NUMBER_OF_MODEMS=64 -W -Wall -D_FILE_OFFSET_BITS=64 -c -o logging.o logg
ing.c
cc -D NUMBER_OF_MODEMS=64 -W -Wall -D_FILE_OFFSET_BITS=64 -c -o alarm.o alarm.
c
cc -D NUMBER_OF_MODEMS=64 -W -Wall -D_FILE_OFFSET_BITS=64 -c -o smsd_cfg.o sms
d_cfg.c
cc -D NUMBER_OF_MODEMS=64 -W -Wall -D_FILE_OFFSET_BITS=64 -c -o charset.o char
set.c
cc -D NUMBER_OF_MODEMS=64 -W -Wall -D_FILE_OFFSET_BITS=64 -c -o stats.o stats.
c
cc -D NUMBER_OF_MODEMS=64 -W -Wall -D_FILE_OFFSET_BITS=64 -c -o blacklist.o bl
acklist.c
cc -D NUMBER_OF_MODEMS=64 -W -Wall -D_FILE_OFFSET_BITS=64 -c -o whitelist.o wh
itelist.c
cc -D NUMBER_OF_MODEMS=64 -W -Wall -D_FILE_OFFSET_BITS=64 -c -o modeminit.o mo
deminit.c
cc -D NUMBER_OF_MODEMS=64 -W -Wall -D_FILE_OFFSET_BITS=64 -c -o pdu.o pdu.c
cc `mm-config --cflags` -D NUMBER_OF_MODEMS=64 -W -Wall -D_FILE_OFFSET_BITS=64 -
o smsd smsd.c extras.o locking.o cfgfile.o logging.o alarm.o smsd_cfg.o charset.
o stats.o blacklist.o whitelist.o modeminit.o pdu.o `mm-config --ldflags --libs`

root@server1:/usr/local/src/smstools3/src# cp -p smsd /usr/local/bin/

Then cd /etc

root@server1:/etc/vi smsd.conf

and added

stats = /var/spool/sms/stats
stats_interval = 0

Then Created a directory stats in var/spool/sms/

Done

Now when I run command

service sms3 restart, I get the following Error

root@server1:/usr/local/src/smstools3# service sms3 restart
Starting SMS Daemon: /usr/local/bin/smsd: error while loading shared libraries:
libmm.so.14: cannot open shared object file: No such file or directory
smsd failed.

Please advice

Thank you so much for your cooperation

regards,

Tummy

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Go to the directory where libmm was extracted.

Run make uninstall

Then start again, using:

./configure --prefix=/usr
make
make test
make install


And for smsd, run make clean smsd again.

Member
Registered:
Feb 2011
Location: New Delhi, India
Topic owner
Sir,

Thank you for your reply.

I followed the steps below

root@server1:/usr/local/bin/mm-1.4.2# make realclean

root@server1:/usr/local/bin# rm mm-1.4.2 -rvf

root@server1:/usr/local/bin# tar -xvzf mm-1.4.2.tar.gz

root@server1:/usr/local/bin# cd mm-1.4.2/

root@server1:/usr/local/bin/mm-1.4.2#

./configure --prefix=/usr

make
make test
make install

root@server1:/usr/local/bin/mm-1.4.2# cd /usr/local/src/smstools3/src# make clean smsd

root@server1:/usr/local/src/smstools3/src# service sms3 restart

Output is

Starting SMS Daemon: smsd.
root@server1:/usr/local/src/smstools3/src#


Starting SMS Daemon: smsd.
root@server1:/usr/local/src/smstools3/src#

Done


regards,

Tummy

  This topic is locked

Page:  1  2  Next

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.