From fd347d4ab8f8bd371bd5550567b267fb955031a8 Mon Sep 17 00:00:00 2001 From: mattf Date: Wed, 11 Oct 2006 19:32:06 +0000 Subject: [PATCH] removal of old depricated ADMIN_keepalive scripts git-svn-id: svn://192.168.202.10@349 3d104415-ff17-0410-8863-d5cf3c621b8a --- .../trunk/bin/ADMIN_keepalive_AST_VDadapt.pl | 138 ---------- .../bin/ADMIN_keepalive_AST_VDautodial.pl | 140 ---------- .../ADMIN_keepalive_AST_VDremote_agents.pl | 143 ---------- .../bin/ADMIN_keepalive_AST_send_listen.pl | 251 ------------------ .../trunk/bin/ADMIN_keepalive_AST_update.pl | 141 ---------- 5 files changed, 813 deletions(-) delete mode 100644 agc_2-X/trunk/bin/ADMIN_keepalive_AST_VDadapt.pl delete mode 100644 agc_2-X/trunk/bin/ADMIN_keepalive_AST_VDautodial.pl delete mode 100644 agc_2-X/trunk/bin/ADMIN_keepalive_AST_VDremote_agents.pl delete mode 100644 agc_2-X/trunk/bin/ADMIN_keepalive_AST_send_listen.pl delete mode 100644 agc_2-X/trunk/bin/ADMIN_keepalive_AST_update.pl diff --git a/agc_2-X/trunk/bin/ADMIN_keepalive_AST_VDadapt.pl b/agc_2-X/trunk/bin/ADMIN_keepalive_AST_VDadapt.pl deleted file mode 100644 index 254c1d41..00000000 --- a/agc_2-X/trunk/bin/ADMIN_keepalive_AST_VDadapt.pl +++ /dev/null @@ -1,138 +0,0 @@ -#!/usr/bin/perl -# -# ADMIN_keepalive_AST_VDadapt.pl version 0.1 -# -# designed to keep the AST_update processes aline and check every minute -# -# Copyright (C) 2006 Matt Florell LICENSE: GPLv2 -# -# -# 60828-1151 - first build -# - -$DB=0; # Debug flag -$MT[0]=''; $MT[1]=''; -@psline=@MT; - -### begin parsing run-time options ### -if (length($ARGV[0])>1) -{ - $i=0; - while ($#ARGV >= $i) - { - $args = "$args $ARGV[$i]"; - $i++; - } - - if ($args =~ /--help/i) - { - print "allowed run time options:\n [-t] = test\n [-debug] = verbose debug messages\n[-debugX] = Extra-verbose debug messages\n\n"; - } - else - { - if ($args =~ /-debug/i) - { - $DB=1; # Debug flag - } - if ($args =~ /--debugX/i) - { - $DBX=1; - print "\n----- SUPER-DUPER DEBUGGING -----\n\n"; - } - if ($args =~ /-t/i) - { - $TEST=1; - $T=1; - } - } -} -else -{ -# print "no command line options set\n"; -} -### end parsing run-time options ### - - -# default path to astguiclient configuration file: -$PATHconf = '/etc/astguiclient.conf'; - -open(conf, "$PATHconf") || die "can't open $PATHconf: $!\n"; -@conf = ; -close(conf); -$i=0; -foreach(@conf) - { - $line = $conf[$i]; - $line =~ s/ |>|\n|\r|\t|\#.*|;.*//gi; - if ( ($line =~ /^PATHhome/) && ($CLIhome < 1) ) - {$PATHhome = $line; $PATHhome =~ s/.*=//gi;} - $i++; - } - -$REGhome = $PATHhome; -$REGhome =~ s/\//\\\//gi; - -#@psoutput = `ps -f -C AST_update --no-headers`; -#@psoutput = `ps -f -C AST_updat* --no-headers`; -#@psoutput = `/bin/ps -f --no-headers -A`; -@psoutput = `/bin/ps -o "%p %a" --no-headers -A`; - -$running_VDAD = 0; - -$i=0; -foreach (@psoutput) -{ - chomp($psoutput[$i]); -if ($DBX) {print "$i|$psoutput[$i]| \n";} -@psline = split(/\/usr\/bin\/perl /,$psoutput[$i]); - -if ($psline[1] =~ /$REGhome\/AST_VDadapt\.pl/) - { - $running_VDAD++; - if ($DB) {print "VDAD RUNNING: |$psline[1]|\n";} - } - -$i++; -} - - -if (!$running_VDAD) -{ -# print "double check that VDAD is not running\n"; - - sleep(4); - -#@psoutput = `ps -f -C AST_update --no-headers`; -#@psoutput = `ps -f -C AST_updat* --no-headers`; -#@psoutput = `/bin/ps -f --no-headers -A`; -@psoutput = `/bin/ps -o "%p %a" --no-headers -A`; -$i=0; -foreach (@psoutput2) - { - chomp($psoutput2[$i]); - if ($DBX) {print "$i|$psoutput[$i]| \n";} - @psline = split(/\/usr\/bin\/perl /,$psoutput2[$i]); - - if ($psline[1] =~ /$REGhome\/AST_VDadapt\.pl/) - { - $running_VDAD++; - if ($DB) {print "VDAD RUNNING: |$psline[1]|\n";} - } - - $i++; - } - -if (!$running_VDAD) - { - if ($DB) {print "starting AST_VDadapt...\n";} - # add a '-L' to the command below to activate logging - `/usr/bin/screen -d -m -S ASTVDadapt $PATHhome/AST_VDadapt.pl --debug`; - } -} - - - - - if ($DB) {print "DONE\n";} - -exit; diff --git a/agc_2-X/trunk/bin/ADMIN_keepalive_AST_VDautodial.pl b/agc_2-X/trunk/bin/ADMIN_keepalive_AST_VDautodial.pl deleted file mode 100644 index 4ceeccf0..00000000 --- a/agc_2-X/trunk/bin/ADMIN_keepalive_AST_VDautodial.pl +++ /dev/null @@ -1,140 +0,0 @@ -#!/usr/bin/perl -# -# ADMIN_keepalive_AST_VDauto_dial.pl version 0.4 -# -# designed to keep the AST_update processes aline and check every minute -# -# Copyright (C) 2006 Matt Florell LICENSE: GPLv2 -# -# -# 50810-1452 - removed '-L' flag for screen logging of output (optimization) -# 50823-1454 - Added commandline debug options with debug printouts -# 60807-1315 - changed to use /etc/astguiclient.conf for settings -# - -$DB=0; # Debug flag -$MT[0]=''; $MT[1]=''; -@psline=@MT; - -### begin parsing run-time options ### -if (length($ARGV[0])>1) -{ - $i=0; - while ($#ARGV >= $i) - { - $args = "$args $ARGV[$i]"; - $i++; - } - - if ($args =~ /--help/i) - { - print "allowed run time options:\n [-t] = test\n [-debug] = verbose debug messages\n[-debugX] = Extra-verbose debug messages\n\n"; - } - else - { - if ($args =~ /-debug/i) - { - $DB=1; # Debug flag - } - if ($args =~ /--debugX/i) - { - $DBX=1; - print "\n----- SUPER-DUPER DEBUGGING -----\n\n"; - } - if ($args =~ /-t/i) - { - $TEST=1; - $T=1; - } - } -} -else -{ -# print "no command line options set\n"; -} -### end parsing run-time options ### - - -# default path to astguiclient configuration file: -$PATHconf = '/etc/astguiclient.conf'; - -open(conf, "$PATHconf") || die "can't open $PATHconf: $!\n"; -@conf = ; -close(conf); -$i=0; -foreach(@conf) - { - $line = $conf[$i]; - $line =~ s/ |>|\n|\r|\t|\#.*|;.*//gi; - if ( ($line =~ /^PATHhome/) && ($CLIhome < 1) ) - {$PATHhome = $line; $PATHhome =~ s/.*=//gi;} - $i++; - } - -$REGhome = $PATHhome; -$REGhome =~ s/\//\\\//gi; - -#@psoutput = `ps -f -C AST_update --no-headers`; -#@psoutput = `ps -f -C AST_updat* --no-headers`; -#@psoutput = `/bin/ps -f --no-headers -A`; -@psoutput = `/bin/ps -o "%p %a" --no-headers -A`; - -$running_VDAD = 0; - -$i=0; -foreach (@psoutput) -{ - chomp($psoutput[$i]); -if ($DBX) {print "$i|$psoutput[$i]| \n";} -@psline = split(/\/usr\/bin\/perl /,$psoutput[$i]); - -if ($psline[1] =~ /$REGhome\/AST_VDauto_dial\.pl/) - { - $running_VDAD++; - if ($DB) {print "VDAD RUNNING: |$psline[1]|\n";} - } - -$i++; -} - - -if (!$running_VDAD) -{ -# print "double check that VDAD is not running\n"; - - sleep(4); - -#@psoutput = `ps -f -C AST_update --no-headers`; -#@psoutput = `ps -f -C AST_updat* --no-headers`; -#@psoutput = `/bin/ps -f --no-headers -A`; -@psoutput = `/bin/ps -o "%p %a" --no-headers -A`; -$i=0; -foreach (@psoutput2) - { - chomp($psoutput2[$i]); - if ($DBX) {print "$i|$psoutput[$i]| \n";} - @psline = split(/\/usr\/bin\/perl /,$psoutput2[$i]); - - if ($psline[1] =~ /$REGhome\/AST_VDauto_dial\.pl/) - { - $running_VDAD++; - if ($DB) {print "VDAD RUNNING: |$psline[1]|\n";} - } - - $i++; - } - -if (!$running_VDAD) - { - if ($DB) {print "starting AST_VDauto_dial...\n";} - # add a '-L' to the command below to activate logging - `/usr/bin/screen -d -m -S ASTVDauto $PATHhome/AST_VDauto_dial.pl`; - } -} - - - - - if ($DB) {print "DONE\n";} - -exit; diff --git a/agc_2-X/trunk/bin/ADMIN_keepalive_AST_VDremote_agents.pl b/agc_2-X/trunk/bin/ADMIN_keepalive_AST_VDremote_agents.pl deleted file mode 100644 index eb169566..00000000 --- a/agc_2-X/trunk/bin/ADMIN_keepalive_AST_VDremote_agents.pl +++ /dev/null @@ -1,143 +0,0 @@ -#!/usr/bin/perl -# -# ADMIN_keepalive_AST_VDremote_agents.pl version 0.4 -# -# designed to keep the AST_update processes aline and check every minute -# -# Copyright (C) 2006 Matt Florell LICENSE: GPLv2 -# -# -# 50810-1453 - removed '-L' flag for screen logging of output (optimization) -# 50823-1459 - Added commandline debug options with debug printouts -# 60807-1315 - changed to use /etc/astguiclient.conf for settings -# - -$DB=0; # Debug flag -$MT[0]=''; $MT[1]=''; -@psline=@MT; - -### begin parsing run-time options ### -if (length($ARGV[0])>1) -{ - $i=0; - while ($#ARGV >= $i) - { - $args = "$args $ARGV[$i]"; - $i++; - } - - if ($args =~ /--help/i) - { - print "allowed run time options:\n [-t] = test\n [-debug] = verbose debug messages\n[-debugX] = Extra-verbose debug messages\n\n"; - } - else - { - if ($args =~ /-debug/i) - { - $DB=1; # Debug flag - } - if ($args =~ /--debugX/i) - { - $DBX=1; - print "\n----- SUPER-DUPER DEBUGGING -----\n\n"; - } - if ($args =~ /-t/i) - { - $TEST=1; - $T=1; - } - } -} -else -{ -# print "no command line options set\n"; -} -### end parsing run-time options ### - - - -# default path to astguiclient configuration file: -$PATHconf = '/etc/astguiclient.conf'; - -open(conf, "$PATHconf") || die "can't open $PATHconf: $!\n"; -@conf = ; -close(conf); -$i=0; -foreach(@conf) - { - $line = $conf[$i]; - $line =~ s/ |>|\n|\r|\t|\#.*|;.*//gi; - if ( ($line =~ /^PATHhome/) && ($CLIhome < 1) ) - {$PATHhome = $line; $PATHhome =~ s/.*=//gi;} - $i++; - } - -$REGhome = $PATHhome; -$REGhome =~ s/\//\\\//gi; - -#@psoutput = `ps -f -C AST_update --no-headers`; -#@psoutput = `ps -f -C AST_updat* --no-headers`; -#@psoutput = `/bin/ps -f --no-headers -A`; -@psoutput = `/bin/ps -o "%p %a" --no-headers -A`; - -$running_VDra = 0; - -$i=0; -foreach (@psoutput) -{ - chomp($psoutput[$i]); -if ($DBX) {print "$i|$psoutput[$i]| \n";} -@psline = split(/\/usr\/bin\/perl /,$psoutput[$i]); - -#if ($psline[1] =~ /\/home\/cron\/AST_VDremote_agents\.pl/) -if ($psline[1] =~ /$REGhome\/AST_VDremote_agents\.pl/) - { - $running_VDra++; - if ($DB) {print "VDra RUNNING: |$psline[1]|\n";} - } - -$i++; -} - - -if (!$running_VDra) -{ -# print "double check that update is not running\n"; - - sleep(5); - -#@psoutput = `ps -f -C AST_update --no-headers`; -#@psoutput = `ps -f -C AST_updat* --no-headers`; -#@psoutput = `/bin/ps -f --no-headers -A`; -@psoutput = `/bin/ps -o "%p %a" --no-headers -A`; -$i=0; -foreach (@psoutput2) - { - chomp($psoutput2[$i]); - if ($DBX) {print "$i|$psoutput[$i]| \n";} - @psline = split(/\/usr\/bin\/perl /,$psoutput2[$i]); - -# if ($psline[1] =~ /\/home\/cron\/AST_VDremote_agents\.pl/) - if ($psline[1] =~ /$REGhome\/AST_VDremote_agents\.pl/) - { - $running_VDra++; - if ($DB) {print "VDra RUNNING: |$psline[1]|\n";} - } - - $i++; - } - -if (!$running_VDra) - { - if ($DB) {print "starting AST_VDremote_agents...\n";} - # add a '-L' to the command below to activate logging - `/usr/bin/screen -d -m -S ASTVDremote $PATHhome/AST_VDremote_agents.pl`; - } -} - - - - - if ($DB) {print "DONE\n";} - -exit; diff --git a/agc_2-X/trunk/bin/ADMIN_keepalive_AST_send_listen.pl b/agc_2-X/trunk/bin/ADMIN_keepalive_AST_send_listen.pl deleted file mode 100644 index 4edc3d87..00000000 --- a/agc_2-X/trunk/bin/ADMIN_keepalive_AST_send_listen.pl +++ /dev/null @@ -1,251 +0,0 @@ -#!/usr/bin/perl -# -# ADMIN_keepalive_AST_send_listen.pl version 0.3 -# -# designed to keep the AST_manager_listen and manager_send processes alive and check every minute -# -# if you are on an older system you may need to change the @psoutput lines to fit your ps version -# -# Copyright (C) 2006 Matt Florell LICENSE: GPLv2 -# -# -# 50810-1450 - removed '-L' flag for screen logging of output (optimization) -# 50823-1440 - Added commandline debug options with debug printouts -# 60718-1045 - changed to use /etc/astguiclient.conf for configs -# 60718-1213 - fixed double-check and added kill for multiple listen processes -# - -$DB=0; # Debug flag -$MT[0]=''; $MT[1]=''; -@psline=@MT; - -### begin parsing run-time options ### -if (length($ARGV[0])>1) -{ - $i=0; - while ($#ARGV >= $i) - { - $args = "$args $ARGV[$i]"; - $i++; - } - - if ($args =~ /--help/i) - { - print "allowed run time options:\n [-t] = test\n [-debug] = verbose debug messages\n[-debugX] = Extra-verbose debug messages\n\n"; - } - else - { - if ($args =~ /-debug/i) - { - $DB=1; # Debug flag - } - if ($args =~ /--debugX/i) - { - $DBX=1; - print "\n----- SUPER-DUPER DEBUGGING -----\n\n"; - } - if ($args =~ /-t/i) - { - $TEST=1; - $T=1; - } - } -} -else -{ -# print "no command line options set\n"; -} -### end parsing run-time options ### - -# default path to astguiclient configuration file: -$PATHconf = '/etc/astguiclient.conf'; - -open(conf, "$PATHconf") || die "can't open $PATHconf: $!\n"; -@conf = ; -close(conf); -$i=0; -foreach(@conf) - { - $line = $conf[$i]; - $line =~ s/ |>|\n|\r|\t|\#.*|;.*//gi; - if ( ($line =~ /^PATHhome/) && ($CLIhome < 1) ) - {$PATHhome = $line; $PATHhome =~ s/.*=//gi;} - $i++; - } - -#@psoutput = `ps -f -C AST_manager --no-headers`; -#@psoutput = `ps -f --no-headers -C AST_manager_s*; ps -f --no-headers -C AST_manager_l*`; -#@psoutput = `/bin/ps -f --no-headers -A`; -@psoutput = `/bin/ps -o "%p %a" --no-headers -A`; - -$running_listen = 0; -$running_send = 0; - -$i=0; -foreach (@psoutput) -{ - chomp($psoutput[$i]); -if ($DBX) {print "$i|$psoutput[$i]| \n";} -@psline = split(/\/usr\/bin\/perl /,$psoutput[$i]); - -if ($psline[1] =~ /AST_manager_li/) - { - $psoutput[$i] =~ s/ .*|\n|\r|\t| //gi; - $listen_pid[$running_listen] = $psoutput[$i]; - $running_listen++; - if ($DB) {print "LISTEN RUNNING: |$psline[1]|$psoutput[$i]|\n";} - } -if ($psline[1] =~ /AST_manager_se/) - { - $psoutput[$i] =~ s/ .*|\n|\r|\t| //gi; - $send_pid[$running_send] = $psoutput[$i]; - $running_send++; - if ($DB) {print "SEND RUNNING: |$psline[1]|$psoutput[$i]|\n";} - } - -$i++; -} - - -@psline=@MT; -@psoutput=@MT; -@listen_pid=@MT; -@send_pid=@MT; - - -##### IF MORE THAN ONE LISTEN INSTANCE IS RUNNING, KILL THE SECOND ONE ##### -if ($running_listen > 1) -{ -$running_listen=0; - - sleep(1); - -#@psoutput = `ps -f -C AST_manager --no-headers`; -#@psoutput = `ps -f --no-headers -C AST_manager_s*; ps -f --no-headers -C AST_manager_l*`; -#@psoutput = `/bin/ps -f --no-headers -A`; -@psoutput = `/bin/ps -o "%p %a" --no-headers -A`; - -$i=0; -foreach (@psoutput) - { - chomp($psoutput[$i]); - if ($DBX) {print "$i|$psoutput[$i]| \n";} - @psline = split(/\/usr\/bin\/perl /,$psoutput[$i]); - $psoutput[$i] =~ s/^ *//gi; - $psoutput[$i] =~ s/ .*|\n|\r|\t| //gi; - - if ($psline[1] =~ /AST_manager_li/) - { - $listen_pid[$running_listen] = $psoutput[$i]; - if ($DB) {print "LISTEN RUNNING: |$psline[1]|$psoutput[$i]|\n";} - $running_listen++; - } - - $i++; - } - -if ($running_listen > 1) - { - if ($DB) {print "Killing AST_manager_listen... |$listen_pid[1]|\n";} - `/bin/kill -s 9 $listen_pid[1]`; - } -} - - - -@psline=@MT; -@psoutput=@MT; -@listen_pid=@MT; -@send_pid=@MT; - - - -##### IF LISTEN IS NOT RUNNING, START IT ##### -if (!$running_listen) -{ -$running_listen=0; - sleep(1); - -#@psoutput = `ps -f -C AST_manager --no-headers`; -#@psoutput = `ps -f --no-headers -C AST_manager_s*; ps -f --no-headers -C AST_manager_l*`; -#@psoutput = `/bin/ps -f --no-headers -A`; -@psoutput = `/bin/ps -o "%p %a" --no-headers -A`; - -$i=0; -foreach (@psoutput) - { - chomp($psoutput[$i]); - if ($DBX) {print "$i|$psoutput[$i]| \n";} - @psline = split(/\/usr\/bin\/perl /,$psoutput[$i]); - $psoutput[$i] =~ s/ .*|\n|\r|\t| //gi; - $listen_pid[$running_listen] = $psoutput[$i]; - - if ($psline[1] =~ /AST_manager_li/) - { - $running_listen++; - if ($DB) {print "LISTEN RUNNING: |$psline[1]|$psoutput[$i]|\n";} - } - - $i++; - } - -if (!$running_listen) - { - if ($DB) {print "starting AST_manager_listen...\n";} - # add a '-L' to the command below to activate logging - `/usr/bin/screen -d -m -S ASTlisten $PATHhome/AST_manager_listen.pl`; - } -} - - -@psline=@MT; -@psoutput=@MT; -@listen_pid=@MT; -@send_pid=@MT; - - - - -##### IF SEND IS NOT RUNNING, START IT ##### -if (!$running_send) -{ -$running_send=0; - - sleep(2); - -#@psoutput = `ps -f -C AST_manager --no-headers`; -#@psoutput = `ps -f --no-headers -C AST_manager_s*; ps -f --no-headers -C AST_manager_l*`; -#@psoutput = `/bin/ps -f --no-headers -A`; -@psoutput = `/bin/ps -o "%p %a" --no-headers -A`; -$i=0; -foreach (@psoutput) - { - chomp($psoutput[$i]); - if ($DBX) {print "$i|$psoutput[$i]| \n";} - @psline = split(/\/usr\/bin\/perl /,$psoutput[$i]); - $psoutput[$i] =~ s/ .*|\n|\r|\t| //gi; - $send_pid[$running_send] = $psoutput[$i]; - - if ($psline[1] =~ /AST_manager_se/) - { - $running_send++; - if ($DB) {print "SEND RUNNING: |$psline[1]|$psoutput[$i]|";} - } - - $i++; - } - -if (!$running_send) - { - if ($DB) {print "starting AST_manager_send...\n";} - # add a '-L' to the command below to activate logging - `/usr/bin/screen -d -m -S ASTsend $PATHhome/AST_manager_send.pl`; - } -} - - - - - if ($DB) {print "DONE\n";} - -exit; diff --git a/agc_2-X/trunk/bin/ADMIN_keepalive_AST_update.pl b/agc_2-X/trunk/bin/ADMIN_keepalive_AST_update.pl deleted file mode 100644 index 1e0d23dc..00000000 --- a/agc_2-X/trunk/bin/ADMIN_keepalive_AST_update.pl +++ /dev/null @@ -1,141 +0,0 @@ -#!/usr/bin/perl -# -# ADMIN_keepalive_AST_update.pl version 0.4 -# -# designed to keep the AST_update processes aline and check every minute -# -# Copyright (C) 2006 Matt Florell LICENSE: GPLv2 -# -# -# 50810-1451 - removed '-L' flag for screen logging of output (optimization) -# 50823-1446 - Added commandline debug options with debug printouts -# 51229-1027 - fixed typo of array name -# 60807-1315 - changed to use /etc/astguiclient.conf for settings -# - -$DB=0; # Debug flag -$MT[0]=''; $MT[1]=''; -@psline=@MT; - -### begin parsing run-time options ### -if (length($ARGV[0])>1) -{ - $i=0; - while ($#ARGV >= $i) - { - $args = "$args $ARGV[$i]"; - $i++; - } - - if ($args =~ /--help/i) - { - print "allowed run time options:\n [-t] = test\n [-debug] = verbose debug messages\n[-debugX] = Extra-verbose debug messages\n\n"; - } - else - { - if ($args =~ /-debug/i) - { - $DB=1; # Debug flag - } - if ($args =~ /--debugX/i) - { - $DBX=1; - print "\n----- SUPER-DUPER DEBUGGING -----\n\n"; - } - if ($args =~ /-t/i) - { - $TEST=1; - $T=1; - } - } -} -else -{ -# print "no command line options set\n"; -} -### end parsing run-time options ### - - -# default path to astguiclient configuration file: -$PATHconf = '/etc/astguiclient.conf'; - -open(conf, "$PATHconf") || die "can't open $PATHconf: $!\n"; -@conf = ; -close(conf); -$i=0; -foreach(@conf) - { - $line = $conf[$i]; - $line =~ s/ |>|\n|\r|\t|\#.*|;.*//gi; - if ( ($line =~ /^PATHhome/) && ($CLIhome < 1) ) - {$PATHhome = $line; $PATHhome =~ s/.*=//gi;} - $i++; - } - -$REGhome = $PATHhome; -$REGhome =~ s/\//\\\//gi; - -#@psoutput = `ps -f -C AST_update --no-headers`; -#@psoutput = `ps -f -C AST_updat* --no-headers`; -#@psoutput = `/bin/ps -f --no-headers -A`; -@psoutput = `/bin/ps -o "%p %a" --no-headers -A`; - -$running_update = 0; - -$i=0; -foreach (@psoutput) -{ - chomp($psoutput[$i]); -if ($DBX) {print "$i|$psoutput[$i]| \n";} -@psline = split(/\/usr\/bin\/perl /,$psoutput[$i]); - -if ($psline[1] =~ /$REGhome\/AST_update\.pl/) - { - $running_update++; - if ($DB) {print "UPDATE RUNNING: |$psline[1]|\n";} - } - -$i++; -} - - -if (!$running_update) -{ -# print "double check that update is not running\n"; - - sleep(5); - -#@psoutput = `ps -f -C AST_update --no-headers`; -#@psoutput = `ps -f -C AST_updat* --no-headers`; -#@psoutput = `/bin/ps -f --no-headers -A`; -@psoutput2 = `/bin/ps -o "%p %a" --no-headers -A`; -$i=0; -foreach (@psoutput2) - { - chomp($psoutput2[$i]); - if ($DBX) {print "$i|$psoutput[$i]| \n";} - @psline = split(/\/usr\/bin\/perl /,$psoutput2[$i]); - - if ($psline[1] =~ /$REGhome\/AST_update\.pl/) - { - $running_update++; - if ($DB) {print "UPDATE RUNNING: |$psline[1]|\n";} - } - - $i++; - } - -if (!$running_update) - { - if ($DB) {print "starting AST_update...\n";} - # add a '-L' to the command below to activate logging - `/usr/bin/screen -d -m -S ASTupdate $PATHhome/AST_update.pl`; - } -} - - - - - if ($DB) {print "DONE\n";} - -exit;