aspbm(1.0)                                             aspbm(1.0)

NAME
       aspbm - Afterstep phone bill monitor.

SYNOPSIS
       aspbm  [  -h  ] [ -f config_file ] [ -position +x+y ] [ -s ] [ -t ] 
       [ -u update ] [ -v ] [ -z ]

DESCRIPTION
       aspbm is a utility to monitor ppp modem connections  for  the  AfterStep
       window  manager.   It runs under Linux systems running the X Window 
       System.

       aspbm currently provides:

       * Time on line;

       * Time until next pulse drop;

       * Cycle between dialing view and Graphic view.

       * Support for multiple time intervals (Four) + default.

       * Statistics  display(Cost,  total  cost,  total  time  on  line,  bytes
         in/out);

       * Graphic with In/Out rates is autoscaling;

       * Can be started multiple times;

       * Commandline options;

       * Does some logs;

       * Logs and Rules window;

       aspbm  uses  the  /proc/net/route to verify a ppp connection information
       under Linux.  In its normal state it displays a  window  with  two  time
       meters,  the  one on top of the window is time until next pulse drop and
       the other one  is time on line.  It also displays the graphic of  in/out
       bytes  ,speed  rates,  three led for the ON, TX and RX and the number of
       pulses in current connection.  This information is updated every second,
       except for the graphic part which can be controled in command line.

       By clicking in the lower part window (the speed digits), a pop-up window
       appears showing the remote and local IP, the cost and time in seconds to
       use in this time interval, the cost, bytes in/out of the current 
       connection and the total cost and time on line using the log file.

       By clicking in the upper part window, the window changes to the  dialing
       view, which allow to start and stop the connection.

OPTIONS
       The following options are available.

       -h    Display the command line options.

       -f config_file
             read  main  configuration file config_file instead, full path must
             be provided.

       -position +x+y
             Window position, positive values only.

       -s    Displays in shaped form.

       -t    Set the on-line timer to MM:SS instead of HH:MM.

       -u update
             Graph and speed update rate, default 5 seconds.

       -v    Prints version number.

       -z    Test mode.

INVOCATION
       asfsm can be called from one of many ways.  The most  common  invocation
       is the command line:

            [user@host] ~% aspbm -t -u 2 &

       Another way to call aspbm is from the window manager:

            *Wharf aspbm  - Swallow "aspbm" aspbm -s -t -u 2 &

       This   line,   when  placed in the wharf file causes aspbm to start in a
       button on the Wharf (1) button bar under the afterstep (1)  window  
       manager.

CONFIGURATION FILES
       There  are  two configuration files, the main configuration file and the
       rules configuration file.  No blank lines are allowed  in  configuration
       files, and all the keys must be present.

       aspbm reads the main configuration file stored in ~/.aspbm/aspbmrc.

       The main configuration file as the folowing keys:

       connect_start: command
             Where command is the command used to start the ppp connection.

       connect_stot: command
             Where command is the command used to stop the ppp connection.

       warn: num
             Where  num  can be 0 - if no warning window should be shown or 
	     1 - if warning window should be shown.

       warning: seconds
             Number of seconds to display warning window before pulse drop.

       warnmsg: message
             The message to be displayed in warning window.

       delay: seconds
             Number of seconds between phone connect and ppp interface  appears
             in /proc/net/route.

       log: num
             Where  num  can  be  0  - if no logs should be done or 1 - if logs
             should be done. (Log file is ~/.aspbm/log/aspbm.log).

       rules: rules_file
             Where rules_file is the file that contains the rules for the phone
             provider, and is stored in ~/.aspbm/rules/

       The rules configuration file as the folowing keys:

       currency_symbol: symbol
             The symbol for country currency.

       currency_position: position
             The position for currency symbol.  right or left

       activation_cost: num
             Where num is the cost to activate call.

            There  are  eight  entries  for phone provider rules, one for which
       weekday plus the default.  default: | sunday: |  monday:  !  tuesday:  |
       wednesday: | thurday: | friday: | saturday:

       each of them is followed by:

       from HH:MM to HH:MM use seconds at cost                                
       or

       from HH:MM to HH:MM use seconds at cost first seconds at cost

       If more than a time zone is needed:

       and from HH:MM to HH:MM use seconds at cost

       The  "first seconds at cost " should only be used if the first pulse has
       diferent rules than the others.

       ex: first 100 at 12 --> first 100 seconds costs 12 monetary units

            Special days are defined in the holydays: key.

       holydays: DAY/MONTH , DAY/MONTH ...

       Main configuration file example:

         connect_start: pppon
         connect_stot: pppoff
         warn: 1
         warning: 30
         warnmsg: Pulse drop in 30 seconds.
         delay: 8
         log: 1

       Rules configuration file example:

         currency_symbol:  Esc
         currency_position: right
         activation_cost: 10
         default: from 0:00 to 23:59 use 400 at 10
         sunday:  from 0:00 to 23:59 use 400 at 10 first 600 at 8
         monday: from 9:00 to 17:59 use 180 at 10
         tuesday: from 9:00 to 17:59 use 180 at 10
         wednesday: from 9:00 to 17:59 use 180 at 10
         thursday: from 9:00 to 17:59 use 180 at 10
         friday: from 9:00 to 17:59 use 180 at 10
         saturday: from 0:00 to 13:59 use 400 at 10 and from 14:00 to 23:59 use 600 at 8
         holydays: 1/1, 2/4, 4/4, 25/4, 1/5, 3/6, 10/6, 15/8, 5/10, 1/11, 1/12, 8/12, 25/12

       When multiple time intervals are needed, time interval can be exclusive:      
       from 9:00 to 12:59 use 400 at 10 and from 13:00 to 17:59 use 300 at 8

       or can be time interval inside time interval:

       from 9:00 to 20:59 use 400 at 10 and from 13:00 to 17:59 use 300 at 8

       in the second case the largest time interval must be defined first.

BUGS
       Mostly unfinished business.

       If  you  discover  any bugs in this software, please send a bugreport to
       moleiro@ip.pt and describe the problem as detailed as you can.

COPYRIGHTS
       aspbm is copyright (c) 1999 by Pedro Moleiro and  licensed  through  the
       GNU  General Public License.  Read the COPYING file for the complete GNU
       license.

AUTHOR
       Pedro Moleiro
         (moleiro@ip.pt)
         http://www.ip.pt/~ip241956/aspbm.html

                           15 June 1999                         
