Yasp-Scripted (Systemmonitor) v1.0.8a
KDE4 Extensions
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:

6 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

N7DR

1 year ago

Executing
[HN:build] cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --localprefix` ../
as described in the INSTALL file produces:

----

-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at /usr/share/cmake-2.8/Modules/FindKDE4.cmake:98 (MESSAGE):
ERROR: cmake/modules/FindKDE4Internal.cmake not found in
/home/n7dr/.kde/share/apps;/usr/share/kde4/apps
Call Stack (most recent call first):
CMakeLists.txt:6 (find_package)


-- Configuring incomplete, errors occurred!
[HN:build]

----

What do I need to do to fix this?

Report

bkant

3 years ago

A big thank you for this little gem. I've been working with Unix and Linux here and there since the 1980s but have just recently switched to Linux completely as my main system. Was in need for some widget style system monitor and stumbled upon this project. Sort of challenging but also rewarding! Now I have managed to write a script which suits all my needs atm; the plasmoid as a vertical bar to the right now nearly fills the whole available vertical space ;-)
Thanks as well to the users who provided their scripts. I have seen that Duncan had provided some external scripts where even conditonal statements are processed.
In my script I also have used a conditional statement but inside the main script. I wanted to have a decent notification about which additional internal drives, network drives (NAS) and which USB drives are currently connected and mounted. For internal drives I use this sensor line:
sensor name ="mount.win" type="program" cmd="ls -C /mnt/windows" interval="10000"
But in case of USB drives such a sensor would block the whole plasmoid from starting when no drive is mounted (the mount point would appear just as a link instead of a directory). So I tried this et voila, it works right out of the box:
sensor name ="mount.media" type="program" cmd="if test -d /mnt/media; then ls -C /mnt/media; fi" interval="10000"
This commandlet just looks if something is mounted and only when it is it actually fetches the names of the mounted drives. Simple but effective ...

Report

rnc

4 years ago

Works great on Fedora 18 with KDE 4.9.5. My configuration script is here https://github.com/rnc/kde-scripts/blob/master/.yasp.script

Report

Montblanc

4 years ago

Just wanted to let you know that YASP Scripted has been on my desktop, same position, same script, since the very first versions. :)

Report

SicoBulo

4 years ago

How may I get this thing to show me the fonts that I want to? I want this thing to show me a text with a italic and bold font, but the sintax readme is not so explicit and if I put the values of my text as the README.syntax says, it doesn't work, it is like the only thing it recognizes is the point size value...

Report

SicoBulo

4 years ago

I found the solution, I found that the README.syntax says bullshit, you have to pass all the arguments in the script if you want a styled text, example if you want an oblique bolded text, the README says that if you pass in the script ex.; text format="some crap" font="Crappy Sans,7,-1,5,75" should work but not, you need to pass to the script; text format="some crap" font="Crappy Sans,7,-1,5,75,0,0,0,0"; you need to pass all the arguments even if you won't use it in order to have an styled text, otherwise yasp scripted won't recognize nothing if you pass another argument than the size, you need to pass all. Or at least it works this way for me.

Report

SicoBulo

5 years ago

I installed it with no problem but I cannot see it in "add widget" panel, Thus I can't add it.

I'm using Ubuntu 12.04 which provides KDE 4.8.3 as default.

Report

cialdo99

5 years ago

Hi, try to type this command: kbuildsycoca4; then try to restart plasma-desktop

Report

SicoBulo

5 years ago

Hello! I did that many times, but it doesn't work. Thanks for your answer :).

Report

SicoBulo

5 years ago

I installed it with no problem but I cannot see it in "add widget" panel, Thus I can't add it.

I'm using Ubuntu 12.04 which provides KDE 4.8.3 as default.

Report

bermudahonk

5 years ago

Hello,
I'm using Debian unstable. Since KDE 4.5 I don't see any meters. They first show up when I resize the widget, but they only reach a sane size when i resize it insanely big. I know this has to do with changes made to kde. Is there any way to fix this in yasp? min_height is not helping.

Regards.

Report

yield65

6 years ago

I was modifying the script so that is show another wlan device, I'm on a laptop with an internal wireless as wlan0 but I use 2 other devices, wlan1 is USB the other ath0 is pcmcia.
My problem is with the system monitor sensors for download/upload speed. If I turn on the laptop with 1 or 2 of those cards disconnected then I just see a message that says it's waiting for one of those sensors and nothing else shows up.
Is there a way to bypass this so If YASP doesn't find the sensor it can keep working with a null or 0 value?

The other thing is that I changed the use of iwconfig to this:
cmd=%/usr/sbin/iwgetid wlan0 |awk -F ":" '{print $2}'%
So that it shows the ESSID of the currently connected network on opensuse (11.4) because it wasn't working with iwconfig and you can use it easier if you have more than one wireless interface.

Thnx and best regards.

Report

DuncanKDE

5 years ago

What I'd do in such a case is find a command line command that reports the info you need, then use it for your sensor instead of the system monitor engine. (I don't really know enough about wireless to be of help with the specific CLI command, unfortunately.) You can then script it to report the desired value if the net is up, or return some reasonable default, say 0, if it's down, or report the error but truncate it (using cut) if it's too long, thus making yasp-scripted too wide when there's an error. I did that for a couple sensors that under some circumstances would report really long errors here. The command line gives you far more control, but OTOH, isn't as efficient as there's quite a bit more overhead to starting a process than there is in simply reporting some number spit out by an existing process, so will use more CPU.

Report

yield65

5 years ago

Thank you for your reply, I ended with something like this:
sensor name="WLan1Ip" type="program" cmd=%/sbin/ifconfig wlan1 2>/dev/null | grep 'inet addr' | cut -d':' -f 2 | cut -d' ' -f1%
sensor name="Wlan1BitRate" type="program" cmd=%/usr/sbin/iwconfig wlan1 2>/dev/null | grep 'Bit' | cut -d'=' -f2 | cut -d' ' -f1-2%
sensor name="Wlan1Quality" type="program" cmd=%/usr/sbin/iwconfig wlan1 2>/dev/null | grep 'Link' | cut -d = -f2 | cut -d ' ' -f1%
sensor name="Wlan1Essid" type="program" cmd=%/usr/sbin/iwgetid wlan1 |awk -F ":" '{print $2}'%

And an interval of "3000". For the speed meter I finally used mrtg as daemon.

Report

bollo

6 years ago

Anyone else having issues getting this plasmoid to save its size?

Good system monitor though.

Report

DuncanKDE

6 years ago

The yasp-scripted plasmoid has a minimum size, controlled by the displayed content of the script you set it to run, but no maximum size -- plasma itself controls that. Change what you have the script set to display to change the minimum size.

If placed in a panel larger than the minimum size, plasma will expand one plasmoid dimension (vertical in a horizontal panel, horizontal in a vertical panel) to size of the panel, the other will remain at plasmoid minimum.

If placed on the desktop, plasma will let you drag it larger than the minimum size, but not smaller.

You mention problems getting it to save its size, but saw what size you're talking about. If it's the minimum size, as I said, you control that yourself based on what you have the script setup to display, the font and font size you set, the height of the plotters, etc. The minimum width of the plasmoid is normally the required width of the widest item. As such, I control it here by setting a fixed-width font (this helps in getting things to line up well, too) and adding spaces or abbreviating labels until the longest line is the size I want. (If some lines can be variable, say due to numbers that can be 1-3 digits, I make sure another line is long enough to allow space for the three digits of the variable lines so the size doesn't keep changing on me every time it updates.) The minimum height is simply the set height of every displayed line, text or graphical, of the script.

If the size you're setting is larger than the minimum as explained above, then it's not really the plasmoid setting the size, but plasma itself. If there's a problem with that, it'd therefore be a plasma bug, not something the plasmoid itself controls.

And to answer your question, no, I'm not having such a problem, but if there were a plasma bug in that regard I'd not notice it because I configure the minimum size via the script and always use that, of course with the exception of the dimension that's always set by the panel size for plasmoids in a panel.

Report

bollo

6 years ago

Thank you for you for your comprehensive answers.

I am trying to reduce the plasmoids minimum width.
I would like the monitor to be a slim coloumn placed at the edge of my screen.

I will try to get control over the mimimum width as suggested by adjusting the script.

I guess the statusbars that display the network transfer rates force the plasmoid to widen everytime it gets restarted.

I will post a how-to if I am successfull

Kudos for your work. Enjoy your weekend.

Report

finkandreas

6 years ago

It depends on what you mean by "saving" the plasmoid dimensions.
If you place the plasmoid on your desktop and restart KDE, then it is KDE which will save the size.
However if you close the plasmoid, and add it again on the desktop, then yasp-scripted will have its minimum size by default.

So what exactly do you try to achieve? Over restarts the plasmoid size should not change (and it's KDE's job to ensure this)

Report

siavash8

6 years ago

For me, only one of the scripts works: the one from joseph. The rest are stuck at Waiting for: HomeUsed or Waiting for: CPU0 Temp. lm-sensors is configured correctly. What should I do?

Report

DuncanKDE

6 years ago

> For me, only one of the scripts works

That's because the scripts are all example scripts. They aren't really designed to be run as-is, unless you have exactly the same hardware setup as the person who authored the script. The idea is to customize them to your own hardware, partitions, etc.

There's typically two ways to get the data from your system into the script to be displayed -- two different types of "sensors" (the third listed in the README.syntax file is simply a math sensor that manipulates data already available from other sensors).

The first (second in the readme) type of sensor uses kde's existing plasma:dataengine, most frequently the systemmonitor engine. But what that engine exposes for use depends on what it can find in your system.

The second (first in the readme) type of sensor often requires a bit more work, but is *FAR* more flexible, because it simply takes the STDOUT of a (normally CLI mode command or command-pipe, making it available thru the sensor, for display via one of the text or graphic display elements yasp-scripted makes available for use by your yasp-script.

Thus, any output you can get to appear either on the command-line or via kde's systemmonitor engine, you can get yasp-scripted to display (obviously assuming generating that output doesn't require interactivity -- that it can be scripted, of course).

What this normally involves for lm_sensors output is running the command in the shell to see what the output you're looking for looks like, then piping that result to grep/sed/cut/awk/head/tail/etc to format it the way you need for the yasp-scripted sensor. (Typically, this will involve grepping a specific line of the output, then cutting/seding/grepping that down to just the number, either for formatted text/graphic display directly, or to be plugged into yasp-scripted's math functions to for instance turn KB into MB or GB, or to divide a value by the total possible to get a percentage for graphic.)

The shipped scripts do this already, but by definition, they measure statistics on the specific hardware that the author had. You can either modify the examples for your hardware, or you can use them as illustrations when creating your own.

In this way, yasp-scripted is very powerful, because it can be made to display whatever stats your system has available, *BUT*, it's also not a simple install and run plasmoid. It's designed for the power user, the user already familiar enough with his system and the command line, to know both what sort of information he wants, and how to use the traditional UNIX tools and shell scripting to get it in the form she wants. People who don't have the required skills will therefore find the this plasmoid pretty much worthless, because they won't know how to get it to display what they want it to display, not even to the point of modifying the existing scripts for their own system.

Report

siavash8

6 years ago

Thank you very much for the quick and complete response. I'll try to make it work. Thank you.

Report

tovarishStepanov

6 years ago

Could you please help? How to fix this "waiting for: RootUsed" (after update to kde 4.6.2)?

Report

tovarishStepanov

6 years ago

Sorry, forgot to search on the page.

Report

Droopy159

6 years ago

Well, it used to work fine with kde 4.6.1. I've just upgrade to kde 4.6.2 nad when reparsing i've got the message "Wainting for : RootUsed" and stay frozen...
Anybody else ??? What's wrong with kde 4.6.2 ???

Report

finkandreas

6 years ago

I think KDE-4.6.2 screwed up something. Watching the sensors with plasmaengineexplorer there is no systemmonitor:partitions/root/usedspace:value. The best you can do: Write a bugreport to KDE (and change your script in the meanwhile to not show used disk space, until it's fixed in kde)

Report

6 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

File (click to download) Version Description Filetype Packagetype License Downloads Date Filesize OCS-Install
Score 83%
83.00 Likes
17 Dislikes
Details
version
1.0.8a
updated Feb 25 2011
added Jul 31 2009
downloads
page views 4885