From f52f2673a9dea5fc6e2073c09baf2aee29e25247 Mon Sep 17 00:00:00 2001 From: Rocco Muscaritolo Date: Thu, 3 Apr 2014 15:38:53 -0700 Subject: [PATCH] Logging spacing --- scale_cron.sh | 9 ++++----- scale_cron_gen.sh | 7 +++---- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/scale_cron.sh b/scale_cron.sh index e04f869..5aa61ca 100644 --- a/scale_cron.sh +++ b/scale_cron.sh @@ -8,12 +8,11 @@ maxclients=`sh /root/scaledown_check.sh | grep percent_maxclients | awk '{print if awk -v ld=$load 'BEGIN {exit !(ld < 2)}' && awk -v mem=$mem 'BEGIN {exit !(mem < 30)}' && awk -v cli=$maxclients 'BEGIN {exit !(cli < 30)}' then echo `date` "Autoscale load check: Scaling DOWN by 1 server!" - curl -X POST https://iad.autoscale.api.rackspacecloud.com/v1.0/execute/1/13aa6c05ca918b7f0cf6f04336176e4b2ba7359ab44f7f9b555a7a72b7d088b5/ 2> /dev/null + curl -X POST URLME 2> /dev/null else echo `date` "Autoscale load check: Not ready for scale down" fi -echo " Average sysload = $load - Average memory use = $mem % - Average MaxClients use = $maxclients %" - +echo " Average sysload = $load" +echo " Average memory use = $mem %" +echo " Average MaxClients use = $maxclients %" diff --git a/scale_cron_gen.sh b/scale_cron_gen.sh index e7ef8a2..785ab44 100644 --- a/scale_cron_gen.sh +++ b/scale_cron_gen.sh @@ -7,11 +7,10 @@ mem=`sh /root/scaledown_check.sh | grep percent_memory_used | awk '{print $4}'` if awk -v ld=$load 'BEGIN {exit !(ld < 2)}' && awk -v mem=$mem 'BEGIN {exit !(mem < 30)}' then echo `date` "Autoscale load check: Scaling DOWN by 1 server!" - curl -X POST https://iad.autoscale.api.rackspacecloud.com/v1.0/execute/1/13aa6c05ca918b7f0cf6f04336176e4b2ba7359ab44f7f9b555a7a72b7d088b5/ 2> /dev/null + curl -X POST URLME 2> /dev/null else echo `date` "Autoscale load check: Not ready for scale down" fi -echo " Average sysload = $load - Average memory use = $mem %" - +echo " Average sysload = $load" +echo " Average memory use = $mem %"