From 81fc6a34e30b1023f74e0916ebd5cb4d5dbf1847 Mon Sep 17 00:00:00 2001 From: Darko Date: Thu, 13 Feb 2014 10:05:31 +0100 Subject: [PATCH 1/7] test predb_hash pane sleep timer --- bin/monitor.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/monitor.php b/bin/monitor.php index c70d852f7..da56dd183 100644 --- a/bin/monitor.php +++ b/bin/monitor.php @@ -7,7 +7,7 @@ require_once("../test/ColorCLI.php"); require_once("../test/showsleep.php"); -$version="0.3r673"; +$version="0.3r674"; $db = new DB(); $s = new Sites(); @@ -1436,16 +1436,16 @@ if ($array ['FIXRELEASES'] = "true") { if (( $array['MAX_LOAD'] >= get_load()) && (( TIME() - $time28 ) >= $array['PREDBHASH_TIMER'] ) &&( $array['PREDBHASH'] == "true" )) { $color = get_color(); $log = writelog($panes4[1]); - shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.1 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[1] $ds2 && cd $_test && $_php predb_hash_decrypt.php 1000 2>&1 $log && echo \" \033[1;0;33m\" && $ds1 $panes4[1] $ds3' 2>&1 1> /dev/null"); + shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.1 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[1] $ds2 && cd $_test && $_php predb_hash_decrypt.php 1000 2>&1 $log && $_sleep {$array ['PREDBHASH_TIMER']} && echo \" \033[1;0;33m\" && $ds1 $panes4[1] $ds3' 2>&1 1> /dev/null"); $time28 = TIME(); } elseif ( $array['PREDBHASH'] != "true" ) { $color = get_color(); shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.1 'echo \"\033[38;5;\"$color\"m\n$panes4[1] Disabled by PREDBHASH\" && date +\"%D %T\"' 2>&1 1> /dev/null"); - } elseif (( $array['PREDBHASH'] == "true" ) && ( $array['MAX_LOAD'] >= get_load())) { + } /*elseif (( $array['PREDBHASH'] == "true" ) && ( $array['MAX_LOAD'] >= get_load())) { $color = get_color(); $run_time = relativeTime( $array['PREDBHASH_TIMER'] + $time28 ); shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.1 'echo \"\033[38;5;\"$color\"m\n$panes4[1] will run in T[ $run_time]\" && date +\"%D %T\"' 2>&1 1> /dev/null"); - } elseif ( $array['MAX_LOAD'] <= get_load()) { + } */elseif ( $array['MAX_LOAD'] <= get_load()) { $color = get_color(); shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.1 'echo \"\033[38;5;\"$color\"m\n$panes4[1] Disabled by MAX_LOAD\" && date +\"%D %T\"' 2>&1 1> /dev/null"); } From 8516077b66ab81d7355842004ad57c313d5f2f4b Mon Sep 17 00:00:00 2001 From: Darko Date: Thu, 13 Feb 2014 10:22:35 +0100 Subject: [PATCH 2/7] Removing wait timer from predbhash --- bin/monitor.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/monitor.php b/bin/monitor.php index da56dd183..9c2ef4f60 100644 --- a/bin/monitor.php +++ b/bin/monitor.php @@ -7,7 +7,7 @@ require_once("../test/ColorCLI.php"); require_once("../test/showsleep.php"); -$version="0.3r674"; +$version="0.3r675"; $db = new DB(); $s = new Sites(); @@ -1433,7 +1433,7 @@ if ($array ['FIXRELEASES'] = "true") { shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.0 'echo \"\033[38;5;\"$color\"m\n$panes4[0] Disabled by MAX_LOAD\" && date +\"%D %T\"' 2>&1 1> /dev/null"); } //run predb_hash_decrypt.php in pane 4.1 - if (( $array['MAX_LOAD'] >= get_load()) && (( TIME() - $time28 ) >= $array['PREDBHASH_TIMER'] ) &&( $array['PREDBHASH'] == "true" )) { + if (( $array['MAX_LOAD'] >= get_load()) &&( $array['PREDBHASH'] == "true" )) { $color = get_color(); $log = writelog($panes4[1]); shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.1 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[1] $ds2 && cd $_test && $_php predb_hash_decrypt.php 1000 2>&1 $log && $_sleep {$array ['PREDBHASH_TIMER']} && echo \" \033[1;0;33m\" && $ds1 $panes4[1] $ds3' 2>&1 1> /dev/null"); From 212df4c204ad85cc5f4a5f2a01c90e7bf48a49ed Mon Sep 17 00:00:00 2001 From: Darko Date: Thu, 13 Feb 2014 10:37:52 +0100 Subject: [PATCH 3/7] Stage 2: added requestID sleep timer and removed wait timer --- bin/monitor.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/monitor.php b/bin/monitor.php index 9c2ef4f60..9959e259f 100644 --- a/bin/monitor.php +++ b/bin/monitor.php @@ -7,7 +7,7 @@ require_once("../test/ColorCLI.php"); require_once("../test/showsleep.php"); -$version="0.3r675"; +$version="0.3r676"; $db = new DB(); $s = new Sites(); @@ -1450,19 +1450,19 @@ if ($array ['FIXRELEASES'] = "true") { shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.1 'echo \"\033[38;5;\"$color\"m\n$panes4[1] Disabled by MAX_LOAD\" && date +\"%D %T\"' 2>&1 1> /dev/null"); } //run requestID in pane 4.2 - if (( $array['MAX_LOAD'] >= get_load()) && (( TIME() - $time30 ) >= $array['REQID_TIMER'] ) && ( $array['REQID'] == "true" )) { + if (( $array['MAX_LOAD'] >= get_load()) && ( $array['REQID'] == "true" )) { $color = get_color(); $log = writelog($panes4[2]); - shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.2 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[2] $ds2 && cd $_test && $_php requestID.php 1000 true 2>&1 $log echo \" \033[1;0;33m\" && $ds1 $panes4[2] $ds3' 2>&1 1> /dev/null"); + shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.2 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[2] $ds2 && cd $_test && $_php requestID.php 1000 true 2>&1 $log && $_sleep {$array['REQID_TIMER']} && echo \" \033[1;0;33m\" && $ds1 $panes4[2] $ds3' 2>&1 1> /dev/null"); $time30 = TIME();} elseif ( $array['REQID'] != "true" ) { $color = get_color(); shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.2 'echo \"\033[38;5;\"$color\"m\n$panes4[2] Disabled by RequestID\" && date +\"%D %T\"' 2>&1 1> /dev/null"); - } elseif (( $array['REQID'] == "true" ) && ( $array['MAX_LOAD'] >= get_load())) { + } /*elseif (( $array['REQID'] == "true" ) && ( $array['MAX_LOAD'] >= get_load())) { $color = get_color(); $run_time = relativeTime( $array['REQID_TIMER'] + $time30 ); shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.2 'echo \"\033[38;5;\"$color\"m\n$panes4[2] will run in T[ $run_time]\" && date +\"%D %T\"' 2>&1 1> /dev/null"); - } elseif ( $array['MAX_LOAD'] <= get_load()) { + } */elseif ( $array['MAX_LOAD'] <= get_load()) { $color = get_color(); shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.2 'echo \"\033[38;5;\"$color\"m\n$panes4[2] Disabled by MAX_LOAD\" && date +\"%D %T\"' 2>&1 1> /dev/null"); } From 894cfaab87883ae1cf069ebf78452dc6c152805d Mon Sep 17 00:00:00 2001 From: Darko Date: Thu, 13 Feb 2014 11:50:51 +0100 Subject: [PATCH 4/7] Small fix and added prehash update sleep timer --- bin/monitor.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/monitor.php b/bin/monitor.php index 9959e259f..eb252edb6 100644 --- a/bin/monitor.php +++ b/bin/monitor.php @@ -7,7 +7,7 @@ require_once("../test/ColorCLI.php"); require_once("../test/showsleep.php"); -$version="0.3r676"; +$version="0.3r677"; $db = new DB(); $s = new Sites(); @@ -1453,7 +1453,7 @@ if ($array ['FIXRELEASES'] = "true") { if (( $array['MAX_LOAD'] >= get_load()) && ( $array['REQID'] == "true" )) { $color = get_color(); $log = writelog($panes4[2]); - shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.2 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[2] $ds2 && cd $_test && $_php requestID.php 1000 true 2>&1 $log && $_sleep {$array['REQID_TIMER']} && echo \" \033[1;0;33m\" && $ds1 $panes4[2] $ds3' 2>&1 1> /dev/null"); + shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.2 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[2] $ds2 && cd $_test && $_php requestID.php 1000 true 2>&1 $log && echo \" \033[1;0;33m\" && $_sleep {$array['REQID_TIMER']} && $ds1 $panes4[2] $ds3' 2>&1 1> /dev/null"); $time30 = TIME();} elseif ( $array['REQID'] != "true" ) { $color = get_color(); @@ -1485,19 +1485,19 @@ if ($array ['FIXRELEASES'] = "true") { } //run postprocess_pre.php in pane 4.4 - if (( $array['MAX_LOAD'] >= get_load()) && (( TIME() - $time32 ) >= $array['UPPRE_TIMER'] ) && ( $array['UPPRE'] == "true" )) { + if (( $array['MAX_LOAD'] >= get_load()) && ( $array['UPPRE'] == "true" )) { $color = get_color(); $log = writelog($panes4[4]); - shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.4 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[4] $ds2 && cd $_test && $_php postprocess_pre.php 2>&1 $log echo \" \033[1;0;33m\" && $ds1 $panes4[4] $ds3' 2>&1 1> /dev/null"); + shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.4 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[4] $ds2 && cd $_test && $_php postprocess_pre.php 2>&1 $log && echo \" \033[1;0;33m\" && $_sleep {$array['UPPRE_TIMER']} && $ds1 $panes4[4] $ds3' 2>&1 1> /dev/null"); $time32 = TIME();} elseif ( $array['UPPRE'] != "true" ) { $color = get_color(); shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.4 'echo \"\033[38;5;\"$color\"m\n$panes4[4] Disabled by Update_Prehash\" && date +\"%D %T\"' 2>&1 1> /dev/null"); - } elseif (( $array['UPPRE'] == "true" ) && ( $array['MAX_LOAD'] >= get_load())) { + } /*elseif (( $array['UPPRE'] == "true" ) && ( $array['MAX_LOAD'] >= get_load())) { $color = get_color(); $run_time = relativeTime( $array['UPPRE_TIMER'] + $time32 ); shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.4 'echo \"\033[38;5;\"$color\"m\n$panes4[4] will run in T[ $run_time]\" && date +\"%D %T\"' 2>&1 1> /dev/null"); - } elseif ( $array['MAX_LOAD'] <= get_load()) { + } */elseif ( $array['MAX_LOAD'] <= get_load()) { $color = get_color(); shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.4 'echo \"\033[38;5;\"$color\"m\n$panes4[4] Disabled by MAX_LOAD\" && date +\"%D %T\"' 2>&1 1> /dev/null"); } From 8a0dc0bebbbae5c4fa201d27d5e5e7fe3113795f Mon Sep 17 00:00:00 2001 From: Darko Date: Thu, 13 Feb 2014 12:16:29 +0100 Subject: [PATCH 5/7] Added sleep timers to removecrap pane, added them to start of the loop for testing purposes --- bin/monitor.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/monitor.php b/bin/monitor.php index eb252edb6..0752182e4 100644 --- a/bin/monitor.php +++ b/bin/monitor.php @@ -7,7 +7,7 @@ require_once("../test/ColorCLI.php"); require_once("../test/showsleep.php"); -$version="0.3r677"; +$version="0.3r678"; $db = new DB(); $s = new Sites(); @@ -1415,7 +1415,7 @@ if ($array ['FIXRELEASES'] = "true") { shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:3.7 'echo \"\033[38;5;\"$color\"m\n$panes3[7] Has no work to process \" && date +\"%D %T\"' 2>&1 1> /dev/null"); } - //run fixReleaseNames and jonnyboys jb_fix_names.php and removeCrapReleases in pane 4.0 + //run fixReleaseNames and jonnyboys jb_fix_names.php in pane 4.0 if (( $array['MAX_LOAD'] >= get_load()) && (( TIME() - $time27 ) >= $array['FIXRELEASES_TIMER'] ) && ( $array['FIXRELEASES'] == "true" )) { $color = get_color(); $log = writelog($panes4[0]); @@ -1467,19 +1467,19 @@ if ($array ['FIXRELEASES'] = "true") { shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.2 'echo \"\033[38;5;\"$color\"m\n$panes4[2] Disabled by MAX_LOAD\" && date +\"%D %T\"' 2>&1 1> /dev/null"); } //run removeCrap.php in pane 4.3 - if (( $array['MAX_LOAD'] >= get_load()) && (( TIME() - $time31 ) >= $array['REMOVECRAP_TIMER'] ) && ( $array['REMOVECRAP'] == "true" )) { + if (( $array['MAX_LOAD'] >= get_load()) && ( $array['REMOVECRAP'] == "true" )) { $color = get_color(); $log = writelog($panes4[3]); - shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.3 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[3] $ds2 && cd $_test && $_php removeCrapReleases.php true 2 2>&1 $log echo \" \033[1;0;33m\" && $ds1 $panes4[3] $ds3' 2>&1 1> /dev/null"); + shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.3 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[3] $ds2 && cd $_test && $_sleep {$array['REMOVECRAP_TIMER']} && $_php removeCrapReleases.php true 2 2>&1 $log echo \" \033[1;0;33m\" && $ds1 $panes4[3] $ds3' 2>&1 1> /dev/null"); $time31 = TIME();} elseif ( $array['REMOVECRAP'] != "true" ) { $color = get_color(); shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.3 'echo \"\033[38;5;\"$color\"m\n$panes4[3] Disabled by RemoveCrap\" && date +\"%D %T\"' 2>&1 1> /dev/null"); - } elseif (( $array['REMOVECRAP'] == "true" ) && ( $array['MAX_LOAD'] >= get_load())) { + } /*elseif (( $array['REMOVECRAP'] == "true" ) && ( $array['MAX_LOAD'] >= get_load())) { $color = get_color(); $run_time = relativeTime( $array['REMOVECRAP_TIMER'] + $time31 ); shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.3 'echo \"\033[38;5;\"$color\"m\n$panes4[3] will run in T[ $run_time]\" && date +\"%D %T\"' 2>&1 1> /dev/null"); - } elseif ( $array['MAX_LOAD'] <= get_load()) { + } */elseif ( $array['MAX_LOAD'] <= get_load()) { $color = get_color(); shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.3 'echo \"\033[38;5;\"$color\"m\n$panes4[3] Disabled by MAX_LOAD\" && date +\"%D %T\"' 2>&1 1> /dev/null"); } From 8005539e6d454da5ee055683e3da225c6f9b3d3f Mon Sep 17 00:00:00 2001 From: Darko Date: Thu, 13 Feb 2014 12:31:29 +0100 Subject: [PATCH 6/7] Added sleep timers to the beggining, added sleep timer to fixreleasenames Hopefully it wont trigger the bug this way. --- bin/monitor.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/monitor.php b/bin/monitor.php index 0752182e4..130203568 100644 --- a/bin/monitor.php +++ b/bin/monitor.php @@ -7,7 +7,7 @@ require_once("../test/ColorCLI.php"); require_once("../test/showsleep.php"); -$version="0.3r678"; +$version="0.3r679"; $db = new DB(); $s = new Sites(); @@ -1416,19 +1416,19 @@ if ($array ['FIXRELEASES'] = "true") { } //run fixReleaseNames and jonnyboys jb_fix_names.php in pane 4.0 - if (( $array['MAX_LOAD'] >= get_load()) && (( TIME() - $time27 ) >= $array['FIXRELEASES_TIMER'] ) && ( $array['FIXRELEASES'] == "true" )) { + if (( $array['MAX_LOAD'] >= get_load()) && ( $array['FIXRELEASES'] == "true" )) { $color = get_color(); $log = writelog($panes4[0]); - shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.0 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[0] $ds2 && cd $_test && $_php fixReleaseNames.php 1 true other yes show 2>&1 $log && $_php fixReleaseNames.php 3 true other yes show 2>&1 $log && $_php fixReleaseNames.php 5 true other yes show 2>&1 $log && $_php fixReleaseNames.php 7 true other yes show 2>&1 $log && $_php hash_decrypt.php 1000 2>&1 $log && $_php jb_fix_names.php 6 show 2>&1 $log echo \" \033[1;0;33m\" && $ds1 $panes4[0] $ds3' 2>&1 1> /dev/null"); + shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.0 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[0] $ds2 && cd $_test && $_sleep {$array ['FIXRELEASES_TIMER']} && $_php fixReleaseNames.php 1 true other yes show 2>&1 $log && $_php fixReleaseNames.php 3 true other yes show 2>&1 $log && $_php fixReleaseNames.php 5 true other yes show 2>&1 $log && $_php fixReleaseNames.php 7 true other yes show 2>&1 $log && $_php hash_decrypt.php 1000 2>&1 $log && $_php jb_fix_names.php 6 show 2>&1 $log echo \" \033[1;0;33m\" && $ds1 $panes4[0] $ds3' 2>&1 1> /dev/null"); $time27 = TIME();} elseif ( $array['FIXRELEASES'] != "true" ) { $color = get_color(); shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.0 'echo \"\033[38;5;\"$color\"m\n$panes4[0] Disabled by fixReleaseNames\" && date +\"%D %T\"' 2>&1 1> /dev/null"); - } elseif (( $array['FIXRELEASES'] == "true" ) && ( $array['MAX_LOAD'] >= get_load())) { + }/* elseif (( $array['FIXRELEASES'] == "true" ) && ( $array['MAX_LOAD'] >= get_load())) { $color = get_color(); $run_time = relativeTime( $array['FIXRELEASES_TIMER'] + $time27 ); shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.0 'echo \"\033[38;5;\"$color\"m\n$panes4[0] will run in T[ $run_time]\" && date +\"%D %T\"' 2>&1 1> /dev/null"); - } elseif ( $array['MAX_LOAD'] <= get_load()) { + } */elseif ( $array['MAX_LOAD'] <= get_load()) { $color = get_color(); shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.0 'echo \"\033[38;5;\"$color\"m\n$panes4[0] Disabled by MAX_LOAD\" && date +\"%D %T\"' 2>&1 1> /dev/null"); } @@ -1436,7 +1436,7 @@ if ($array ['FIXRELEASES'] = "true") { if (( $array['MAX_LOAD'] >= get_load()) &&( $array['PREDBHASH'] == "true" )) { $color = get_color(); $log = writelog($panes4[1]); - shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.1 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[1] $ds2 && cd $_test && $_php predb_hash_decrypt.php 1000 2>&1 $log && $_sleep {$array ['PREDBHASH_TIMER']} && echo \" \033[1;0;33m\" && $ds1 $panes4[1] $ds3' 2>&1 1> /dev/null"); + shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.1 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[1] $ds2 && cd $_test && $_sleep {$array ['PREDBHASH_TIMER']} && $_php predb_hash_decrypt.php 1000 2>&1 $log && echo \" \033[1;0;33m\" && $ds1 $panes4[1] $ds3' 2>&1 1> /dev/null"); $time28 = TIME(); } elseif ( $array['PREDBHASH'] != "true" ) { $color = get_color(); @@ -1453,7 +1453,7 @@ if ($array ['FIXRELEASES'] = "true") { if (( $array['MAX_LOAD'] >= get_load()) && ( $array['REQID'] == "true" )) { $color = get_color(); $log = writelog($panes4[2]); - shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.2 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[2] $ds2 && cd $_test && $_php requestID.php 1000 true 2>&1 $log && echo \" \033[1;0;33m\" && $_sleep {$array['REQID_TIMER']} && $ds1 $panes4[2] $ds3' 2>&1 1> /dev/null"); + shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.2 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[2] $ds2 && cd $_test && $_sleep {$array['REQID_TIMER']} && $_php requestID.php 1000 true 2>&1 $log && echo \" \033[1;0;33m\" && $ds1 $panes4[2] $ds3' 2>&1 1> /dev/null"); $time30 = TIME();} elseif ( $array['REQID'] != "true" ) { $color = get_color(); @@ -1488,7 +1488,7 @@ if ($array ['FIXRELEASES'] = "true") { if (( $array['MAX_LOAD'] >= get_load()) && ( $array['UPPRE'] == "true" )) { $color = get_color(); $log = writelog($panes4[4]); - shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.4 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[4] $ds2 && cd $_test && $_php postprocess_pre.php 2>&1 $log && echo \" \033[1;0;33m\" && $_sleep {$array['UPPRE_TIMER']} && $ds1 $panes4[4] $ds3' 2>&1 1> /dev/null"); + shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.4 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[4] $ds2 && cd $_test && $_sleep {$array['UPPRE_TIMER']} && $_php postprocess_pre.php 2>&1 $log && echo \" \033[1;0;33m\" && $ds1 $panes4[4] $ds3' 2>&1 1> /dev/null"); $time32 = TIME();} elseif ( $array['UPPRE'] != "true" ) { $color = get_color(); From bd8aa974be3ac8ed20977c69e6d6cc2ee4ace468 Mon Sep 17 00:00:00 2001 From: Darko Date: Thu, 13 Feb 2014 12:39:22 +0100 Subject: [PATCH 7/7] Moved sleep timers to the end, removed commneted stuff, trying to fix the problem with fixreleasenames pane --- bin/monitor.php | 42 +++++++++++------------------------------- 1 file changed, 11 insertions(+), 31 deletions(-) diff --git a/bin/monitor.php b/bin/monitor.php index 130203568..b21b7784d 100644 --- a/bin/monitor.php +++ b/bin/monitor.php @@ -7,7 +7,7 @@ require_once("../test/ColorCLI.php"); require_once("../test/showsleep.php"); -$version="0.3r679"; +$version="0.3r680"; $db = new DB(); $s = new Sites(); @@ -1419,16 +1419,12 @@ if ($array ['FIXRELEASES'] = "true") { if (( $array['MAX_LOAD'] >= get_load()) && ( $array['FIXRELEASES'] == "true" )) { $color = get_color(); $log = writelog($panes4[0]); - shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.0 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[0] $ds2 && cd $_test && $_sleep {$array ['FIXRELEASES_TIMER']} && $_php fixReleaseNames.php 1 true other yes show 2>&1 $log && $_php fixReleaseNames.php 3 true other yes show 2>&1 $log && $_php fixReleaseNames.php 5 true other yes show 2>&1 $log && $_php fixReleaseNames.php 7 true other yes show 2>&1 $log && $_php hash_decrypt.php 1000 2>&1 $log && $_php jb_fix_names.php 6 show 2>&1 $log echo \" \033[1;0;33m\" && $ds1 $panes4[0] $ds3' 2>&1 1> /dev/null"); + shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.0 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[0] $ds2 && cd $_test && $_php fixReleaseNames.php 3 true other yes show 2>&1 $log && $_php fixReleaseNames.php 5 true other yes show 2>&1 $log && $_php fixReleaseNames.php 7 true other yes show 2>&1 $log && $_php hash_decrypt.php 1000 2>&1 $log && $_php jb_fix_names.php 6 show 2>&1 $log echo \" \033[1;0;33m\" && $_sleep {$array ['FIXRELEASES_TIMER']} && $ds1 $panes4[0] $ds3' 2>&1 1> /dev/null"); $time27 = TIME();} elseif ( $array['FIXRELEASES'] != "true" ) { $color = get_color(); shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.0 'echo \"\033[38;5;\"$color\"m\n$panes4[0] Disabled by fixReleaseNames\" && date +\"%D %T\"' 2>&1 1> /dev/null"); - }/* elseif (( $array['FIXRELEASES'] == "true" ) && ( $array['MAX_LOAD'] >= get_load())) { - $color = get_color(); - $run_time = relativeTime( $array['FIXRELEASES_TIMER'] + $time27 ); - shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.0 'echo \"\033[38;5;\"$color\"m\n$panes4[0] will run in T[ $run_time]\" && date +\"%D %T\"' 2>&1 1> /dev/null"); - } */elseif ( $array['MAX_LOAD'] <= get_load()) { + } elseif ( $array['MAX_LOAD'] <= get_load()) { $color = get_color(); shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.0 'echo \"\033[38;5;\"$color\"m\n$panes4[0] Disabled by MAX_LOAD\" && date +\"%D %T\"' 2>&1 1> /dev/null"); } @@ -1436,16 +1432,12 @@ if ($array ['FIXRELEASES'] = "true") { if (( $array['MAX_LOAD'] >= get_load()) &&( $array['PREDBHASH'] == "true" )) { $color = get_color(); $log = writelog($panes4[1]); - shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.1 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[1] $ds2 && cd $_test && $_sleep {$array ['PREDBHASH_TIMER']} && $_php predb_hash_decrypt.php 1000 2>&1 $log && echo \" \033[1;0;33m\" && $ds1 $panes4[1] $ds3' 2>&1 1> /dev/null"); + shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.1 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[1] $ds2 && cd $_test && $_php predb_hash_decrypt.php 1000 2>&1 $log && echo \" \033[1;0;33m\" && $_sleep {$array ['PREDBHASH_TIMER']} && $ds1 $panes4[1] $ds3' 2>&1 1> /dev/null"); $time28 = TIME(); } elseif ( $array['PREDBHASH'] != "true" ) { $color = get_color(); shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.1 'echo \"\033[38;5;\"$color\"m\n$panes4[1] Disabled by PREDBHASH\" && date +\"%D %T\"' 2>&1 1> /dev/null"); - } /*elseif (( $array['PREDBHASH'] == "true" ) && ( $array['MAX_LOAD'] >= get_load())) { - $color = get_color(); - $run_time = relativeTime( $array['PREDBHASH_TIMER'] + $time28 ); - shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.1 'echo \"\033[38;5;\"$color\"m\n$panes4[1] will run in T[ $run_time]\" && date +\"%D %T\"' 2>&1 1> /dev/null"); - } */elseif ( $array['MAX_LOAD'] <= get_load()) { + } elseif ( $array['MAX_LOAD'] <= get_load()) { $color = get_color(); shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.1 'echo \"\033[38;5;\"$color\"m\n$panes4[1] Disabled by MAX_LOAD\" && date +\"%D %T\"' 2>&1 1> /dev/null"); } @@ -1453,16 +1445,12 @@ if ($array ['FIXRELEASES'] = "true") { if (( $array['MAX_LOAD'] >= get_load()) && ( $array['REQID'] == "true" )) { $color = get_color(); $log = writelog($panes4[2]); - shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.2 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[2] $ds2 && cd $_test && $_sleep {$array['REQID_TIMER']} && $_php requestID.php 1000 true 2>&1 $log && echo \" \033[1;0;33m\" && $ds1 $panes4[2] $ds3' 2>&1 1> /dev/null"); + shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.2 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[2] $ds2 && cd $_test && $_php requestID.php 1000 true 2>&1 $log && echo \" \033[1;0;33m\" && $_sleep {$array['REQID_TIMER']} && $ds1 $panes4[2] $ds3' 2>&1 1> /dev/null"); $time30 = TIME();} elseif ( $array['REQID'] != "true" ) { $color = get_color(); shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.2 'echo \"\033[38;5;\"$color\"m\n$panes4[2] Disabled by RequestID\" && date +\"%D %T\"' 2>&1 1> /dev/null"); - } /*elseif (( $array['REQID'] == "true" ) && ( $array['MAX_LOAD'] >= get_load())) { - $color = get_color(); - $run_time = relativeTime( $array['REQID_TIMER'] + $time30 ); - shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.2 'echo \"\033[38;5;\"$color\"m\n$panes4[2] will run in T[ $run_time]\" && date +\"%D %T\"' 2>&1 1> /dev/null"); - } */elseif ( $array['MAX_LOAD'] <= get_load()) { + } elseif ( $array['MAX_LOAD'] <= get_load()) { $color = get_color(); shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.2 'echo \"\033[38;5;\"$color\"m\n$panes4[2] Disabled by MAX_LOAD\" && date +\"%D %T\"' 2>&1 1> /dev/null"); } @@ -1470,16 +1458,12 @@ if ($array ['FIXRELEASES'] = "true") { if (( $array['MAX_LOAD'] >= get_load()) && ( $array['REMOVECRAP'] == "true" )) { $color = get_color(); $log = writelog($panes4[3]); - shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.3 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[3] $ds2 && cd $_test && $_sleep {$array['REMOVECRAP_TIMER']} && $_php removeCrapReleases.php true 2 2>&1 $log echo \" \033[1;0;33m\" && $ds1 $panes4[3] $ds3' 2>&1 1> /dev/null"); + shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.3 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[3] $ds2 && cd $_test && $_php removeCrapReleases.php true 2 2>&1 $log echo \" \033[1;0;33m\" && $_sleep {$array['REMOVECRAP_TIMER']} && $ds1 $panes4[3] $ds3' 2>&1 1> /dev/null"); $time31 = TIME();} elseif ( $array['REMOVECRAP'] != "true" ) { $color = get_color(); shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.3 'echo \"\033[38;5;\"$color\"m\n$panes4[3] Disabled by RemoveCrap\" && date +\"%D %T\"' 2>&1 1> /dev/null"); - } /*elseif (( $array['REMOVECRAP'] == "true" ) && ( $array['MAX_LOAD'] >= get_load())) { - $color = get_color(); - $run_time = relativeTime( $array['REMOVECRAP_TIMER'] + $time31 ); - shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.3 'echo \"\033[38;5;\"$color\"m\n$panes4[3] will run in T[ $run_time]\" && date +\"%D %T\"' 2>&1 1> /dev/null"); - } */elseif ( $array['MAX_LOAD'] <= get_load()) { + } elseif ( $array['MAX_LOAD'] <= get_load()) { $color = get_color(); shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.3 'echo \"\033[38;5;\"$color\"m\n$panes4[3] Disabled by MAX_LOAD\" && date +\"%D %T\"' 2>&1 1> /dev/null"); } @@ -1488,16 +1472,12 @@ if ($array ['FIXRELEASES'] = "true") { if (( $array['MAX_LOAD'] >= get_load()) && ( $array['UPPRE'] == "true" )) { $color = get_color(); $log = writelog($panes4[4]); - shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.4 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[4] $ds2 && cd $_test && $_sleep {$array['UPPRE_TIMER']} && $_php postprocess_pre.php 2>&1 $log && echo \" \033[1;0;33m\" && $ds1 $panes4[4] $ds3' 2>&1 1> /dev/null"); + shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.4 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes4[4] $ds2 && cd $_test && $_php postprocess_pre.php 2>&1 $log && echo \" \033[1;0;33m\" && $_sleep {$array['UPPRE_TIMER']} && $ds1 $panes4[4] $ds3' 2>&1 1> /dev/null"); $time32 = TIME();} elseif ( $array['UPPRE'] != "true" ) { $color = get_color(); shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.4 'echo \"\033[38;5;\"$color\"m\n$panes4[4] Disabled by Update_Prehash\" && date +\"%D %T\"' 2>&1 1> /dev/null"); - } /*elseif (( $array['UPPRE'] == "true" ) && ( $array['MAX_LOAD'] >= get_load())) { - $color = get_color(); - $run_time = relativeTime( $array['UPPRE_TIMER'] + $time32 ); - shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.4 'echo \"\033[38;5;\"$color\"m\n$panes4[4] will run in T[ $run_time]\" && date +\"%D %T\"' 2>&1 1> /dev/null"); - } */elseif ( $array['MAX_LOAD'] <= get_load()) { + } elseif ( $array['MAX_LOAD'] <= get_load()) { $color = get_color(); shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:4.4 'echo \"\033[38;5;\"$color\"m\n$panes4[4] Disabled by MAX_LOAD\" && date +\"%D %T\"' 2>&1 1> /dev/null"); }