
Kood Morning
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
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!
10 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
10 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
7 years ago
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
9 years ago
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
7 years ago
Report
shining
9 years ago
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
9 years ago
Report
shining
9 years ago
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
9 years ago
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
7 years ago
Report
Wonko
10 years ago
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
10 years ago
Report
DeepDiver
10 years ago
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
10 years ago
Does this do anything different to the server status plasmoid?
Thanks,
Report
accumulator
10 years ago
It's a very nice plasmoid, but with these slowdowns it's also an almost useless plasmoid.
Report
accumulator
10 years ago
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
DeepDiver
10 years ago
thanks alot!
Nice idea!
I'll have a look at it asap.
THX,
Tom
Report
accumulator
10 years ago
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
DeepDiver
10 years ago
I can make this a configurable alternative view.
Agreed?
CU Tom
Report
accumulator
10 years ago
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
10 years ago
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
10 years ago
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
DeepDiver
10 years ago
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
10 years ago
Report
DeepDiver
10 years ago
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
10 years ago
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
DeepDiver
10 years ago
I'll add this.
THX Tom
Report