summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xinstaller/opengnsys_installer.sh4
-rwxr-xr-xinstaller/opengnsys_update.sh4
-rwxr-xr-xrepoman/bin/opengnsys.cron8
3 files changed, 8 insertions, 8 deletions
diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh
index 031a4d37..ed77c3aa 100755
--- a/installer/opengnsys_installer.sh
+++ b/installer/opengnsys_installer.sh
@@ -140,7 +140,7 @@ OSCODENAME=$(lsb_release -cs 2>/dev/null)
# Configuración según la distribución GNU/Linux.
case "$OSDISTRIB" in
Ubuntu|Debian|LinuxMint)
- DEPENDENCIES=( subversion apache2 php5 php5-ldap libapache2-mod-php5 mysql-server php5-mysql isc-dhcp-server bittorrent tftp-hpa tftpd-hpa syslinux xinetd build-essential g++-multilib libmysqlclient15-dev wget doxygen graphviz bittornado ctorrent samba rsync unzip netpipes debootstrap schroot squashfs-tools btrfs-tools )
+ DEPENDENCIES=( subversion apache2 php5 php5-ldap libapache2-mod-php5 mysql-server php5-mysql isc-dhcp-server bittorrent tftp-hpa tftpd-hpa syslinux xinetd build-essential g++-multilib libmysqlclient15-dev wget doxygen graphviz bittornado ctorrent samba rsync unzip netpipes debootstrap schroot squashfs-tools btrfs-tools top )
UPDATEPKGLIST="apt-get update"
INSTALLPKG="apt-get -y install --force-yes"
CHECKPKG="dpkg -s \$package 2>/dev/null | grep Status | grep -qw install"
@@ -176,7 +176,7 @@ case "$OSDISTRIB" in
TFTPCFGDIR=/var/lib/tftpboot
;;
Fedora|CentOS)
- DEPENDENCIES=( subversion httpd mod_ssl php php-ldap mysql-server mysql-devel mysql-devel.i686 php-mysql dhcp tftp-server tftp syslinux xinetd binutils gcc gcc-c++ glibc-devel glibc-devel.i686 glibc-static glibc-static.i686 libstdc++ libstdc++.i686 libstdc++-static.i686 libstdc++-devel.i686 make wget doxygen graphviz ctorrent samba rsync unzip debootstrap schroot squashfs-tools btrfs-progs )
+ DEPENDENCIES=( subversion httpd mod_ssl php php-ldap mysql-server mysql-devel mysql-devel.i686 php-mysql dhcp tftp-server tftp syslinux xinetd binutils gcc gcc-c++ glibc-devel glibc-devel.i686 glibc-static glibc-static.i686 libstdc++ libstdc++.i686 libstdc++-static.i686 libstdc++-devel.i686 make wget doxygen graphviz ctorrent samba rsync unzip debootstrap schroot squashfs-tools btrfs-progs top )
INSTALLEXTRADEPS=( 'rpm -Uv ftp://ftp.altlinux.org/pub/distributions/ALTLinux/5.1/branch/files/i586/RPMS/netpipes-4.2-alt1.i586.rpm'
'pushd /tmp; wget http://download.bittornado.com/download/BitTornado-0.3.18.tar.gz; tar xvzf BitTornado-0.3.18.tar.gz; cd BitTornado-CVS; python setup.py install; ln -fs btlaunchmany.py /usr/bin/btlaunchmany; ln -fs bttrack.py /usr/bin/bttrack; popd' )
if [ "$OSDISTRIB" == "CentOS" ]; then
diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh
index e68e23df..05f2a9e8 100755
--- a/installer/opengnsys_update.sh
+++ b/installer/opengnsys_update.sh
@@ -97,7 +97,7 @@ OSDISTRIB=$(lsb_release -is 2>/dev/null)
# Configuración según la distribución de Linux.
case "$OSDISTRIB" in
Ubuntu|Debian|LinuxMint)
- DEPENDENCIES=( php5-ldap xinetd rsync btrfs-tools )
+ DEPENDENCIES=( php5-ldap xinetd rsync btrfs-tools top )
UPDATEPKGLIST="apt-get update"
INSTALLPKGS="apt-get -y install --force-yes"
CHECKPKG="dpkg -s \$package 2>/dev/null | grep -q \"Status: install ok\""
@@ -111,7 +111,7 @@ case "$OSDISTRIB" in
APACHEGROUP="www-data"
;;
Fedora|CentOS)
- DEPENDENCIES=( php-ldap xinetd rsync btrfs-progs )
+ DEPENDENCIES=( php-ldap xinetd rsync btrfs-progs top )
INSTALLPKGS="yum install -y"
CHECKPKG="rpm -q --quiet \$package"
if which systemctl &>/dev/null; then
diff --git a/repoman/bin/opengnsys.cron b/repoman/bin/opengnsys.cron
index 3e704579..4584aef7 100755
--- a/repoman/bin/opengnsys.cron
+++ b/repoman/bin/opengnsys.cron
@@ -17,20 +17,20 @@ typeset -i OGCPU # % uso CPU
if [ "$RUN_OGADMSERVER" == "yes" ]; then
# Parar procesos ogAdmServer si consume más de 90% de CPU.
OGPID=$(pgrep ogAdmServer)
- OGCPU=$(printf "%d" $(ps -p $OGPID -o %cpu= 2>/dev/null) 2>/dev/null)
+ 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 %T AVISO: ogAdmServer (PID=$OGPID) parado, consumiendo $OGCPU % de CPU" >> $LOGDIR/ogAdmServer.log
+ 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 %T ERROR: El servicio ogAdmServer estaba caido, se reinicia" >> $LOGDIR/ogAdmServer.log
+ date +"%d/%m/%Y %H:%M ERROR: El servicio ogAdmServer estaba caido, se reinicia" >> $LOGDIR/ogAdmServer.log
/etc/init.d/opengnsys restart
fi
fi
# Reiniciar servicios si es repositorio y proceso ogAdmRepo está caído.
if [ "$RUN_OGADMREPO" == "yes" -a $(pgrep ogAdmRepo | wc -w) == 0 ]; then
- date +"%d/%m/%Y %T ERROR: El servicio ogAdmRepo estaba caido, se reinicia" >> $LOGDIR/ogAdmRepo.log
+ date +"%d/%m/%Y %H:%M ERROR: El servicio ogAdmRepo estaba caido, se reinicia" >> $LOGDIR/ogAdmRepo.log
/etc/init.d/opengnsys restart
fi