Skip to content

Commit

Permalink
Logging spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
Rocco Muscaritolo authored and Rocco Muscaritolo committed Apr 3, 2014
1 parent 102a63c commit f52f267
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
9 changes: 4 additions & 5 deletions scale_cron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 %"
7 changes: 3 additions & 4 deletions scale_cron_gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 %"

0 comments on commit f52f267

Please sign in to comment.