Projects/Nepomuk/ManagingNepomukProcesses: Difference between revisions

From KDE TechBase
(Added useful commands)
(Prepare for translation)
Line 1: Line 1:
This page contains some useful commands for managing the different Nepomuk processes
<languages />
<translate>


= Restarting Nepomuk =
{{Info|1=This page contains some useful commands for managing the different Nepomuk processes}}
 
== Restarting Nepomuk ==
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
$ qdbus org.kde.NepomukServer /nepomukserver quit
$ qdbus org.kde.NepomukServer /nepomukserver quit
Line 8: Line 11:
</syntaxhighlight>
</syntaxhighlight>


= Restarting any service =
== Restarting any service ==
If you need to restart any particular service -
If you need to restart any particular service -


Line 20: Line 23:
Just killing the service won't work, cause the 'nepomukserver' automatically restarts crashed services.
Just killing the service won't work, cause the 'nepomukserver' automatically restarts crashed services.


= Useful commands =
== Useful commands ==
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">


Line 46: Line 49:


function nepomuk-service-quit() {
function nepomuk-service-quit() {
     SERVICE=$1
     SERVICE=
     qdbus org.kde.nepomuk.services.$SERVICE /servicecontrol shutdown
     qdbus org.kde.nepomuk.services.$SERVICE /servicecontrol shutdown
     return $?
     return $?
}
}
function nepomuk-service-restart() {
function nepomuk-service-restart() {
     SERVICE=$1
     SERVICE=
     nepomuk-service-quit $SERVICE  
     nepomuk-service-quit $SERVICE  


Line 77: Line 80:
alias nepomukcmd="sopranocmd --socket `kde4-config --path socket`nepomuk-socket --model main --nrl"
alias nepomukcmd="sopranocmd --socket `kde4-config --path socket`nepomuk-socket --model main --nrl"
</syntaxhighlight>
</syntaxhighlight>
[[Category:Documentation]]
[[Category:Development]]
[[Category:Tutorials]]
</translate>

Revision as of 10:12, 14 December 2012


Information
This page contains some useful commands for managing the different Nepomuk processes


Restarting Nepomuk

$ qdbus org.kde.NepomukServer /nepomukserver quit
wait for it to quit
$ nepomukserver

Restarting any service

If you need to restart any particular service -

$ qdbus org.kde.nepomuk.services.$SERVICE /servicecontrol shutdown
wait for it to quit
$ nepomukservicestub $SERVICE


Just killing the service won't work, cause the 'nepomukserver' automatically restarts crashed services.

Useful commands

#This function restarts the Nepomuk server
function nepomuk-restart() {
    nepomuk-quit

    ps -A | grep nepomukserver --silent 
    while [ $? -eq 0 ]
    do
		sleep 0.5
        ps -A | grep nepomukserver --silent
    done
    cd $KDEDIR
    echo "Starting Nepomuk Server ..."
    nepomukserver
    cd $OLDPWD
}

function nepomuk-quit() {
    qdbus org.kde.NepomukServer /nepomukserver quit
    return $?
}


function nepomuk-service-quit() {
    SERVICE=
    qdbus org.kde.nepomuk.services.$SERVICE /servicecontrol shutdown
    return $?
}
function nepomuk-service-restart() {
    SERVICE=
    nepomuk-service-quit $SERVICE 

    ps-nepomuk-fast | grep --silent $SERVICE
    while [ $? -eq 0 ]
    do
        sleep 0.25
        ps-nepomuk-fast | grep --silent $SERVICE
    done

    nepomukservicestub $SERVICE &
}

#
# Useful aliases to control Nepomuk and its services
#
alias nepomuk-indexer-quit='nepomuk-service-quit "nepomukfileindexer"'
alias nepomuk-filewatch-quit='nepomuk-service-quit "nepomukfilewatch"'
alias nepomuk-storage-quit='nepomuk-service-quit "nepomukstorage"'

alias nepomuk-indexer-restart='nepomuk-service-restart "nepomukfileindexer"'
alias nepomuk-filewatch-restart='nepomuk-service-restart "nepomukfilewatch"'
alias nepomuk-storage-restart='nepomuk-service-restart "nepomukstorage"'

alias nepomukcmd="sopranocmd --socket `kde4-config --path socket`nepomuk-socket --model main --nrl"