
Service Monitor
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
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
4 years ago
Please advise.
Report
skatox
6 years ago
Report
Smokematic
7 years ago
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
7 years ago
Report
mbleichner
7 years ago
Report
skylord
7 years ago
Report
mbleichner
7 years ago
Report
s1300045
7 years ago
Report
elric77
7 years ago
Report
elric77
7 years ago
Report
mbleichner
7 years ago
Report
grisse
8 years ago
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
mbleichner
8 years ago
Report
grisse
8 years ago
Jetzt weis ich nicht in welchem Packet der drinnen ist
kannst du mir da weiterhelfen ?
Report
mbleichner
8 years ago
Report
DavidEdmundson
8 years ago
You should try and get it into KDE extragear.
Report
rdonato
8 years ago
<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
8 years ago
#!/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
mbleichner
8 years ago
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
8 years ago
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
mbleichner
8 years ago
Report
rdonato
8 years ago
EXIT STATUS
0 At least one program was found with the requested name.
1 No program was found with the requested name.
Report
mbleichner
8 years ago
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
8 years ago
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
mbleichner
8 years ago
Report