		pppmon-0.2  -  Monitor PPP bandwith

This is a small program (or really two) for monitoring the bandwidth
used by a PPP link. One server, pppmon, that runs in the 
background (should really be started by inetd, but no support for that 
yet), and one or many clients that connect to pppmon and display 
statistics in a small X window. 

Main purpose is for people using ppp-on-demand (diald) for their
internet link, especially when the modem is on a computer out of
reach (I always miss those LEDs on the modem when I can't see them :).

Nothing fancy, pre-alpha-0.2-relase or something. I'm no X hacker
so the code probably stinks but it works (for me). xpppmon.c should
compile without problems on a Sun too (openwin).

To install:
  1. Add a service to /etc/services called pppmon, use a nice free
     port number. If you don't want to do this, edit pppmon.c and
     xpppmon.c and change 5676 to what you think suits you.
     If you do make install as root you will get this added automatically.
  2. Compile pppmon and xpppmon. You may need to edit the Makefile.
     There are precompiled binaries included if you trust me enough.
  3. Start pppmon. You don't have to run it as root if you have write 
     permissions in the /etc/ppp directory.
     Sample rc file is included, place pppmon.init in /etc/rc.d/init.d and
     make suitable links.
  4. Start xpppmon and be happy. :)

Ah yes, and there's the ip-up and ip-down scripts too. You have to
install them (or extend the ones you got) with the ones in this
package.


If you have any suggestions as how to improve this, making it more
fancy, use X more efficiently (perhaps I should read some documentation)
or anything, please feel free to email me. No flames please... :)


There is a slight problem with high speed modems using compression,
and it's that it's quite difficult to set the scaling right. Normally,
a 14400 bps modem has a maximum transmit speed of 14400 bits per second.
By using ping and large packet sizes I can reach 57600 bps without
problem (ping probably sends rather dull packets), text file transfers
goes up to some 30k. Use the -bps argument to set it the way you
want it - no auto rescaling, sorry.


Note that you have to use 2.0.x kernels (or 1.3.x or 2.1.x, not tested though)
to compile this. You also need a recent version of pppd.
If you have an 1.2.x kernel, find pppmon-0.1 instead. There's no big 
difference between the versions. You might want to use the xpppmon from this
package if you're using fvwm95.
You also need the xview-devel rpm installed, and of course the X devel rpms.


This is my line from the FvwmButtons section in .fvwm2rc95 (replace PPPHOST):
  
*FvwmButtons(2x1, Title "", Swallow(UseOld) "PPP Monitor" 'Exec xpppmon -host PPPHOST -cw 104 &')


I vaguely recall someone announcing a pppmon-0.2 long time ago. I can't seem
to find it again (haven't looked that closely though). This is however my 
version 0.2 for use with 2.x kernels. Patches are welcome.. especially if
someone could help me build an rpm out of this. I don't want to do this since
  1. I don't know how :)
  2. I am using the newest rpm with dependencies and stuff, and I don't want
     to use that format just yet.
I did receive a few patches for the last version, all of them disappeared very
sudden when some hoodlums broke into my office and removed all the computers.
I have since then invested some money in a backup station. ;/
As Linus once said, "Backups? Well I just publish my code on Internet".


And, as usual, for me it displays PPP bandwidth. For you, it might
as well blow up your TV. Don't say I didn't warn you... :)


Good luck,

  Calle Karlsson
  KaSH Software AB
  calle@kash.se
