浏览代码

HUE-2687 [core] Add hue_collect_data.sh to collect data and license info to mem scripts

Chris Conner 10 年之前
父节点
当前提交
cd80ffb17c

+ 2 - 2
tools/memory_monitor/hue_mem_cron.sh

@@ -30,8 +30,8 @@ ROTATE_SIZE=10 #MB before rotating, size in MB before rotating log to .1, we onl
 
 
 main()
 main()
 {
 {
-#  Command to get memory usage.  This will handle multiple Hue instances per server, so 
-#  this command grabs the highest memory Hue process at the time of running and 
+#  Command to get memory usage.  This will handle multiple Hue instances per server, so
+#  this command grabs the highest memory Hue process at the time of running and
 #  kills it.  Then the next run it'll get the next process.
 #  kills it.  Then the next run it'll get the next process.
 PS_COMMAND=`ps aux | grep [r]uncherrypyserver | awk '{print $6" "$2" "$3" "$12}'`
 PS_COMMAND=`ps aux | grep [r]uncherrypyserver | awk '{print $6" "$2" "$3" "$12}'`
 MEM=`echo ${PS_COMMAND} | awk '{print $1}'`
 MEM=`echo ${PS_COMMAND} | awk '{print $1}'`

+ 1 - 1
tools/memory_monitor/hue_mem_cron_cm.sh

@@ -81,7 +81,7 @@ do
       MEM=`echo ${LINE} | awk '{print $3}' | awk -F, '{print $1}'`
       MEM=`echo ${LINE} | awk '{print $3}' | awk -F, '{print $1}'`
       MEM=`printf "%.f" $MEM` # convert from scientific to decimal
       MEM=`printf "%.f" $MEM` # convert from scientific to decimal
       MEM_MB=`expr ${MEM} / ${MB_BYTES}`
       MEM_MB=`expr ${MEM} / ${MB_BYTES}`
-      debug "${DATE} - ROLENAME: ${ROLENAME} - MEM: ${MEM} - MEM_MB: ${MEM_MB}" 
+      debug "${DATE} - ROLENAME: ${ROLENAME} - MEM: ${MEM} - MEM_MB: ${MEM_MB}"
       if [ ${MEM_MB} -gt ${KILL_ME} ]
       if [ ${MEM_MB} -gt ${KILL_ME} ]
       then
       then
          echo "${DATE} - Restart the Hue Process: Too much memory: ${MEM_MB} : ROLENAME: ${ROLENAME}" >> ${LOG_FILE}
          echo "${DATE} - Restart the Hue Process: Too much memory: ${MEM_MB} : ROLENAME: ${ROLENAME}" >> ${LOG_FILE}

+ 3 - 3
tools/troubleshooting/hue_collect_data.sh

@@ -16,8 +16,8 @@
 # limitations under the License.
 # limitations under the License.
 
 
 #NOTE: This script requires curl, strace and lsof to be installed. It
 #NOTE: This script requires curl, strace and lsof to be installed. It
-# must be run on the Hue server. Set HUE_USER to a user in Hue with 
-# Superuser access to get thread dumps.  Set HUE_PASSWORD to HUE_USER's 
+# must be run on the Hue server. Set HUE_USER to a user in Hue with
+# Superuser access to get thread dumps.  Set HUE_PASSWORD to HUE_USER's
 # password.
 # password.
 
 
 # Location for output files
 # Location for output files
@@ -121,7 +121,7 @@ do
 done
 done
 
 
 mkdir ${OUTPUT_DIR}/logs
 mkdir ${OUTPUT_DIR}/logs
-cp -pr ${HUE_LOG_DIR}/* ${OUTPUT_DIR}/logs 
+cp -pr ${HUE_LOG_DIR}/* ${OUTPUT_DIR}/logs
 
 
 echo "Collecting done, please zip ${OUTPUT_DIR} and upload to the ticket"
 echo "Collecting done, please zip ${OUTPUT_DIR} and upload to the ticket"
 }
 }