UPDATE (4/25/2005):
I am no longer supporting this project. Not long after I started this project, KNetStats came along and pretty much did everything KNetworkLED did, but better. If you're wanting a system tray network activity monitor, check on KNetStats. Its author seems to have more time and energy (and KDE coding knowledge) to devote to his project than I have for mine, so I surrender. The KNetworkLED code is still under the GPL, so I'll keep this page up as a place you can grab the code if the mood strikes you.
KNetworkLED, a network activity monitor for the KDE SystemTray
Here's a little app I threw together basically cause I wanted it. Being
a guy who just left the Windows world about two years ago, I came to
rely on the little network activity LED display in the systemtray to
let me know if something was just taking a long time to transmit, or if
the connection was just hung.
Now, I know there's a lot of these little apps all over the place,
but there wasn't one for kde's system tray that I could find. Even if
there were other ones that you could get to work in the systemtray, I'm
a big fan of KDE's consistent look and its integration, so I decided I
might as well make something I could use and learn the KDE/QT framework
while I was at it.
Now, for the disclaimer: This is BETA stuff here. It works for me, I
can't garantee anything. I made it with KDevelop, while learning
KDevelop, while learning the KDE and QT api's, while being a neophyte
C++ programmer.
Click here to download KNetworkLED v0.5.1 source tarball with KDevelop project! (515k)
Current Features:
- Docks into KDE system tray.
- Has a configuration dialog from which you can select what network
device to monitor (out of the ones you have available)and how often you
want to poll that device for activity (100ms to 1000ms).
- Tooltip popup when mouseovering the systemtray icon that displays
what device is being monitored and how many TX/RX packets have been
transmitted/recieved.
Known bugs:
- It doesn't get the correct RT/TX values from /proc/net/dev because
the columns for the numbers are different than the the title columns
for a couple people people I've seen (don't know why their dev file is
screwy). Its possible that it's the same for people with kernels other
than 2.4.x or 2.6.x. If yours is different and you know what columns
are what, the columns the program uses are simple defines that you can
change before compiling.
- There's no install rule for the makefile.
- I'd like it to detach from the console or whatever its run from,
this is probably easy, but like I said, I'm a neophyte at this stuff.
- I'm sure there's a few more...
Other Issues (if you know kde programming please help, most of these are caused by me not knowing much about it):
- I'm using xpm's to do the icons, the actual kde iconLoader thing confuses me. Help in this area would be greatly appreciated.
- I don't think I structured the app correctly, When closing any
window, it tries to close the entire app and I'm canceling it in the
code.
- I'm not sure if I'm doing the whole DCOP thing correctly (not that there's really anything to expose to it).
You can also grab the latest CVS version:
cvs -d :pserver:anonymous@www.hardgeus.com:/usr/local/repository login
(you will be prompted for a password. Just hit enter.
cvs -d :pserver:anonymous@www.hardgeus.com:/usr/local/repository checkout knetworkled
This is released under the LGPL. Oh yeah, it also contains some parsing code from the Tleds
project because I wrote my own parsing, but it was a pile of crap.
Please, feel free to submit patches, bug reports, suggestions, etc to
glitch13 at glitch13.com or leave me feedback.
Some people inquired about changing the icons. To do this, you would
need to create 4 icons for each state: no traffic (network0.xpm), send
only (network1.xpm), receive only (network2.xpm), and send and receive
(network3.xpm). Then save them as 22x22 xpm's and replace the ones in
the src directory. Then a simple recompile should do the trick. If
you'd like to have my originals (or should I say the ones I originally
ripped off of the Crystal Theme) to gimp up, click here to download them.
ChangeLog
- Version 0.5.1 - June 6th, 2004
- Poll Timer was not updating on the fly when user changed it.
- Version 0.5 - April 1st, 2004
- Needed to include stdlib.h for functions atol() and atoi() [thanks mrherver@tiscali.it].
- Poll Timer was never set to the user's poll time (was still hardcoded to 300ms).
- Version 0.4 - March 19th, 2004
- fixed an error in the automake setup.
- Version 0.3 - March 9th, 2004
- Code cleanup and commenting.
- A few cosmetic changes for the config and status windows.
- Started tracking versions.
- Version 0.2 - March 1st, 2004
- Changed monitoring from bytes transferred to packets. High byte counts were hitting the long int limit.
- Added a configuration window where user can choose which device to monitor and polling rate.
- Added KDE config file support to save user's choices.
- Version 0.1 - February 25th, 2004
- Initial release.
- Monitors hardcoded device eth0
- Fixed bug where it wasn't closing the /proc/net/dev file and would cause a "to many open files" error after a while.
- Added a status window.
|
bkelly.
This document was last updated on 7/01/2004.