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

Temet

9 years ago

Hello!
Thanks for your plasmoid, I use it as my system monitor since I installed KDE 4 (2 weeks ago).
It just works fine!

I didn't see this feature, so I emit the idea and you can implement it if you like it :D
I would like to be able to display some parts only under a certain condition.

For example, see the occupation on my external HD, only if it's power on. Something like:

if $(mount | grep /mnt/HDEXT)
blablabla to display partition stats
endif

Anyway, thanks for this plasmoid ;)

Report

C

finkandreas

9 years ago

sounds interesting, but I won't implement it, since the system behind yasp-scripted was not thought for that, and therefore it requires a bit more work to do sth like that...
If you or anyone else needs this feature feel free to implement it.

Report

vazoline

9 years ago

I've been looking for something like this for a while. Very nice job!

Report

DuncanKDE

9 years ago

I'm using yasp-scripted as a more-flexible substitute for the missing "application formerly known as ksysguard" kicker applet in kde4. In kde3 I had a LOT of stuff graphed, so I missed that applet quite a bit until I found yasp-scripted and got my sets of scripts setup.

So now I have about eight scripts, designed to be lined up across a 400 px high (max height, here) panel, graphing and current numbers for CPU activity (four cores, separate user/system/nice/wait/total, %), memory (separate app, buffer, cache, total-used, swap-used, MB), load&fans (1/5/15 load average, 4 fans, RPM), temps (four core temps, five system temps, C), disk activity (read and write graphed separately for four separate disks, MB), Eth0 net activity (separate Rx/Tx, four graphs 8X factor, no wifi but it'd not be hard to adapt), and time&top (time locally and UTC, date, last repository sync, last boot date, day and week of year, Unix time in seconds updated 1/min, CPU% top five, Mem% top five).

I run them eight-across, lined up on a horizontal panel. It'd make a great screenshot for this kde-look page.

Additionally I created a gentoo ebuild, which could be posted.

The question is, what's the best way to get it to you? I suppose I could send the scripts and ebuild via the contact thing, or here, but I'm not sure whether they'd get line-wrap mangled. And the screen-shot...

I think you can click my name on the message and send me a private mail with your email address if you like. Either that, or if you have someplace I could upload them. Or I could imagebin/pastebin them, I suppose, if you'd get around to fetching them soon enough. Your call.

Report

C

finkandreas

9 years ago

Thanks for the scripts. I've packaged them now with the main tarball...

Report

rangerGR

9 years ago

Is it possible to use clickable icons like SuperKaramba?

Report

C

finkandreas

9 years ago

There is nothing impossible, but the question is what you want to do with that...
D'you want to start some program, or do you want get more information when clicking on the icon (like a small box appearing with some information)

Report

rangerGR

9 years ago

To start a program but mainly it will make possible to execute some qdbus commands.
For example, control amarok, ktorrent and every KDE program ;)

Report

C

finkandreas

9 years ago

Ok, finally I found some time to implement this. So have a look at version 0.99, there are some new features.
Shortly said for the keyword value you can add "icon_click", "key_click" and "value_click"
For the keyword "text" you can add "click"
And a completely new keyword was introduced, namely "icons". The icons keyword adds a horizontal stack of icons where each icon can have it's own click event (look in README.syntax)

Report

rangerGR

9 years ago

Excellent!
Works like a charm

Thanks!

Report

ronanjardim

9 years ago

Hi,

I have started to see a little problem in your plasmoid.
When I start KDE (logout / login), for some reason, the plasmoid says that it couldn't find the sensors of plasma (type="engine").
It starts to work very well when I re-parse the script. So I think it is something related to initialization.

Thanks,
Ronan.

Report

C

finkandreas

9 years ago

Does this only happen when you logout and login again, or does this also happen on the first startup?

Report

ronanjardim

9 years ago

It also happens on start-up.
But it isn't deterministic. It happens just a few times and not every initialization of KDE. I'm trying to find some behavior to characterize better this problem.

Thanks,
Ronan.

Report

C

finkandreas

9 years ago

Ok, then I guess I know what the problem is:
The plasmoid tries to first setup all sensors, and if one sensor could not be setup it stops the processing and gives a message like: This sensor could not be...
The problem is, that the plasma-sensors (type="engine") are asynchronious, i.e. the do not give directly a response but more or less when they have the data.
Yasp-scripted is waiting some time until it gets all data, but sometimes your pc is just too busy to get the data in the period yasp is waiting for and then you get this message.
You could try to replace this line:
scriptparser.cpp:489 while ( m_pYasp->DependenciesFulfilled(Dependencies) == false && nCount++ < 200 )
by the line
while ( m_pYasp->DependenciesFulfilled(Dependencies) == false && nCount++ < 500 )

this lets yasp waiting even longer for the sensors to be registered. I hope this fixes the problem (it fails on startup because kde is loading a lot of stuff then, and it takes some time to settle down, but for me 200 was always enough)

Report

Droopy159

9 years ago

I've the same problem but I don't see where I've to modify that. There's no such a line in .yasp.script (I just use systemmonitor.script to create my own .yasp.script)

Report

DuncanKDE

9 years ago

He's talking about modifying the yasp-scripted plasmoid source code itself, then recompiling it, as can be seen by the reference to the *.cpp file.

FWIW I've not tried it, but may, as I have the same issues here.

I have an idea that might work in a script, however, but haven't tried it yet. If the script is parsed in order as I suspect, it's possible a single-shot sensor at the top, type program, that simply called sleep, for a user-configurable number of seconds, might just do it. This "delay" sensor wouldn't have to be hooked up to an output, simply fired one-shot. If it works, that would be enough to give plasma and the rest of the system time to settle down, before the script started running normally.

I'll have to try it and post back...

Report

Droopy159

9 years ago

Thanks for the update and both contributions. It works perfectly. It's now for me the perfect system monitor I'm looking for a while.

Report

C

finkandreas

9 years ago

Ok, I've looked once again in my source code and voila, I've seen that the parsing itself happens in a seperate thread, whereas the execution happens in the main thread (which of course is a stupid idea, and will probably be changed)
And finally I understood why plasma needs to be single threaded, since paintings can only happen in the main thread in qt, and thus all plasmoids need to run in the main thread...

But unlike duncan has mentioned that the waiting should be very careful, the waiting can be very long since it happens in a second thread and doesn't bother the main thread... So increasing the number as mentioned in the workaround above should work...

Report

C

finkandreas

9 years ago

Sorry, I do not have much time for fixing the problem, but actually a sleep sensor should work, since the sensor parsing is done in another thread, i.e. it shouldn't freeze the main thread. Unfortunately I changed from KDE to openbox, such that testing is not possible atm... So I really do not know, why a sleep sensor is blocking plasma completely. And why plasma is single threaded I do not understand either, since this would mean that any plasmoid can block your whole desktop, which would be quite stupid.

Report

DuncanKDE

9 years ago

Well... /THAT/ didn't work! Sleep behaved as it should, but with all of plasma apparently being single-threaded, the delay for the one script not only caused it to fail, but all the others to fail as well! Plus, the entire plasma desktop (both desktop and panels) was frozen for the length of the sleep, or until yasp-scripted timed it out and returned the usual sensor can't be registered error after about 10 seconds, if the sleep was 10s or longer.

Which reveals the other side of the coin. Yasp-scripted must be careful with its timeouts, because they freeze the entire plasma desktop during the wait! The same is true for users creating scripts. Anything they call that takes time to process... will apparently freeze the entire desktop until the processing is done, or until the timeout, whichever is first.

The ultimate fix would therefore be a new version of yasp-scripted, that (1) either shortens the timeout again or makes it a script or sensor configurable setting, and (2) introduces a new optional sensor parameter, at least for type engine and probably for type program as well, that sets the value to return on timeout. If this value isn't set, it'd return the current warning, "breaking" the script as it currently does, as that's useful for troubleshooting purposes in case of typos and the like.

(The one change I'd make to the warning, however, would be to wrap it at some arbitrary width, say 25 characters, as doubling or more the expected width of the plasmoid isn't particularly practical, especially when you have multiple yasp-scripted plasmoids lined up side-by-side on a panel, already filling the available width.)

Report

CaptainHero

9 years ago

I provided a PKGBUILD for Archlinux.

I like how this plasmoid is kind of similar to conky.

Report

C

finkandreas

9 years ago

Thanks for the PKGBUILD. I linked to it in the download section, such that everyone can see that there exists an ARCH package.

Report

t3ddy

9 years ago

I haven't understood how to use the new features (newline, tabulator and icon) :)
Can you give me an example?
Thanks

Report

C

finkandreas

9 years ago

Hi,
ok, once for you:
value key="key1\nkey2" use="USE1" use="USE2" format="$1\n$1\t$2" icon="kopete" iconsize="32"

This will give you a line where on the left is first the kopete icon with a size of 32x32, then right to the icon are two lines:
key1
key2
and right to these two lines is
$1
$1(here is the tabulator)$2


Hm, I hope you got it ;)
The icons can be found in /usr/share/icons/YOURTHEME (usually oxygen)
or just give a full path.

Report

t3ddy

9 years ago

I've made a line like this:
value key="Core0\nCore1" use="Core0Temp" use="Cpu0Load" use="Core1Temp" use="Cpu1Load" format="$1\t$2\n$3\t$4" icon="cpu" iconsize="32"
but it doesn't work :(
I can't understand what I'm mistaking

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 9 excellent
product-maker LeifErikson May 29 2013 9 excellent
product-maker XenoPL Nov 01 2012 9 excellent
product-maker Sweyn78 Aug 27 2012 9 excellent
product-maker matafleur Mar 05 2012 9 excellent
product-maker gerstavros Jan 15 2012 9 excellent
product-maker Heart Nov 14 2011 9 excellent
product-maker momonster Jul 02 2011 9 excellent
product-maker superpepo Jun 18 2011 9 excellent
product-maker yield65 May 29 2011 9 excellent
product-maker marcotangaro Mar 24 2011 9 excellent
product-maker theZest Feb 28 2011 9 excellent
product-maker bugmenot1234 Feb 27 2011 9 excellent
product-maker rangerGR Feb 25 2011 9 excellent
product-maker schleby Feb 14 2011 9 excellent
product-maker phiga2 Feb 11 2011 3 bad
product-maker srog Feb 01 2011 9 excellent
product-maker opera1818 Dec 17 2010 9 excellent
product-maker cialdo99 Nov 18 2010 9 excellent
product-maker deabru Nov 07 2010 9 excellent
product-maker schnelle Nov 05 2010 9 excellent
product-maker Vzlom Oct 27 2010 9 excellent
product-maker vatsok Oct 21 2010 9 excellent
product-maker SeaJey Oct 07 2010 9 excellent
product-maker Count: 4 Rating: 5.0

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
1
page views today 30