Aero AIO: netstat plugin

Karamba & Superkaramba

Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

0
Become a Fan
5.0

Description:
A plugin for Aero AIO that lists all processes connecting out of your computer

REQUIREMENTS: >= Aero AIO 0.9.1
>= Python 2.4

USAGE:
- Install the .aiz plugin via the Aero AIO config dialog
- The first column is the number of processes with the same name
- The second column is the port at which one of these processes is connecting out
- The third column is the name of the processes
- The fourth column is the IP address to which one of these processes is connecting
- You can adjust the update interval and font size in the config dialog. You can also ask the theme to use sudo to get a list of all processes, not just yours. You must add the appropriate permissions to /etc/sudoers (see config dialog)
- You can also ask the theme to not show processes connecting to localhost via the config dialog
Last changelog:

ver 2.0.5
- Fixed a bug in the regexp

ver 2.0.4
- Use Aero AIO 0.9.1 API

ver 2.0.3
- Small change to the regexp to make it more robust. Fixes bug reported by jayenell

ver 2.0.2
- Fixed a bug in the reg-exps. I had assumed that process names consisted only of alpha-numeric characters. KDE uglification adds the period to some names. Changed to match on non space characters (\S)

ver 2.0.1
- Moved to the .aiz Aero AIO plugin format
ver 2.0.0
- Added optional display of IP addresses
- Added support for sudo to see all processes
- Moved the netstat output parsing code into the python script itself (should make for faster execution)

ver 1.0.1
- Added error handling code, should make error reporting easier for users


Ratings & Comments

16 Comments

LinuxRocks

Hello, I added the correct line in /etc/sudoers file, but it is not working. I tried the cmd line in the script and added sudo -S to it and it returns my connections like it should on the command line, but the plugin is blank. Any why to fix this? Thanks!!! Joe

kovidgoyal

Does it work without sudo accesss? Can you run SK in a terminal and post the error output.

LinuxRocks

When I run it from the command line, I get a whole lot of these: Traceback (most recent call last): File "/home/jgiles/.aero_aio/netstat_aio.py", line 119, in update karamba.changeText(widget, self.data, self.readData()) File "/home/jgiles/.aero_aio/netstat_aio.py", line 80, in readData res = self.pretty_pat.sub(self.prettyString, res) # Call self.prettyString for every match File "/home/jgiles/.aero_aio/netstat_aio.py", line 108, in prettyString count = self.rpad(str(self.processCounter[match.group(2)]), self.fields[2]) KeyError: '0' Also, with sudo enabled, I get connections UNTIL I try to connect from a remote box to my box. As an example, if I log into KDE, and start my mail client, I can see IMAP listing in the plugin. Also, if I ssh to my server, I see that as well. Now, if I ssh from another box to the box I am on running superkaramba, then the netstat plugin just goes blank. Everything is ok if I disable SUDO access. HOWEVER, I don't see some traffic that I would like to see. Thanks!!! Joe

kovidgoyal

Should be fixed in 2.0.5

jayenell

Using SK 0.39, Python 2.4.3 and AERO AIO 0.8e This seems like a great plugin, but it doesn not show anything. I'm using the latest version and I restarted SK allready. I also saw there is no .sh-script in the scripts directory, but if I understand your changelogcorrectly it should not be there anymore, so that's ok. This is the output from the commandline: Traceback (most recent call last): File "/home/jayenell/.aero_aio/netstat_aio.py", line 111, in update karamba.changeText(widget, self.data, self.readData()) File "/home/jayenell/.aero_aio/netstat_aio.py", line 72, in readData res = self.pretty_pat.sub(self.prettyString, res) # Call self.prettyString for every match File "/home/jayenell/.aero_aio/netstat_aio.py", line 100, in prettyString count = self.rpad(str(self.processCounter[match.group(2)]), self.fields[2]) KeyError: '0'

kovidgoyal

Hmm...looks like something in your process list is causing a problem. Can you add the following to ~/.aero_aio/netstat_aio.py Above the line res = self.pretty_pat.sub(self.prettyString, res) # Call self.prettyString for every match add print "Result: ", res Then post the output from running the command. If its a lot, you can email it to me: kovid at theory dot caltech dot edu

pantaray

just like the ps-plugin: very clever idea, great implementation, easy handling and useful - great!

kovidgoyal

Thanks. For both ps and this, I've tried to keep it as clean and simple as possible.

Superstoned

this is both usefull and cool! great job!

kovidgoyal

Thanks...it's good to be appreciated

TanisInGentoo

I have a problem here: this is the output I get: Traceback (most recent call last): File "/home/tanis/Downloads/Karamba/Aero-AIO/aero_aio.py", line 276, in widgetUpdated page.update(widget) AttributeError: 'NoneType' object has no attribute 'update' How can i solve it? Thanks a lot!!

kovidgoyal

I need the error from the netstat_aio.py file to debug it. Start superkaramba like so superkaramba > log 2>&1 Click the netstat icon, if the error occurs, killall superkaramba Post the output of grep -A10 netstat log Thanks, Kovid.

kovidgoyal

Also could you run the netstat.sh file in the scripts directory and post the output

TanisInGentoo

Forget it... It seems my fault. I reloaded the whole sk and redownloaded Aero-aio and now it works great. Thanks a lot!

stormrider1

Well what can I add? Ur theme is the lighter and well done...........another welcomed plug.

kovidgoyal

Thanks...I aim to please Kovid.

Pling
0 Affiliates
Details
license
version 2.0.5
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 3

More Karamba & Superkaramba from kovidgoyal:

SKopete
kovidgoyal
last update date: 18 years ago

Score 5.0

ps: Aero AIO plugin
kovidgoyal
last update date: 19 years ago

Score 5.0

Aero AIO: cpu/mem plugin mod
kovidgoyal
last update date: 19 years ago

Score 5.0

SKaz
kovidgoyal
last update date: 19 years ago

Score 5.0

Aero AIO: Kmail based mail notification
kovidgoyal
last update date: 19 years ago

Score 5.0

Aero AIO mods for clock and system info
kovidgoyal
last update date: 19 years ago

Score 5.0

Other Karamba & Superkaramba:

Evolution Task Theme (for Karamba)
L0rclA5CII
last update date: 22 years ago

Score 5.0

Karambaqua
manor
last update date: 22 years ago

Score 5.0

Karamba Print Queue Monitor
Praxxus
last update date: 22 years ago

Score 5.0

The DarkGirl wallpaper and Karamba theme
xray
last update date: 22 years ago

Score 5.0

TecnoBar for Karamba
ZIOlele
last update date: 22 years ago

Score 5.0

Karamba Ink Level Monitor
Praxxus
last update date: 22 years ago

Score 5.0