Service Monitor
KDE Plasma 4 Extensions
Score 88%
Description:

Distribution-independent utility for monitoring/toggling background services (daemons).

Features: show current status of services; start/stop with a single click; placeable on desktop or in dock;
maximum flexibility through shell commands

Installation: plasmapkg -i service-monitor.zip

Submit bugs and feature requests on GitHub: https://github.com/mbleichner/service-monitor/issues

You are welcome to contribute to development, feel free to create a fork on GitHub!

New Features in v2.0:
- Password input dialog now included (no more dependency on external tools like kdesudo)
- Easier management of service definition files (incl. one-click update)
- Hide unavailable services
- Environment variables aren't needed any more ($INITDIR will be guessed, $SUDO has become superfluous)
- Ability to copy existing services as custom services
- Sudo configuration helper (creates snippets for inclusion in /etc/sudoers)
- Three different indicator icon themes
- Option to suppress stdout of start/stop commands
- Report external state changes through KNotify
- Service icons can be placed directly in the panel (without popup)

brucew

2 years ago

The 2.0 link downloads 1.1.3.x
Please advise.

Report

skatox

4 years ago

It's not working on KDE 4.10 :( it crash plasma.

Report

Smokematic

5 years ago

Thank you for this great plasmoid i have been using it for a while and it has been a great experience!

It whould be great if we could use the plasmoid for remote services too (via ssh???) or wake a remote system (WOL).

Tnx again, keep up the good work!

Report

skylord

5 years ago

One of my favorite plasmoids, but since a Python-KDE4 upgrade on SuSE 11.4/KDE 4.8.5 this morning, V2RC2 barfs up with a "RuntimeError: the sip module implements API v9.0 but the PyKDE4.plasma module requires API v8.1" error. Before this upgrade also crashed my plasma desktop with unversioned something errors.

Report

C

mbleichner

5 years ago

Are you still having this issue? Can you give some more precise information?

Report

skylord

5 years ago

The problem went away this morning when I installed an updated Python Bindings for KDE4-package from the SuSE KDE 4.8 builds repository.

Report

C

mbleichner

5 years ago

Glad to hear this. I once had a similar problem with delayed upgrades for python bindings. Was really annoying...

Report

s1300045

5 years ago

This is probably the most useful plasma utility I've come across so far! Keep up the good work!

Report

elric77

5 years ago

This is really a great app! But I don't get a pop up, when I put it in the panel (it just shows the upmost icon and description of the list). What could be the reason for this? I would really appreciate to use it, if this could be solved...

Report

elric77

5 years ago

solved...

Report

C

mbleichner

5 years ago

Sorry for the late answer, I haven't been at home. What was the cause?

Report

grisse

5 years ago

Hi
wollte das script verwenden aber leider funzt es nicht. Habe opensuse 12 und beim starten kommmt die Fehlermeldeung dass es ein Python script brauht. Weist du zufällig welches Paket ich zusätzlich installieren muß ?

danke wäre super denn das Script könnte ich gut brauchen
lg
chris

Report

C

mbleichner

5 years ago

Unter Debian muss "plasma-scriptengine-python" installiert sein, bei suse müsste es dasselbe oder was ähnliches geben. Falls es das nicht war, welche Fehlermeldung bekommst du?

Report

grisse

5 years ago

also als Fehlermeldung kommt bei mir: "Der python-skript Treiber für Service Monitor kann nicht installiert werden"

Jetzt weis ich nicht in welchem Packet der drinnen ist

kannst du mir da weiterhelfen ?

Report

C

mbleichner

5 years ago

Puh, das wird vermutlich schon die Plasma Scriptengine für Python sein. Aber ich weiß nicht, was für ein Paket man da unter SuSE installieren muss. Hast du mal geschaut, ob es ein Paket "plasma-scriptengine-python" gibt?

Report

DavidEdmundson

6 years ago

This is one of the most polished well designed plasmoids I've seen.

You should try and get it into KDE extragear.

Report

rdonato

6 years ago

You should change mysqld job detection: it fails on kde because akonadi uses mysqld for its embedded db. I added a new service for akonadi mysqld job and a new check for running jobs.

<service id="mysql-daemon for kde env" priority="0">
<name>MySQL Database</name>
<description>Database server used by many programs (stopping could be a bad idea)</description>
<installcheck>ls $INITDIR/mysql</installcheck>
<runningcheck>ps fax|grep mysqld|grep "akonadi"|cut -d"?" -f1|grep -v grep</runningcheck>
<startcommand>$SUDO $INITDIR/mysql start</startcommand>
<stopcommand>$SUDO $INITDIR/mysql stop</stopcommand>
</service>

<service id="mysql-daemon" priority="0">
<name>MySQL Database</name>
<description>Database server used by many programs (stopping could be a bad idea)</description>
<installcheck>ls $INITDIR/mysql</installcheck>
<runningcheck>ps fax|grep mysqld|grep -v "akonadi"|cut -d"?" -f1|grep -v grep</runningcheck>
<startcommand>$SUDO $INITDIR/mysql start</startcommand>
<stopcommand>$SUDO $INITDIR/mysql stop</stopcommand>
</service>

Report

rdonato

6 years ago

Humm I was wrong..you are expecting an exit code from the check...I fixed it adding a custom shell script for mysql process (put it in your path):


#!/bin/sh
SERVICE=$1
if [ "$SERVICE" = "akonadi" ]
then
if ps fax | grep -v grep | grep "mysqld" | grep $SERVICE > /dev/null
then
echo "$SERVICE service running, bye bye"
exit 0
else
echo "$SERVICE is not running"
exit 1
fi
else
if ps fax | grep -v grep | grep "mysqld" | grep -v "akonadi" > /dev/null
then
echo "Mysqld service running, bye bye"
exit 0
else
echo "$SERVICE is not running"
exit 1
fi
fi


And daemons-common.xml:


<service id="mysql-daemon for kde env" priority="0">
<name>MySQL Database for KDE Env</name>
<description>Database server used by kde (stopping could be a bad idea)</description>
<installcheck>ls $INITDIR/mysql</installcheck>
<runningcheck>pidofmysql.sh akonadi</runningcheck>
<startcommand>$SUDO $INITDIR/mysql start</startcommand>
<stopcommand>$SUDO $INITDIR/mysql stop</stopcommand>
</service>

<service id="mysql-daemon" priority="0">
<name>MySQL Database</name>
<description>Database server</description>
<installcheck>ls $INITDIR/mysql</installcheck>
<runningcheck>pidofmysql.sh mysql</runningcheck>
<startcommand>$SUDO $INITDIR/mysql start</startcommand>
<stopcommand>$SUDO $INITDIR/mysql stop</stopcommand>
</service>

Report

C

mbleichner

6 years ago

Thank you for the suggestions!

Actually, it seems you were thinking a bit too complicated. The following commands seem to work fine:

show non-akonadi process:
ps ax | grep "/usr/sbin/mysqld" | grep -v grep| grep -v akonadi

show akonadi process:
ps ax | grep "/usr/sbin/mysqld" | grep -v grep| grep akonadi

Can you check if they work correctly? Then I'll include them into the official sources.

Report

rdonato

6 years ago

Hi,

humm...I think it fails because you are going to expect a return code from the test....that's why i used a custom shell script to check mysql instances.

Report

C

mbleichner

6 years ago

The return code is irrelevant if the commands are syntactically correct and produce no errors. So for the check to succeed it must only produce non-empty output.

Report

rdonato

6 years ago

May be I am wrong..but you are using "proc.exitCode()" and your original check calls pidof which returns an exit code. Running ps returns everytime 0. That's why your check fails...from pidof man:

EXIT STATUS
0 At least one program was found with the requested name.

1 No program was found with the requested name.

Report

C

mbleichner

6 years ago

That may be right, but pidof also produces no output if the given process cannot be found.
For a check to fail, it is sufficient to return non-zero exit code OR zero output.
For a check to succeed, it must return exit code zero AND non-empty output.

Besides, on second thought it makes little to define a service for the akonadi MySQL process, because there is no shutdown possibility other than killing the server or akonadi itself. For akonadi there is already a service defined, and killing the MySQL process right under Akonadi's nose seems a bad idea to me.

Report

Epimetheus11

6 years ago

Occasionally I want to turn the screen off while leaving the laptop/desktop running in the background. This example service makes it a single button click:

DPMS
Turn the screen off/on

Install check:

which xset
Running check:

xset q | grep "DPMS is Enabled"
Start command:

xset dpms force on
Stop command:

xset dpms force off

Report

C

mbleichner

6 years ago

Thank you very much. I have included the definitions in the tools & settings file.

Report

product-maker Smokematic Nov 07 2012

product-maker Phrosztbyte Sep 30 2012

product-maker fernandosavio May 09 2012

product-maker jrjohnstone Apr 05 2012

product-maker nowsy Mar 12 2012

product-maker uomonero Feb 03 2012

product-maker s1300045 Jan 15 2012

product-maker AndreyL Jan 15 2012

product-maker Mossad Dec 02 2011

product-maker hgmtnd Nov 10 2011

product-maker losty Nov 02 2011

product-maker vitoubien Nov 02 2011

product-maker jackhunter2 Oct 09 2011

product-maker redneck666 Oct 03 2011

product-maker tamra Aug 22 2011

product-maker DarthMedicus Aug 11 2011

product-maker bill1950 Jul 29 2011

product-maker vitex Jun 23 2011

product-maker ivan2k May 17 2011

product-maker caidoberco May 07 2011

product-maker Brutus180 May 04 2011

product-maker Rickfer May 03 2011

product-maker RyanMcCoskrie Apr 18 2011

product-maker JanGerritJose Mar 29 2011

product-maker Thero Mar 28 2011

product-maker asteorid Mar 03 2011

product-maker Viras Jan 14 2011

product-maker gravy Oct 21 2010

product-maker Freol Sep 25 2010

product-maker janet Sep 25 2010

product-maker Desdenova88 Sep 24 2010

product-maker deabru Sep 23 2010

product-maker 10 83

File (click to download) Version Description Filetype Packagetype License Downloads Date Filesize OCS-Install DL
Details
version
2.0
updated Nov 01 2011
added May 23 2010
downloads today
0
page views today 0