INSTALL
上传用户:eo_sii
上传日期:2007-01-05
资源大小:91k
文件大小:3k
- Project SMSLink: Analysis and Reporting Scripts install procedure
- =================================================================
- (Last modified on 13/03/00)
- Purpose of each script:
- -----------------------
- * sms_stats : Analyses the system log files to count the number of
- connections made to the server, of messages successfully
- sent (as a total and as a percentage), and of timeouts
- waiting for a free GSM instance. It then calls sms_users
- to get a count of messages sent per user, and eventually
- sends a mail to the designated admins with all the info.
- The summary info is kept in a file, in a comma-delimited
- format for easy import and further processing. All the SMS
- related entries in the log files are stored in separate
- archive files to avoid being rotated out and lost.
- * sms_users : Called by sms_stats. Analyses the logs and generates a
- rundown of messages sent by user. The users are sorted,
- heaviest user first.
- * bulksms : Sends the same SMS message to a list of GSM numbers provided
- in a text file. Generates a log file with the result of each
- request.
- Installation and usage:
- -----------------------
- 1./ Copy those scripts in an appropriate location.
- The two reporting scripts should be copied to the location where you store
- all of root's maintenance scripts (if you have such a place). For bulksms,
- /usr/local/bin would be a good place.
- 2./ Review the global variable defined at the beginning of each script.
- There are some values you can customize in the variables defined
- at the beginning of each script, such as the summary filename
- ($SUMMARY) and its location. Also please make sure the log file
- names I'm using match those on your system (as defined in
- /etc/syslog.conf).
- 3./ Create the target directories when required.
- An archive is kept of all logging information from the SMS subsystem.
- This information is kept, by default in a directory called
- /var/adm/sms_archive. It is defined by the $ARCHDIR variable in
- sms_stats. Please create this directory beforehand and assign to it
- the permissions you feel are right for your site.
- 4./ Add the master script to root's crontab.
- Schedule sms_stats to be run once a day every day (preferably at some
- quiet hour for the system) by adding it to root's crontab file.
- 5./ Create a mailing list in your mail aliases file.
- sms_stats will do its reporting by sending a mail to the members of
- the "smsmasters" mailing list, as defined in your /etc/aliases file.
- Don't forget to run newaliases after modifying it.
- By default, those mails are sent on weekdays only (MON-FRI).