NEC Express5800/320Lb Linux Betriebsanweisung Seite 61

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 97
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 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
Seitenansicht 60
1 2 ... 56 57 58 59 60 61 62 63 64 65 66 ... 96 97

Kommentare zu diesen Handbüchern

Keine Kommentare