SMS Server Tools

Statistics file format

Smsd collects statisic data and write them into files in a specified directory. Each file contains the values of statistic counters that were collected since the last file was written. If you stop smsd by pressing Ctrl-C or using a kill command it writes the last counter values into a temp file. When you run smsd next time this temp file will be loaded and amad adds the values to the nex statistic file. So you will not loose counters if you kill the program (except if your tmp filesystem if full). You can configure the time interval between two files.

The filenames are simple timestamps in european format: YYMMDD.hhmmss

YY = year (00-99)
MM = month (01-12)
DD = day (01-31)
.
hh = Hour (00-23)
mm = minute (00-59)
ss = second (00-59)

The statistic files contain two parts, delimited by an empty line. The first part has global counters and the second part has individual counters for each modem. So the first part has always a single line with values and the second part has always as much value lines as you have modems. The two parts have headers with field names.

Global statistic data:
- time since the last statistic file
- counter of rejected SM

Statistic data for each modem:
- counter of successful sent SM
- counter of failed SM (sending)
- counter of received SM
- counter of multiple consecutive failures
- time of modem usage by sending SM
- time of modem usage by receiving SM

Example file 010811.150030, taken from a system with 2 modems:

runtime,rejected
1200,1

name,succeeded,failed,received,multiple_failed,usage_s,usage_r
MODEM1,20,0,1,0,80,0
MODEM2,5,0,1,0,40,900

If I change the file format, I will add new counters to the right end.