RANDOM QUOTE
I can resist everything except temptation

-Oscar Wilde.
Search
Sticky Posts
The Ghettotenna
SVG Icons
KNetworkLED
Brew Your Own Damn Beer
Latest Comments
Objects in the Mirror (4 comments)
Doo Dah Doo Doo Doo Dah Dah Doo... Big News Coming Your Way!!!!!!!!!!!!!!!!!!!!!!!!!!! (3 comments)
WTFIT Issue #2 (1 comments)
SVG Icons (7 comments)
A Revolution in Taco Consumption (5 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.



2 Comments...

GENTLEMANLY
Category: Social
Saturday, February 21st, 2004 @ 09:53 pm
Posted By Brent
As you can see pictured, I have procured a device that frees me from have to touch my gentlemanly lips to actual tobacco products.

Yes, tomorrow, I will be a well adorned gentlmen of leisure, as will all of my counterparts.

For those of you that don't know, we live in New Orleans, and this weekend is the grand thrust of Mardi Gras that happens right before the climax of Fat Tuesday. Thoth is the parade, Ian's is the house near the parade route, and gentleman of leisure is the dress. So wear a robe, put on some slippers. and make damn sure you have a moustache grown.


8 Comments...

MY DAD
Category: Personal
Saturday, February 21st, 2004 @ 12:38 am
Posted By Brent
Once, my dad was watching TV around the wee hours of the morning. He noticed, every now and then, a mouse would run along the baseboards of the living room. My dad then got up, drove to the store and bought one of those sticky mouse traps.

My dad continued watching TV until he heard a panicked, desperate squealing coming from the corner.

I walked in the kitchen as my dad was hanging the mouse on the sticky mouse trap over the trash with scissors in his other hand.

"You can resuse the traps," he said.


2 Comments...

A RETURN TO GRACE.
Category: Social
Saturday, February 14th, 2004 @ 04:40 pm
Posted By xerxes7
I'm going to try to explain a pretty difficult concept here. Especially difficult to young lads and ladies such as ourselves. People who smoke smokeables via crude paper tubes that we insert directly into our mouths. People who drink any manner of stuff directly out of the container we purchased it in. People who style our hair in various fashions as our whims command. People who wear sometimes garish, sometimes unkempt, sometimes even unclean clothing.

Did any of you know that there was a time when people had manners? It is true. I'm not sure entirely what manners are, but I think this gentleman does.



You might think that having manners involves relaxing by a pool. Would that the task were so simple and enjoyable. Perhaps another example would better illustrate the point.

I hope you're starting to get the idea now. Having manners and being a gentleman require proper dress, proper hair styling, and one more thing.

And that thing is a moustache. Simple facial hair will not suffice. Gentlemen do not parade about with beards as if they were pirates or hippies, no. And they do not galavant with big muttonchop sideburns, as if they were off to fight in the Boer war or sing Elvis tunes. No, the moustache is the right look for a gentleman. It says to the world, "I am a man and I can (and do!) grow hair out of my face."

Now, I'm sure by this point you are probably wondering, "What does this have to do with me? For I am not concerned with gentlemanly things." And to that, I say, "That is exactly the problem. Nobody is." It is actually a wonder to me that I found these pictures at all. But that needs to change.

As I am sure you are all well aware, there are morally challenging times upon us. Even as I type, I can hear revelry and chaos in the streets. There are people tootling on tooters, blaring loud jungle music through public address systems, and driving unsightly trucks mere blocks from my house. This cannot be allowed.

We must band together, and show the world what decent behavior looks like. What civilized dress can be. That it is possible to not have one's hair blowing about all willy-nilly. That a moustache is a symbol of disinction.

When will we do this? I propose this coming February the 22nd. It is the Lord's day, a day practically founded for the express purpose of setting good examples. It is a day that I know for a fact will have carousers strutting their stuff mere steps from my home. It is also close enough to my birthday to call it a birthday celebration.

So come, join me. Be here and ready to represent in the morning, for the main thoroughfare that leads to my abode will be rendered nigh unpassable by 11 or so ante-meridian. Put on your finest robe. Wear some comfortable slippers. Slick back your hair. And if you must smoke, do find some way to keep the combustibles from touching your primary orifice.

AND HAVE A FUCKING MOUSTACHE!!!!


7 Comments...

ON WEBLOGGING
Category: Rant
Friday, February 13th, 2004 @ 11:06 am
Posted By Brent
I seem to be having problems getting motivated to update the site and I believe I've figured out why.

After the redesign, I tried to move away from just "weblogging" and move more towards actually writing something worth reading when I posted. What I found out about myself in the process is that I have a tendency to not post anything unless I have something profound to write about. Well maybe not profound, but at least something that's interesting to read and can last more than two paragraphs.

The downside of this discovery is that the longer I go without posting, the longer I wait until something more profound comes to me to write about, which then creates a feedback loop and an exponentially longer wait between posts.

Another discovered downfall to this is that when people actually comment on the post in the comments (rarely) their attention spans start to collapse after about the third comment and they spiral off into throwing up links to things they've found or just try to one up each other in the game of "who can spout out more non-sequitur bullshit."

I've decided that there's only one conclusion, post a lot more about less profound shit.


4 Comments...

|