===== General ===== # comments start with '#' .. ahaaa ;-) # defaults in [] # options are CASE SENSITIVE (yes im lazy..) ==== Debug ==== # debug [0] # if enabled lists lots of debug messages # #debug 1 ==== Check delay ==== # check_delay [1] # time between connection tests. ppplog sleeps exaclty check_delay # seconds. you can increase this value as you like. ppplog will stop # accounting as soon as it detects that the link is down (which takes more time # if check_delay is big). # #check_delay 1 ==== Dial delay ==== # dial_delay [0] # the delay in seconds between the start of pppd and the actual internet # connection. depends on your phone company. normally they charge you as soon # as the line is established. # # dial_delay 0 ==== Silence mode ==== # silent [0] # you will get no output if silent is 1 # #silent 0 ==== Backgrouding ==== # background [0] # program goes to background immediately after start. useful if you # would like it to run as a service # #background 0 ===== Accounting Information ===== ==== Config name ==== # config [no default] # THIS LINE IS IMPORTANT! The line creates a new set of zone definitions. All accounting # options after this line are attached to the config set. So this line has to appear before you # define log-/savefiles zone definitions etc. If you want to log costs for another # phone company at the same time just add another 'config' option. # #config my_sunrise_definition ==== Log file ==== # logfilename [~/ppplog.log] # where do you want the logfile to be. set to /dev/null if you dont like a # logfile (why do you use this program???). gets updated every time a connection # gets closed. # #logfilename /usr/local/etc/ppplog/ppplog.log ==== Save file ==== # savefilename [~/.ppplog] # the file where ppplog keeps track of the running costs. the file gets # updated every time a connection gets closed. # #savefilename /usr/local/etc/ppplog/ppplog.save ==== ISO logging ==== # isolog [0] - nice format # do you prefer a nicley formatted logfile or an ISO compliant (hopefully) # logfile for further processing? # #isolog 0 ==== ISO delimiter ==== # isodelim [" "] # only used if isolog = 1. the delimiter between the log entries # #isodelim "," # CSV Mode ==== Initial cost ==== # initial_cost [0.00] # some phone companies charge you an establishing fee. (i.e. sunrise in # Switzerland = 0.03/per call # #initial_cost 0.03 ==== Minimal cost per call ==== # min_cost [0] # a call always costs at least that much. even if your phone call would cost # less because it didn't took long enough. depends on your phone company. # normally you set either initial_cost or min_cost. # #min_cost 0 ==== Currency strings ==== # currency_before ["$"] # a text string displayed before the cost if silent = 0. if isolog = 1 this # is the string used in the log file. # #currency_before "CHF" # currency_after [""] # displayed in formatted log and if silent = 0 after the cost. # #currency_after "" ==== Cost divider (Unit of Measure) ==== # uom_cost [1] # the unit of measure cost (in seconds) is used to simplify the zone cost # entries. most phone companies tell you the phone cost per hour. In this # case set uom_cost to 3600. see the examples below and mail me if that is # unclear. # #uom_cost 3600 ==== Active days ==== # day [no default] # day is used to simplify the zone entries. just select the days when the zone # is active. if the zone is active on weekday's, write day 1 2 3 4 5. 1 stands # for monday, 2 for tuesday etc. # #day 1 2 3 4 5 ==== Zone definition ==== # zone [no default] # zone defines a cost zone. this is the most important option here. tell # ppplog when the zone starts, when it ends, how long a unit is and how # much the unis costs. example # # name of zone starts at 08:00 ends 17:00 unit 1 sec and costs 1.5 # zone "normalcharge" 08 00 17 00 1 1.50 # # if it costs 1.5 per hour remember to set uom_cost 3600. # #zone char* int int int int int float ==== Special days, holidays etc ==== # specialday [no default] # specialday is a special zone used for national holidays. the format is similar # to zone. remark the last 3 parameters. special days are always checked first. # ppplog uses the first zone that matches the current time and date!! # # specialday name starthour startmin stophour stopmin unitlength unitcost day month year #specialday "x-mas" 08 00 23 00 1 1.5 24 12 2003 ===== Config file including ===== # include [] # include reads another config file. this helps you keep national holiday # definitions in a seperate file. of course you can put any config options # into that file # #include /usr/local/etc/ppplog/myholidays.conf ===== Examples ===== ==== Example 1 ==== # sunrise switzerland has 3 zones on weekdays and 2 zones on weekends. # they charge you per second not per unit. you have to pay 0.03 CHF for # every established call # # Weekdays: # 08:00 - 17:00 CHF 1.67 / Hour "Normal Woche" # 17:00 - 23:00 CHF 1.50 / Hour "Nieder Woche" # 23:00 - 08:00 CHF 0.60 / Hour "Nacht Woche" # # Weekends: # 08:00 - 23:00 CHF 1.50 / Hour "Nieder Weekend" # 23:00 - 08:00 CHF 0.60 / Hour "Nacht Weekend" # # this setup looks like this #config sunrise #currency_before "CHF" #initial_cost 0.03 #min_cost 0 #uom_cost 3600 # #day 1 2 3 4 5 #zone "Normal Woche" 08 00 17 00 1 1.67 #zone "Nieder Woche" 17 00 23 00 1 1.5 #zone "Nacht Woche" 23 00 08 00 1 0.6 # #day 6 7 #zone "Nieder Weekend" 08 00 23 00 1 1.5 #zone "Nacht Weekend" 23 00 08 00 1 0.6 # #you can add national holiday here #day 1 2 3 4 5 #special "x-mas" 08 00 16 00 1 23 #.. etc. # # thats it! easy, isn't it? ==== Example 2 ==== # swisscom switzerland has 3 zones on weekdays and 2 zones on weekends. # they charge you per unit. every phone call costs at least 0.2 CHF. # costs are rounded up to 0.1 CHF. # # Weekdays: # 08:00 - 17:00 CHF 2.8 / Hour "Normal Woche" # 17:00 - 23:00 CHF 1.80 / Hour "Nieder Woche" # 23:00 - 08:00 CHF 0.70 / Hour "Nacht Woche" # # Weekends: # 08:00 - 23:00 CHF 1.80 / Hour "Nieder Weekend" # 23:00 - 08:00 CHF 0.70 / Hour "Nacht Weekend" # # this setup looks like this #config swisscom #currency_before "CHF" #initial_cost 0 #min_cost 0.2 # #day 1 2 3 4 5 #zone "Normal Woche" 08 00 17 00 129 0.1 #zone "Nieder Woche" 17 00 23 00 200 0.1 #zone "Nacht Woche" 23 00 08 00 514 0.1 # #day 6 7 #zone "Nieder Weekend" 08 00 23 00 200 0.1 #zone "Nacht Weekend" 23 00 08 00 514 0.1 # # you can calculate the unit length with this formula: # 3600 * [cost per unit] / [cost per hour] # round the result. # ## Have Phun!