Log In | Get Help   
Home My Page Projects Code Snippets Project Openings BonFIRE VCOC Demonstration Kit
Summary Activity SCM Files Wiki
[bonfiredemokit] Annotation of /virt-cluster/killproc.sh
[bonfiredemokit] / virt-cluster / killproc.sh Repository:
ViewVC logotype

Annotation of /virt-cluster/killproc.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 14 - (view) (download) (as text)

1 : agomez 10 #!/bin/bash
2 :     #
3 :     # BonFIRE Virtual Clusters on Federated Clouds Demonstration Kit
4 :     #
5 :     # Copyright (c) Fundacion Centro Tecnologico de Supercomputacion de Galicia 2012
6 :     #
7 : agomez 14 # License Apache Software
8 : agomez 10 #
9 :     # The research leading to these results has received funding from
10 :     # the European Community's Seventh Framework Programme (FP7/2007-2013)
11 :     # under agreement number 257386
12 :     #
13 :     # This software is provided with ABSOLUTELY NO WARRANTY
14 :     #
15 :     LOG="/var/log/killproc.log"
16 :     touch $LOG
17 :     while [[ True ]]
18 :     do
19 :     echo "-------" >> $LOG
20 :     ps x | grep "python /mnt/lib/configureServer.py" | grep -v "grep" >> $LOG
21 :     PID=`ps x | grep "python /mnt/lib/configureServer.py" | grep -v "grep" | awk {'print $1'}`
22 :     if [[ $PID != "" ]]
23 :     then
24 :     echo "Trying to kill $PID" >> $LOG
25 :     kill -9 $PID
26 :     echo "Killed" >> $LOG
27 :     exit
28 :     else
29 :     echo "Not found, sleeping" >> $LOG
30 :     sleep 5
31 :     fi
32 :     done

root@forge.cesga.es
ViewVC Help
Powered by ViewVC 1.0.0  

Powered By FusionForge