NEC Express5800/320Lb Linux Guida Utente Pagina 61

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 97
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 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
Vedere la pagina 60
1 2 ... 56 57 58 59 60 61 62 63 64 65 66 ... 96 97

Commenti su questo manuale

Nessun commento