Difference between revisions of "Projects/Nepomuk/ManagingNepomukProcesses"

Jump to: navigation, search
(Added useful commands)
(Marked this version for translation)
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
This page contains some useful commands for managing the different Nepomuk processes
+
<languages />
 +
<translate>
  
= Restarting Nepomuk =
+
<!--T:1-->
 +
{{Info|1=This page contains some useful commands for managing the different Nepomuk processes}}
 +
 
 +
== Restarting Nepomuk == <!--T:2-->
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
$ qdbus org.kde.NepomukServer /nepomukserver quit
 
$ qdbus org.kde.NepomukServer /nepomukserver quit
Line 8: Line 12:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
= Restarting any service =
+
== Restarting any service == <!--T:3-->
 
If you need to restart any particular service -
 
If you need to restart any particular service -
  
 +
<!--T:4-->
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
$ qdbus org.kde.nepomuk.services.$SERVICE /servicecontrol shutdown
 
$ qdbus org.kde.nepomuk.services.$SERVICE /servicecontrol shutdown
Line 18: Line 23:
  
  
 +
<!--T:5-->
 
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 == <!--T:6-->
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
  
 +
<!--T:17-->
 +
# THis function is iused to find the PID of the various nepomuk processes
 +
function ps-nepomuk-fast() {
 +
  echo $(pgrep -l -u $USER  '(nepomukserver|nepomukservicestub|nepomukindexer|virtuoso-t)')
 +
}
 +
 +
<!--T:7-->
 
#This function restarts the Nepomuk server
 
#This function restarts the Nepomuk server
 
function nepomuk-restart() {
 
function nepomuk-restart() {
 
     nepomuk-quit
 
     nepomuk-quit
  
     ps -A | grep nepomukserver --silent  
+
     <!--T:8-->
 +
ps -A | grep nepomukserver --silent  
 
     while [ $? -eq 0 ]
 
     while [ $? -eq 0 ]
 
     do
 
     do
Line 39: Line 53:
 
}
 
}
  
 +
<!--T:9-->
 
function nepomuk-quit() {
 
function nepomuk-quit() {
 
     qdbus org.kde.NepomukServer /nepomukserver quit
 
     qdbus org.kde.NepomukServer /nepomukserver quit
     return $?
+
     echo $?
 
}
 
}
  
  
 +
<!--T:10-->
 
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 $?
+
     echo $?
 
}
 
}
 
function nepomuk-service-restart() {
 
function nepomuk-service-restart() {
     SERVICE=$1
+
     SERVICE=
 
     nepomuk-service-quit $SERVICE  
 
     nepomuk-service-quit $SERVICE  
  
     ps-nepomuk-fast | grep --silent $SERVICE
+
     <!--T:11-->
 +
ps-nepomuk-fast | grep --silent $SERVICE
 
     while [ $? -eq 0 ]
 
     while [ $? -eq 0 ]
 
     do
 
     do
Line 61: Line 78:
 
     done
 
     done
  
     nepomukservicestub $SERVICE &
+
     <!--T:12-->
 +
nepomukservicestub $SERVICE &
 
}
 
}
  
 +
<!--T:13-->
 
#
 
#
 
# Useful aliases to control Nepomuk and its services
 
# Useful aliases to control Nepomuk and its services
Line 71: Line 90:
 
alias nepomuk-storage-quit='nepomuk-service-quit "nepomukstorage"'
 
alias nepomuk-storage-quit='nepomuk-service-quit "nepomukstorage"'
  
 +
<!--T:14-->
 
alias nepomuk-indexer-restart='nepomuk-service-restart "nepomukfileindexer"'
 
alias nepomuk-indexer-restart='nepomuk-service-restart "nepomukfileindexer"'
 
alias nepomuk-filewatch-restart='nepomuk-service-restart "nepomukfilewatch"'
 
alias nepomuk-filewatch-restart='nepomuk-service-restart "nepomukfilewatch"'
 
alias nepomuk-storage-restart='nepomuk-service-restart "nepomukstorage"'
 
alias nepomuk-storage-restart='nepomuk-service-restart "nepomukstorage"'
  
 +
<!--T:15-->
 
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>
 +
 +
<!--T:16-->
 +
[[Category:Documentation]]
 +
[[Category:Development]]
 +
[[Category:Tutorials]]
 +
</translate>

Latest revision as of 19:23, 7 April 2013

Other languages:English 100%
Dialog-information.png
 
Information
This page contains some useful commands for managing the different Nepomuk processes


[edit] Restarting Nepomuk

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

[edit] 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.

[edit] Useful commands

# THis function is iused to find the PID of the various nepomuk processes
function ps-nepomuk-fast() {
  echo $(pgrep -l -u $USER  '(nepomukserver|nepomukservicestub|nepomukindexer|virtuoso-t)')
}
 
#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
    echo $?
}
 
 
function nepomuk-service-quit() {
    SERVICE=
    qdbus org.kde.nepomuk.services.$SERVICE /servicecontrol shutdown
    echo $?
}
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"

This page was last modified on 7 April 2013, at 19:23. This page has been accessed 4,056 times. Content is available under Creative Commons License SA 3.0 as well as the GNU Free Documentation License 1.2.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal