NEC Express5800/320Lb Linux Guía de usuario Pagina 61

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 97
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de 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
Vista de pagina 60
1 2 ... 56 57 58 59 60 61 62 63 64 65 66 ... 96 97

Comentarios a estos manuales

Sin comentarios