I'm only really able to program CLI scripts/programs, but I'm fed up of the ugly Nettraf TCL/TK Client. Does anyone fancy making a Python/GTK client?
Nettraf: http://www.nettraf.hpg.ig.com.br/
It looks like the client just receives this from the server:
DATA 3692021729 2804675136
DATA 3692027262 2804903117
DATA 3692033440 2805132420
DATA 3692038905 2805362340
DATA 3692049224 2805591921
DATA 3692061917 2805821085
DATA 3692079529 2806050515
DATA 3692083165 2806113976
DATA 3692088080 2806302771
DATA 3692093573 2806464284
DATA 3692097478 2806555280
DATA 3692100378 2806661159
DATA 3692103707 2806783217
Cheers z0mbix
Any Python Programmers Bored?
Moderators: mrben, jono, matt, trig
25 posts • Page 1 of 2 • 1, 2
- z0mbix
- New to the freak show
- Posts: 38
- Joined: Fri May 06, 2005 4:56 pm
- Location: Harrow, UK
Any Python Programmers Bored?
If it ain't broke, it's Ubuntu
- Elleomea
- Knows their stuff
- Posts: 264
- Joined: Thu Apr 08, 2004 1:58 pm
- Location: Aberystwyth, Wales
I might have a go; already started knocking up the GUI, but be warned, if it takes me more than a day or two I'm likely to be distracted and lose interest
.
Trying to keep the GUI similar to the Tk version (only prettier, obviously):

Trying to keep the GUI similar to the Tk version (only prettier, obviously):

How much ham could a hamster stir, if a hamster could stir ham?
- Elleomea
- Knows their stuff
- Posts: 264
- Joined: Thu Apr 08, 2004 1:58 pm
- Location: Aberystwyth, Wales
I was planning on combining the In and Out graphs, in to two line graphs on the same axis with different coloured lines; would that be okay with you, or would you prefer the separate graphs that the original Tk interface employs? My thinking was simply that if you wanted to compare incoming and outgoing data flow this presentation style would be much nicer.
How much ham could a hamster stir, if a hamster could stir ham?
- z0mbix
- New to the freak show
- Posts: 38
- Joined: Fri May 06, 2005 4:56 pm
- Location: Harrow, UK
That's fine by me, I'm just happy that you're interesting in writing it. Something that would be nice though is the ability to run the program more than once to monitor more than one server, as I have atleast four servers what I'd like to monitor.
If it ain't broke, it's Ubuntu
- Elleomea
- Knows their stuff
- Posts: 264
- Joined: Thu Apr 08, 2004 1:58 pm
- Location: Aberystwyth, Wales
Well, here's an initial version: http://linux.mikeasoft.com/gtknettraf.tar.gz
It should have all the features the Tk client has plus:
* A preference dialog.
* Semi-decent error checking.
* Unit selection (bytes, kilobytes, megabytes), so it can handle displaying anything from a few bytes to 10 megabytes of traffic (per second).
* Prettyness.
It should also work in Windows, though I haven't tested that.
Here are a few updated screenshots:
If you nag me enough I might get around to adding support for multiple machines
. How does having the display tabbed, with a separate tab for each machine sound?
It should have all the features the Tk client has plus:
* A preference dialog.
* Semi-decent error checking.
* Unit selection (bytes, kilobytes, megabytes), so it can handle displaying anything from a few bytes to 10 megabytes of traffic (per second).
* Prettyness.
It should also work in Windows, though I haven't tested that.
Here are a few updated screenshots:
If you nag me enough I might get around to adding support for multiple machines
How much ham could a hamster stir, if a hamster could stir ham?
- z0mbix
- New to the freak show
- Posts: 38
- Joined: Fri May 06, 2005 4:56 pm
- Location: Harrow, UK
It looks superb, thank you very much
I'm not sure if it's me being a bit stupid, but the readings are quite different between both clients. I have both running at the same time: Both are set to bytes per second. This is what I'm seeing:
With the tk version you have to set the min/max bytes per sec in ~/.nettrafcrc
What exactly is the DATA line the client receives?
With the tk version you have to set the min/max bytes per sec in ~/.nettrafcrc
What exactly is the DATA line the client receives?
If it ain't broke, it's Ubuntu
- Elleomea
- Knows their stuff
- Posts: 264
- Joined: Thu Apr 08, 2004 1:58 pm
- Location: Aberystwyth, Wales
Strange; I get almost identical results from both clients, there's a slight time difference between when they each update though. Are you sure this isn't what's causing the difference? The two graphs look fairly similar in shape, and the GTK client looks to be in the middle of a spike of activity while the Tk client looks as though it might be at the end of it.
Also have you checked they're monitoring the same interface? The default Tk setup looks at ppp0, while the default GTK setup looks at eth0. Though this would seem unlikely due to the similarity of the graphs.
Also have you checked they're monitoring the same interface? The default Tk setup looks at ppp0, while the default GTK setup looks at eth0. Though this would seem unlikely due to the similarity of the graphs.
Last edited by Elleomea on Fri Jul 22, 2005 1:17 pm, edited 1 time in total.
How much ham could a hamster stir, if a hamster could stir ham?
- Elleomea
- Knows their stuff
- Posts: 264
- Joined: Thu Apr 08, 2004 1:58 pm
- Location: Aberystwyth, Wales
On second thoughts, try this version: http://linux.mikeasoft.com/gtknettraf-1.0.1.tar.gz
I might have been assuming network conditions would be more perfect than I should have; since I was testing on the localhost this wouldn't have come up as an issue, but over a real network it'd be more likely to become apparent.
I might have been assuming network conditions would be more perfect than I should have; since I was testing on the localhost this wouldn't have come up as an issue, but over a real network it'd be more likely to become apparent.
How much ham could a hamster stir, if a hamster could stir ham?
- z0mbix
- New to the freak show
- Posts: 38
- Joined: Fri May 06, 2005 4:56 pm
- Location: Harrow, UK
It is much quicker to get the data than the tk version, so i can now see it's getting exactly the same data. Thanks again
If it ain't broke, it's Ubuntu
- Elleomea
- Knows their stuff
- Posts: 264
- Joined: Thu Apr 08, 2004 1:58 pm
- Location: Aberystwyth, Wales
Well, as things stand if you switch the units to kilobytes you'll be able to see things during heavy traffic periods; I'll see about making it more customisable later today.
How much ham could a hamster stir, if a hamster could stir ham?
- Elleomea
- Knows their stuff
- Posts: 264
- Joined: Thu Apr 08, 2004 1:58 pm
- Location: Aberystwyth, Wales
I've knocked up a little page at http://linux.mikeasoft.com/gtknettraf.php and sent an e-mail along to the author of NetTraf to let him know.
How much ham could a hamster stir, if a hamster could stir ham?
- Elleomea
- Knows their stuff
- Posts: 264
- Joined: Thu Apr 08, 2004 1:58 pm
- Location: Aberystwyth, Wales
I've almost finished support for multiple machines (mostly just need to rewrite the graph function to support it now), and I've added a display of the total amount of data sent and received from each machine. So I thought it was high time to show off a little more and give you a new screenshot or two to look at
.
Should be fully ready in the next day or two
.
Should be fully ready in the next day or two
How much ham could a hamster stir, if a hamster could stir ham?
25 posts • Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: MSN [Bot] and 1 guest