Yasp-Scripted (Systemmonitor) v1.0.8a

Plasma 4 Widgets

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

24
7.6
Description:

Yes, Yet another systemmonitor plasmoid.
But still different from the others.
The only useful plasmoid systemmonitor i have found was Yasp. The problem with it was that it was not configurable enough.
So I came up with the idea, that everyone has its own imaginations of what belongs into a systemmonitor and what not. The birth of Yasp-scripted.
The name is similar to Yasp, because I use some modified code from that project.
The biggest advantage is that you can add things to the monitor or remove some, by just changing the script file and reparse it again...) No recompilation or something like that needed...
The scriptfile which comes with this applet is a scriptfile which fits exactly my system. You probably need to change it to fit your system (e.g. if you do not have a wireless lan card, you need to remove the wlan stuff from the script file).

You can send me your script, such that I can upload a whole bunch of scripts, the user could choose of later (maybe with a screenshot to see directly what the script does)

The scripts can be found in the directory yasp_scripts.
The 1st screenshot is systemmonitor_by_mtr.script, the 2nd screenshot is systemmonitor_by_patkoscsaba.script
and the 3rd screenshot is the script collection by duncan
(thx for the scripts).

If you want to align things, you should either use a monospace font, or use a t in the value.

If you are familiar with svg you maybe will create your own svg's for the bar-meter. Send them please to me to have a wider range of look and feel for the system monitor ;)
Last changelog:

8 years ago

1.0.8a - wrong folder prefix ;)

1.0.8 - bug fixed when reparsing (the kde-plasma-handle was deleted, but we should not delete it)

1.0.7 - bug fixed if engine-sensors contains a colon
- Added script by joseph (thx for the script)
- New script by aldo (thx for the script)

1.0.6 - stack keyword added to plotter (thx Chris99 for the patch)
- Script by mtr added (thx for the script)

1.0.5 - fix crash on reparsing in kde-4.5.2 (with 4.5.2 reparsing works again, but 4.5.1 and 4.5.0 have a bug)

1.0.4
- Label preferredSize setting correctly + sizePolicy changed

1.0.3
- meter sizePolicy changed (works now better in KDE-4.5)
- bugfix for KDE-4.5 such that it does not crash on removal

1.0.2
- workaround for problems with KDE-4.5 and meters (min_height parameter added)
- added script by aldo to the package (italian labels)
(- known issue: yasp-scripted crashes on reparsing in kde-4.5. This will be fixed in a later release)

1.0.1 - bug fixed if yasp is closed while parsing the script

1.0: - Reparsing should be more stable

Franksuse64

9 years ago

Hi!

Hey this one is quite close to what I need! I'll give it a try...

Do you know gkrellm? It's not a plasmoid, but that's the one I am forced to use, it is EXTREMELY configurable and shows more than you could imagine. I use things no plasmoid monitor offers, so I hope I can do it with yours.

But if I can't do you have an idea on how we could import gkrellm functions into your monitor? We could talk outside the site so that I can explain what I am looking for.

But I swear, if you can come up with a solution on how to make it as customizable as gkrellm, you will dominate the plasmoid monitor market! lolll


gkrellm uses gtk or gtk2 and has not changed grafx look for years! It doesn't fit at all KDE4, but I still use it, cuz no other can offer as much as gkrellm.

tnx! :)
Frank

Report

C

finkandreas

9 years ago

I am not aware of a information you cannot get by a simple shell command?

However if you want to have it in a reasonable performance then the KDE way is to write a dataEngine (the systemmonitor is such an dataEngine).
If you are interested in writing such an engine, you can contact me by mail (mail adress should be somewhere in the README I think)

Report

Franksuse64

9 years ago

Actually, it's also how things are displayed that is very customizable. For example the Network graphic monitor, you can show the U/D k/s, you can show the total U/D of the day, the total of the month, reset month any day you want, you can split view to show download on top and upload at bottom and you can place the numbers (totals, speed, etc.) anywhere on the network graph section. I don't know if yours can do these details. The network graphic customization is important to me for quick reference and monitoring and also cuz I have limited d/l amount per month that I can watch live.

For CPU graphic monitors, it can show User processes usage vs System processes usage or the total of both, here too you can split view, etc... you can choose to display % and Core Temp besides each core graphic monitor (I have 4 cores, it's useful to have the % and temp of each just besides) and many other things. Of course it can show both CoreTemps and CPUTemp.

I'll play around with your script and see what I can get. :) Maybe it's not too complicated to do a few adjustments.

tnx

Report

Franksuse64

9 years ago

And there is also the disk monitor which displays grafx of the I/O with the read Kb/s and write kb/s. This is also very useful, so if there is a command for that your monitor could do it if we pass it on the command, right?

Report

C

finkandreas

9 years ago

check out the scripts by duncan as a good starting point because it seems that he did most of the stuff you need...

for the disk I/O there is in the systemmonitor dataEngine something. Check out with plasmaengineexplorer what there is at all in the systemmonitor dataEngine.

Report

DuncanKDE

9 years ago

Just what I was going to say, check my scripts.

On the disk I/O, the kde system monitor data engine wasn't able to track md/raid last I checked (it had dummy values that were always zero), and I have md/raid, so I had to make my own script to handle that. The kernel makes the raw totals available in a file (in /proc or /sys IDR which, see the script), but I had to figure out how to track the last value, so I could do a comparison and get the difference between current and last. I used a tmpfile for that. Once I had the mechanism working for that, I was just simpler to use it for all my disk i/o, including the ones the engine supported, so I did.

On the network bandwidth, you could use similar techniques to track running totals, if desired. Also note that if you have iptables/netfilter installed, it can track the running totals over reboots, etc (but of course loses any from the time of the last iptables-save, in the event of a system crash). You could use that mechanism to save the numbers over reboots, and just do the iptables-save without a redirect to file, to grab the numbers for a script, if desired. (My Internet has no monthly/daily bandwidth cap, so I don't need to worry about that.)

For temps and stuff, the sensors command (package lm_sensors, probably a dep of what you're already running tho so likely already installed) gives you text output, which can be scripted. Or, the numbers are normally available in /sys, as well. Again, see my scripts.

I just got my netbook up and running. The acpi command gives me battery info, and again, there's /sys interface data I can use, as well. That's not in the tarball as I didn't have the netbook setup when I sent my scripts and screenshot in. What I sent in was off my main machine.

Report

nicollivier

9 years ago

Hi,

First: thanks a lot for this great job :)
Second: But I've again a bug...
Some informations:
I use Mandriva 2010, kde.4.3.4 i586 on a desktop and a X64 on a laptop.
When I start it, I've a black box with this message :" Waiting for: Eth0Down", something it's with Wlan.
I've must close this box, and open a new.
But when I close it, I've a crash to plasma :(...

Tks Nico

Report

C

finkandreas

9 years ago

fixed in 1.0.1...
Did you ever try to reparse the script, instead of restarting the whole plasmoid?

But why are you guys having such problems on mandriva??? Is something broken with your KDE?
If I for example disable my Wlan card (with rmmod rt61pci) I get the same message as you get (Waiting for: ...), but as soon as I do modprobe rt61pci, yasp-scripted automatically continues to parse the script and everything just works fine...
I can't understand why it does not work for you that way???

Report

nicollivier

9 years ago

Thanks.... Now I've not bug with plasma :)
But I've again the black box :(

I've any problem with kde. I'm not use «cooker».
My wlan connection takes a few seconds to connect, but it's not a problem?!

Report

C

finkandreas

9 years ago

very strange... As I said, yasp-scripted waited infinitely long for a sensor to appear, and if it does not appear, it is very likely to not appear on a yasp restart...
So the most likely thing is, that your sensor itself is broken (i.e. it is a sensor which never will be registered).

Could you post the line with sensor name="Eth0Down" and all lines with use="Eth0Down"

Report

nicollivier

9 years ago

Hi I come back

I solved my bugs :),
I changed my grub, before I've had this option: «.... splash=silent», and now I've this: «.... elevator=deadline ».

And now it's ok,
May be you understand something, me nothing :)

Nico

Report

patkoscsaba

9 years ago

No, we don't have any problem with Mandriva or KDE. Mandriva uses a technology to start your DE (ex. KDE) as soon as possible. So, in many cases, the graphical interface comes up before the network or other services. Those services come up in few seconds after KDE is already loaded. This usually happens on newer computers, which are fast enough to start the graphics faster than the rest of the services.

So, YaSP is loaded before network is up, and it waits indefinitely on eth0. The sensor for Eth0Down is:
sensor name="Eth0Down" type="engine" cmd="systemmonitor:network/interfaces/eth0/receiver/data:value"
The sensor becomes available as soon as there is a network connection, but YaSP can't sense it. If the sensor would not come available, YaSP would fail on a restart of the plasmoid, too. But it doesn't, on second run, it gets the sensor correctly.

Report

C

finkandreas

9 years ago

And that should not happen at all because the KDE systemmonitor engine (I guess this is what you are using for your sensors), is smart enough to register the sensors as soon as your Network connection appears, and Yasp is smart enough to continue as soon as the systemmonitor engine registers the sensor...
That is what wonders me. Why does it not work on Mandriva because it works perfectly fine on my laptop (there is written for 2 secons Waiting for WLan0 and then at some point it continues because the WLan connection was established)
I'm using gentoo and here the WM is also started as soon as possible, so network connections are established after the window manager was started.

Report

Ireyon

9 years ago

Nice system monitor. But one thing does not work - the partition monitors do not do anything on KDE 4.4.

Report

C

finkandreas

9 years ago

Open plasmaengineexplorer and check how the sensors are named in kde-4.4 or check if the sensors give correct values. If the values there are wrong go to bugs.kde.org and tell them

Report

locke87

9 years ago

Hey,

I really like that systemmonitor. For me it replaced my good old conky.
But there is one feature, I really miss. Is there a possible way to autoscale units and graphs like conky does.
E.g. if I want to monitor my network, which has a data rate of about 10 MiB/sec at home, the graph is quite useless, if I am at any other place, where I have not such a fast internet connection.

keep on coding :)
locke

Report

C

finkandreas

9 years ago

if you do not specify min and max the range is calculated automatically by KDE...

Report

DuncanKDE

9 years ago

... which would be fine, if there was some way to see what the scale then was. Knowing it's maxing out the graph doesn't help much if, to use the OP's example, I'm supposed to be getting 10 MiByte/s, but for all I know it's maxing at a MiByte/sec.

Report

C

finkandreas

9 years ago

or, you can edit the source code ;)
hint: line 428 in scriptparser.cpp should be changed to:
p->setShowLabels( true );

Report

locke87

9 years ago

thank you, man!
That's exactly the functionality I was missing :)

Report

patkoscsaba

9 years ago

That's why you can display the exact UP/Down values (see second screenshot).

I will try auto-scale as soon as I get home, I was thinking about this, too.

Report

patkoscsaba

9 years ago

I found a small and annoying bug. If, for some reason, a device I monitor with YaSP is not available at the moment of loading the plasmoid / parsing the script file, it just hangs there. It never stops.

If I right-click on it and select "Repars", than it starts parsing but fails at the first element and waits again indefinitely.

Restarting the plasmoid makes it work again.

For a frequently encountered example, I use Mandriva 2010 and KDE 4.3.4. Mandriva starts the graphical DE as soon as possible, so many times the network adapter is not yet connected when the KDE (and YaSP) is loading. The result is the above mentioned problem.

I would suggest to set a timeout in your script. If the parsing fails, just show an error and try again in a few seconds, so the plasmoid is not blocked waiting for something.

Report

C

finkandreas

9 years ago

I do not know what to do here because:
It will complicate a lot of things if I drop the assumption, that all values are available as soon as I start drawing the plasmoid. That's the reason why I actually wait for all sensors to appear...
And I'm waiting infinitely long for them to appear and check them periodically every 50ms.
So if it does not work now. It will not work either with your suggestion (i.e. setting a timeout to check if it appears later).
I guess it is a KDE bug, why the sensor never appears in the systemmonitor-dataEngine (but this is just a guess, since I've never checked the source code)

So my result: Unfortunately I cannot change things in this plasmoid (except of checking why the reparsing fails directly???)...

Report

patkoscsaba

9 years ago

OK, I understand, but than, if I right-click on it and select Reparse, you should drop all waitings and reparse the script.

I have nothing against you waiting infinitely, but let me reparse my script so I don't have to stop/start/reconfigure/rearrange the plasmoid or restart KDE if a sensor fails.

Report

C

finkandreas

9 years ago

In the new version (1.0) the reparsing should work better...

Report

8 years ago

1.0.8a - wrong folder prefix ;)

1.0.8 - bug fixed when reparsing (the kde-plasma-handle was deleted, but we should not delete it)

1.0.7 - bug fixed if engine-sensors contains a colon
- Added script by joseph (thx for the script)
- New script by aldo (thx for the script)

1.0.6 - stack keyword added to plotter (thx Chris99 for the patch)
- Script by mtr added (thx for the script)

1.0.5 - fix crash on reparsing in kde-4.5.2 (with 4.5.2 reparsing works again, but 4.5.1 and 4.5.0 have a bug)

1.0.4
- Label preferredSize setting correctly + sizePolicy changed

1.0.3
- meter sizePolicy changed (works now better in KDE-4.5)
- bugfix for KDE-4.5 such that it does not crash on removal

1.0.2
- workaround for problems with KDE-4.5 and meters (min_height parameter added)
- added script by aldo to the package (italian labels)
(- known issue: yasp-scripted crashes on reparsing in kde-4.5. This will be fixed in a later release)

1.0.1 - bug fixed if yasp is closed while parsing the script

1.0: - Reparsing should be more stable

12345678910
123
product-maker domryba Apr 16 2015 8 great
product-maker LeifErikson May 29 2013 8 great
product-maker XenoPL Nov 01 2012 8 great
product-maker Sweyn78 Aug 27 2012 8 great
product-maker matafleur Mar 05 2012 8 great
product-maker gerstavros Jan 15 2012 8 great
product-maker Heart Nov 14 2011 8 great
product-maker momonster Jul 02 2011 8 great
product-maker superpepo Jun 18 2011 8 great
product-maker yield65 May 29 2011 8 great
product-maker marcotangaro Mar 24 2011 8 great
product-maker theZest Feb 28 2011 8 great
product-maker bugmenot1234 Feb 27 2011 8 great
product-maker rangerGR Feb 25 2011 8 great
product-maker schleby Feb 14 2011 8 great
product-maker phiga2 Feb 11 2011 3 bad
product-maker srog Feb 01 2011 8 great
product-maker opera1818 Dec 17 2010 8 great
product-maker cialdo99 Nov 18 2010 8 great
product-maker deabru Nov 07 2010 8 great
product-maker schnelle Nov 05 2010 8 great
product-maker Vzlom Oct 27 2010 8 great
product-maker vatsok Oct 21 2010 8 great
product-maker SeaJey Oct 07 2010 8 great
product-maker Count:67 Rating: 7.46

domryba

Apr 16 2015

xrooters

Jul 13 2013

LeifErikson

May 29 2013

XenoPL

Nov 01 2012

despot77

May 28 2012

Fred6681

Jul 02 2011

yield65

May 29 2011

marcotangaro

Mar 24 2011

extra

Nov 09 2010

Contrast

Aug 21 2010

poelzi

Feb 25 2010

hellblade

Feb 16 2010

Franksuse64

Feb 02 2010

DaiVied

Dec 19 2009

nicollivier

Dec 02 2009

Droopy159

Nov 18 2009

SeaJey

Nov 03 2009

Sibob

Nov 03 2009

DuncanKDE

Oct 22 2009

kanutron

Sep 18 2009

t3ddy

Sep 04 2009

Montblanc

Aug 28 2009

NForce

Aug 10 2009

Havoc65

Jul 31 2009
File (click to download) Version Description Downloads Date Filesize DL OCS-Install
Pling
*Needs ocs-url or ocs-store to install things
Details
license
version
1.0.8a
updated Feb 25 2011
added Jul 31 2009
downloads today
0
page views today 8