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 02:07
SMSTools3 Community » Help and support Bottom

[answered] SMSd Status Monitor Usage

  This topic is locked

Page:  1

Author Post
Member
Registered:
May 2009
Location: Italy
Hi,
i'm using Nagios to monitor my Home. I would like monitor also SMSd. Now I'm checkin if process is running, but i would like to check also if phone is woking fine.
I saw the "Status Monitor" feature and i think is what i need. As i understood i have to recompile SMSd enabling this feature.
What i'm asking for is if can I run smsd -s from command line also if smsd is running in background and if this work or not.

Thanks

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
You cannot run smsd -s if another smsd is running on background. Backgrounded smsd will detect that another smsd is started and will stop with an error message in log.

When you run smsd -s in terminal, it starts all modem processes as a child process like daemonized smsd does. Messages are therefore handled normally. When you press Ctrl-C, smsd and also modem processes will stop.

Member
Registered:
May 2009
Location: Italy
Topic owner
HI Keke,
useful new feature should be the ability to query the daemon and retrive some vital information like modem status.
Another useful feture is Log rotation..........

Now I'm trying to write a script to detect error from the log, of for Alarm Hanlder. There is more documentation about Alarm Handler?

Thanks for your attention.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Quote
useful new feature should be the ability to query the daemon and retrive some vital information like modem status.

Perhaps the status line (same than with smsd -s) could be written to the file, like GSM1.counter currently. I look this within a few days.

Quote
Another useful feture is Log rotation..........

Sure, but it's operating systems job. No another logrotate is needed. ;)

Quote
There is more documentation about Alarm Handler?

No more than alarmhandler page. Arguments are clear but probably some kind of list of general error messages should be written. It however takes time and must then be kept up to date. I do not promise this list, at least right now...

Member
Registered:
May 2009
Location: Italy
Topic owner
Quote
Perhaps the status line (same than with smsd -s) could be written to the file, like GSM1.counter currently. I look this within a few days.

Yes something similar. Also SMSd could write into a file Every X second (for example 5 or 10) with the status. Then monitor system can parse the file. After X second SMSd will update that file with new information.

Quote
Sure, but it's operating systems job. No another logrotate is needed.

I'm new in Linux word, I'm work with from 3 months. How do you mean? SMSd write a single log file to /var/log/smsg.log. How can I configure OS to rotate this log?

Quote
No more than alarmhandler page. Arguments are clear but probably some kind of list of general error messages should be written. It however takes time and must then be kept up to date. I do not promise this list, at least right now...

Sure, thanks no problem. I try to check source code, and find the error i need.

Thanks

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
marcolino7 wrote
Quote
Sure, but it's operating systems job. No another logrotate is needed.

I'm new in Linux word, I'm work with from 3 months. How do you mean? SMSd write a single log file to /var/log/smsg.log. How can I configure OS to rotate this log?

It may depend on the distribution. Here is how rotating was done in one of my servers, this is Debian based (but smstools not from Debian) and defaults to 4 month (see /etc/logrotate.conf). The file is /etc/logrotate.d/smsd:

(You may have /etc/init.d/smstools script if using Debian or Ubuntu)

It's very important to restart smsd after rotating, otherwise it continues writing to the previous log (smsd.log.1). This is because open file handle remains the same, it does not care if the name has changed.

For more details Google will be a Good friend :).

Member
Registered:
May 2009
Location: Italy
Topic owner
Hi keke,
i googled but i can't get log rotate to work.
What i did is:

1) created a file /etc/logrotate.d/smsd


2) i checked that startup script is /etc/init.d/sms3
3) restarted smsd

No logrotate here. I have a doubt, I configured logfile = /var/log/smsd.log in /etc/smsd.conf. Is it correct this way?

No other thing to do?
Thanks

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Do you have logrotate installed? Try which logrotate and ls /etc/cron.daily/logrotate.

Other settings seems to be ok.

But usually servers have logrotate... Perhaps you do not have cron running?

  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.