NEC Express5800/320Lb Linux Guide de l'utilisateur Page 61

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 97
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 60
61
<For processes that fork other child processes (e.g. “squid”)>
On the FT server, you could create a script that takes in command line
arguments start and stop. This script should also have the logic of starting,
stopping and monitoring the process by based on its Process ID (“pid”), and
should terminate if the process terminates.
You could refer to this sample script (/opt/nec/clusterpro/monitors/squidexec)
customized for the squid process:
#!/bin/bash
case "$1" in
start)
/etc/init.d/squid start
sleep 3
processid=`cat /var/run/squid.pid 2> /dev/null &`
while [ 1 ]
do
status=`ps --pid $processid --no-headers 2> /dev/null
&`
if [ "$status" != "" ]
then
sleep 1
else
exit 1
fi
done
;;
stop)
/etc/init.d/squid stop
;;
esac
Vue de la page 60
1 2 ... 56 57 58 59 60 61 62 63 64 65 66 ... 96 97

Commentaires sur ces manuels

Pas de commentaire