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

5
Become a Fan
7.5

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:

0.2.1:
- edit button corrected

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


Ratings & Comments

26 Comments

shining

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.

rfavkdelook

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.

shining

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

shining

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"?

shining

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

shining

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"?

navara

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.

shining

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

Wonko

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.

Wonko

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.

DeepDiver

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

gzu

Hi, Does this do anything different to the server status plasmoid? Thanks,

accumulator

.. 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.

accumulator

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"

DeepDiver

Hi, thanks alot! Nice idea! I'll have a look at it asap. THX, Tom

accumulator

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!

DeepDiver

Hi, I can make this a configurable alternative view. Agreed? CU Tom

accumulator

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.

klik

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

wtbennington

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?

DeepDiver

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

wtbennington

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

DeepDiver

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

wtbennington

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

DeepDiver

Accepted! I'll add this. THX Tom

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

Other Plasma 4 Extensions:

Icon Tasks deb build
N00bun2
last update date: 14 years ago

Score 4.3

Prayer Times Plasmoid
riyad
last update date: 13 years ago

Score 5.2

KPrayertime4 Islamic Prayer Times
ahaq
last update date: 15 years ago

Score 4.4

Hostinfo
mgraesslin
last update date: 13 years ago

Score 4.7

Monitor QuadCore Russian
kuchumovn
last update date: 16 years ago

Score 5.0

blaKjaK
werevire
last update date: 15 years ago

Score 5.0