diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2020-04-06 12:35:26 +0200 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2020-04-07 12:12:20 +0200 |
commit | d9b24135c7af8e0b099ceb71b3b355e963344cf8 (patch) | |
tree | 1d1f41a6fa33a3982832ce91de4531736449f4fb /repoman/bin/opengnsys.cron | |
parent | 4d7fd58c8542c8db5309b3ba69c7bdeb2c82878b (diff) |
#927 Remove opengnsys.cron script
This commit removes the opengnsys cron script that checks if the
ogAdmServer is running or using too much CPU and restarts the process.
Now that the ogAdmServer is more stable this script is not needed. Also,
without this script we are going to know better when the ogAdmServer is
having a problem and get better reports.
In case you observe a crash in ogAdmServer, please, run it under valgrind:
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=/tmp/ogadmserver-valgrind-out.log /opt/opengnsys/sbin/ogAdmServer -f /opt/opengnsys/etc/ogAdmServer.cfg
And post your 'ogadmserver-valgrind-out.log' file to the mailing list.
This patch changes the installer and the update scripts too. They do
not configure opengnsys.cron anymore. The update script search and
remove the deprecated files as well.
Diffstat (limited to 'repoman/bin/opengnsys.cron')
-rwxr-xr-x | repoman/bin/opengnsys.cron | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/repoman/bin/opengnsys.cron b/repoman/bin/opengnsys.cron deleted file mode 100755 index 32c6f493..00000000 --- a/repoman/bin/opengnsys.cron +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -# opengnsys.cron - Script para comprobar si los servicios de OpenGnsys están levantados -# e iniciarlos automáticamente. -# Nota: este script debe ser lanzado por Cron cada minuto. - - -# Variables. -OPENGNSYS=${OPENGNSYS:-"/opt/opengnsys"} -LOGDIR="$OPENGNSYS/log" -DEFAULTFILE=/etc/default/opengnsys -typeset -i OGCPU # % uso CPU - -# Comprobar servicios que deben estar activos. -[ -f $DEFAULTFILE ] && source $DEFAULTFILE - -# Salir si no se debe ejecutar la revisión en el cron. -[ "$RUN_CRONJOB" == "no" ] && exit - -# Comprobar si está activo el servidor OpenGnsys. -if [ "$RUN_OGADMSERVER" == "yes" ]; then - # Parar procesos ogAdmServer si consume más de 90% de CPU. - OGPID=$(pgrep ogAdmServer) - OGCPU=$(top -b -n 1 -p $OGPID 2>/dev/null | awk -v p=$OGPID '$1~p {printf "%d",$9}') - if [ $OGCPU -gt 90 ]; then - date +"%d/%m/%Y %H:%M AVISO: ogAdmServer (PID=$OGPID) parado, consumiendo $OGCPU % de CPU" >> $LOGDIR/ogAdmServer.log - kill -9 $OGPID - fi - # Reiniciar servicios si proceso ogAdmServer está caído. - if ! pgrep ogAdmServer >/dev/null; then - date +"%d/%m/%Y %H:%M ERROR: El servicio ogAdmServer estaba caido, se reinicia" >> $LOGDIR/ogAdmServer.log - /etc/init.d/opengnsys restart - fi -fi - |