		    
	                    MONOPOLY ver.1.5.5 
            	       written by Cortex Reaver
		  member of MegaCoders Co. and eXe.cutive
   since ver. 1.3 maintained by Jaroslaw Woloszyn (yossa@pld.org.pl)
           MONOPOLY Home Page: http://dione.ids.pl/~yossa/monopoly
		  
1. What is it?
2. How to install?
3. User manual.
4. Q & A.

1. What is it ?
    Monopoly is a user friendly counter  of ppp  connections, which will allow
    you to control phone bills. Program counts time and cost of  call  in  any
    period of time (month, yesterday, today and last call(s)).  It  also  have
    user friendly interface which gives more detailed analyses.

2. How to install ?
    Program needs ncurses library.
    First type make, which will show available options.
    Your first step will probably be editing of Makefile and setting
    directories (and rc file) and editing monopolyrc. Then type
        make monopoly
    which will compile the program.
	su 
	make install
    will install the program to directories you have chosen.
	monopoly -n
    to create new monopoly.log file.
    And now comes the security problem. Monopoly uses /var/log/messages* which
    aren't visible for everybody, because of security. So monopoly can be used
    just from root account. You can add +r attribute to log files if you don't
    care about logs, and use monopoly from normal account.
    You can also change group owner of log files for i.e. loggers and add users
    who can read logs and use monopoly to that group.
    If everything is OK you can use monopoly.

3. User manual.
   Program could be run in two modes. First one shows statistics from actual
   month, yesterday, today and the last call.
   Second one is Visual Monopoly - monopoly with user interface.
   
   OPTIONS
    -m  statistics from actual month, 
    -y  from yesterday,
    -t  today,
    -c  last call,
    -d  running monopoly with any option makes it update its log file. If you
        don't want to do this, use this option. Everything will be showed
        without looking to /var/log/messages*  
    -n  creates new history file. WARNING: Old file will be deleted.
    -u  only updates log files. You can put it in your crontab.
    -v  running monopoly in visual mode. 
    no parameters - help
    
    Remember to give options without spaces:
	-v -d 
    is wrong you have to use 
 	-vd
    syntax.
 
    Using monopoly in Visual Mode.
    Screen is divided into 4 windows. You can change current window using TAB
    key.
    The biggest window shows all registered connections with their dates, time
    duration, impulses, cost and speed.
    You can scroll the window using PAGE UP, PAGE DOWN, HOME and END keys.
    On the bottom number of first connection in window plus 16 and amount of 
    all connections are showed.
    
    To exit the program use q key. 
    
    monopolyrc file
    
    ImpulsPrice=<price>
    Price of one impulse in your country - i.e 0.19 
    
    LogFile=<name>
    File with history will be created in $HOME as name or in another
    directory, if you give full path.

    SystemLog=<name>
    Location of system logs. Usually /var/log/messages
    
    AddDelay=<secs>
    Real time of connection is usually few seconds longer than time from system
    logs, because modems have to negotiate the connection.
    Here you can input how many seconds have to be added to all connections, to
    make it more reliable. 

    StartProgram="<name>"
    Program which puts StartMsg to system logs.

    StartMsg="<text>"
    Messages which StartProgram puts to system logs.

    EndProgram="<name>"
    Program which puts EndMsg to system logs.
 
    EndMsg="<text>"
    Messages which EndProgram puts to system logs.

    SpeedAfter="<text>"
    The line which after which speed of the connections is logged.

    LANG=x
    Sets the language: 0 for English, 1 for polish with polish font, 2 for
    polish without polish fonts.
   
    Default values are good for ppp-2.3.3-4, which I've currently installed.
    Look in your log and see what is suitable for you.

    In previous versions of ppp chat had line CONNECT -- got it in logs, but
    now, this line is splited into two lines. And here is the problem.
    String CONNECT is also in line "expect(CONNECT)". "-- got it" is also used
    too many times. So I use " CONNECT" (with space as first character).
    I think that the way of searching for these strings should be changed, to
    make it more flexible (regexp?)  

4. Q & A
    Q: I always get the same connection speed - 115200.
    A: Read manuals to your modem and set proper initial strings. Speed
       which is shown in logs depends from modem. In many modems you should
       look for AT W or S95. (add to ppp-on-dialer ATZW2 instead of ATZ)

    Q: I don't want to show logs to everybody. What should I do?
    A: Create group i.e. loggers, 
         newgrp loggers
       them make
         chgrp loggers /var/log/messages*
         chmod 640 /var/log/messages*
       From now, users in group loggers can read system logs.
       Now, if you want to use monopoly as user john, add him to the group
       loggers: gpasswd -a john loggers
               


   If you found a bug feel free to contact me and I will try to fix it. You can    also send patches if you can fix the problem yourself.  
 
   Cortex Reaver
   translation and current developing - Jarek Woloszyn (yossa@pld.org.pl)  

 
   Contact with:
     Cortex Reaver - Author of Monopoly:
     email: creaver@kki.net.pl
            creaver@ghost.fema.krakow.pl - only if kki is down
     or using newsgroup pl.comp.os.linux 

     Jarek Woloszyn - current developer:
     email: yossa@pld.org.pl
       WWW: http://dione.ids.pl/~yossa

    Monopoly Home Page: http://dione.ids.pl/~yossa/monopoly

