RANDOM QUOTE
What does kissing really mean to me? To me, if you feel, when you kiss a girl, that certain feeling of all those dolphins, like, swimming through your blood stream, and you get those good tingles inside your stomach, I don't think there's any better feeling.

-Corey Haim
Search
Sticky Posts
The Ghettotenna
SVG Icons
KNetworkLED
Brew Your Own Damn Beer
Latest Comments
WTFIT Issue #2 (1 comments)
SVG Icons (7 comments)
A Revolution in Taco Consumption (5 comments)
Ball Wire II (3 comments)
Revolution Redux! (4 comments)
Links & Friends
Reddit
Kotaku
Hardgeus
PVP Online
Boing Boing
The Sneeze
Penny Arcade
Resources
glitch13.com :.::.: ..:.::. :.:::... Home | About | Feedback | Archive | RSS

KNETWORKLED
Category: Tech
Monday, February 23rd, 2004 @ 04:59 pm
Posted By Brent

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.




Comments

NAME: Raoul
WEBSITE: http://home.tiscali.be/raoul.linux/
Monday, January 24th, 2005 @ 01:54 am
Nice for your utility , I have compiled your TarBall to create a RPM for Suse 9.2 , You can find this RPM in my homepage download section.

A suggestion is to replace the blue color by green color ..more easy to see network activities.

Good work
Raoul
ex IBM'er



NAME: Carlos
Saturday, December 11th, 2004 @ 02:01 pm
Dunno where to report bugs, so I try here:

once configured knetworkled should stay with given settings. Currently, however if it detects lack of interface it was configured to monitor it switches to "Configure me" state which sucks as heel. I personally use wlan0 but I configure it after I log in. So I start my KDE session and when it's loaded I setup my network. Other tools I use to monitor wlan0 interface simply stay tuned waiting the interface to appear. You treat it as a misconfiguration, which is incorrect.

carlos a-t- wfmh d-ot org d-ot pl


NAME:
EMAIL: *OPTIONAL*
WEBSITE: *OPTIONAL*
WEBSITE: *OPTIONAL*
Comment:
    
|