Kood Morning

Plasma 4 Widgets

Source (required if based on other people's work): Add the source-code for this project on git.opendesktop.org

5
Score 74%
Description:

The idea was to have a plasmoid to show the status of my home network server and in case to start it using wake-on-lan.

The status is evaluated on basis of ping, which is executed every 5 secs. Currently this value is not configurable.

Currently there is also no way to stop the plasmoid from pinging (e.g. screen saver active). This will be necessary to allow power savings to work.

I will add these features as soon as there is some more time.

Please feel free to comment my work.

Merry Christmas!
Last changelog:

8 years ago

0.2.1:
- edit button corrected

0.2:
- ping now async - thx to accumulator
- you can edit a server within the configuration editor

shining

5 years ago

I've posted on this server (http://kde-look.org/content/show.php?content=160132) a fork from the original DeepDiver's applet.
Kool morning requires a dataengine (you find a link) that avoids the hanging of plasma when a monitored computer goes down.
I hope this can be useful.

Report

rfavkdelook

7 years ago

Had some widget sizing problems as well. Not remembering the set size after rebooting.

Solved that problem by moving it into my the panel/tray. There it it behaves correctly (size wise).

Stopped using kood morning however because it makes the kmenu extremely and annoyingly sluggish when my server is down.(only use kood morning to check this one server).

Stopping kood morning solves this problem.

Report

shining

4 years ago

Both of the issues are solved in Kool Morning 0.4, a fork of Kood Morning. You can get it from here: http://kde-apps.org/content/show.php/Kool+Morning?content=160132

Report

shining

7 years ago

hi Deep Diver,
first of all thank you for giving us kood morning. I find it a useful widget and I've been using it for more than a year.
I downloaded the latest version and I realised when a host is offline plasma desktop still hangs for few seconds from time to time.
I wrote a simple C++ plasma service to generate a multithreaded ping when requested by kood morning. The result is what I expected: plasma desktop now runs smoothly. I'd like to share the code with you. Can I send my "patch"?

Report

shining

7 years ago

Sorry! I reloaded the page and the message started again.

Report

shining

7 years ago

hi Deep Diver,
first of all thank you for giving us kood morning. I find it a useful widget and I've been using it for more than a year.
I downloaded the latest version and I realised when a host is offline plasma desktop still hangs for few seconds from time to time.
I wrote a simple C++ plasma service to generate a multithreaded ping when requested by kood morning. The result is what I expected: plasma desktop now runs smoothly. I'd like to share the code with you. Can I send my "patch"?

Report

navara

7 years ago

First I confirm this bug. If server goes down, widget blocks all kde-related apps (including desktop). Only every 10th second, user has a chance to do something.

As author ignores this patch, please share it in some other way. Widget itself is useful, but this bug is cripling it's use.

Report

shining

5 years ago

I found no other way than forking from DeepRiver's code. You can find Kool morning on this server http://kde-look.org/content/show.php/Kood+Morning?content=117378

Report

Wonko

7 years ago

I had some plasma crashes when resizing the plasmoid. I filed a bug report (https://bugs.kde.org/show_bug.cgi?id=259197), but was advised to contact you instead. Done :)

I had two crashes so far, and removed the plasmoid, but now I have put it back to see if it happens again. Tell me if can do more to debug this.

Report

Wonko

7 years ago

This is reproducible. The plasmoid works, I resize it to quite small and put it to where I want it to be. But when I log out and back in again, the size is larger, not sure if it is the original size, I think it's a little less. When I then start resizing it again, plasma will crash after a few seconds.

Report

C

DeepDiver

7 years ago

I'll have a look asap.
But this will not before X-mas!

Just had a quick look at the stack trace and it looks like no python is involved.

This leads me to the assumption, that the issue is within the c++ libs.
But maybe I use some API wrong.

We will see.

THX

Tom

Report

gzu

8 years ago

Hi,

Does this do anything different to the server status plasmoid?

Thanks,

Report

accumulator

8 years ago

.. or use some async method to check for the ping replies.

It's a very nice plasmoid, but with these slowdowns it's also an almost useless plasmoid.

Report

accumulator

8 years ago

I did some checking on the code, and it seems python more or less always crashes when running in a Plasma context.

So I rewrote the ping_async method for you, so it uses nonblocking process calling. Every time the ping_async method is called, it will either

1) start a ping process for that IP
2) query an existing ping process

so calling it on a 5s interval will yield a status update interval of at least 10s

here's the code for ping.py:

Quote:
pingprocs = dict()

def ping_async(ip, result):
"""Pings given ip async"""
if ip in pingprocs:
# ping is running for ip, check process
process = pingprocs[ip]
process.poll()
if process.returncode != None:
# ping finished, submit result
result(ip, process.returncode == 0)
del pingprocs[ip]
else:
process = subprocess.Popen(["/bin/ping","-c","1","%s" % ip],
stdout=open("/dev/null","w"),
stderr=subprocess.STDOUT)
pingprocs[ip] = process


and for main.py:

Quote:
def updateStatus(self):
ping_async(self.ip, self.statusCB)
# end if
# end def updateStatus
def statusCB(self, ip, status):
if status:
self.status = "Online"
else:
self.status = "Offline"

Report

C

DeepDiver

8 years ago

Hi,

thanks alot!
Nice idea!

I'll have a look at it asap.

THX,

Tom

Report

accumulator

8 years ago

Can I boldly throw in a feature request? (I have become a fan after all ;) )

I'd like the aspect-ratio constraint to be removed, and an option to put the name of the host next to the indicator

thanks!

Report

C

DeepDiver

8 years ago

Hi,

I can make this a configurable alternative view.

Agreed?

CU Tom

Report

accumulator

8 years ago

maybe it's best to make them granular options (i.e. checkboxes) and have the view layout adapt to these settings. If you make several views, with fixed settings, it might not become as tweakable as some might like.

example: if you want to option of a label with the button, and you have both a horizontal and a vertical layout, it would result in 4 views, as opposed to 2 options.

Report

klik

8 years ago

Thanks for your great plasmoid.
This is exactly what I'm waiting for.

Please keep on fixing the performance issue and I'll be happy at all.

Many thanks in front
Markus

Report

wtbennington

8 years ago

Tom,

I am currently running Mandriva 2010.1 and I think that Koodmorning is causing drastic performance issues with my system.

For instance, if I minimize one application and then try to maximize anouther one it will take up to 5 seconds for it to display it. I beleive this is caused by Koodmorning because it only happened after I added it and after I removed it the performance went back up.

Any Idea what would cause this or how to fix it?

Report

C

DeepDiver

8 years ago

This is exactly the issue, that I describe in my first (self)-comment.

It is necessary to perform the ping operation in a separate thread.
This is where I have issues at the moment.

Take care,

Tom

Report

wtbennington

8 years ago

Great little program! Does exactly what I need it to do. Any luck on any updates on it?

Report

C

DeepDiver

8 years ago

Good to know you like it!

I was working on a version using thread(s) to ping the server.
But there are issues at the moment using threads in Python+Plasma.

I will re-investigate soon .....

Further feature requests are always welcome.

Take care,

Tom

Report

wtbennington

8 years ago

Tom,

Glad to hear you are working on it. One thought I had was the ability to Edit an existing entry. If you go to create one and need to edit it you have to go back and delete it and add a new one.

William

Report

C

DeepDiver

8 years ago

Accepted!

I'll add this.

THX Tom

Report

8 years ago

0.2.1:
- edit button corrected

0.2:
- ping now async - thx to accumulator
- you can edit a server within the configuration editor

File (click to download) Version Description Packagetype Architecture Downloads Date Filesize DL OCS-Install
Pling
Details
license
version
0.2.1
updated Nov 15 2010
added Dec 20 2009
downloads today
0
page views today 0