summaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/scripts/docker_stats.sh
diff options
context:
space:
mode:
authordekstroza <dejan.kitic@ericsson.com>2018-05-03 16:47:08 +0100
committerMichael Lando <ml636r@att.com>2018-05-24 20:48:12 +0300
commit8352006ec9f5cf8574c83f80d1b5ecb24204abed (patch)
tree5a95b3b3f937f42e418821795660ffbfde1dc60b /sdc-os-chef/scripts/docker_stats.sh
parentdd275e87db8a7d573ff33a515207766ca4b78768 (diff)
Add support for running SDC using Docker on OSX
This patch adds support for running SDC on OSX. There are several OSX specific commands wrt to getting host IP address, mounting /etc/localtime and using / filesystem in run/build process Issue-ID: SDC-1297 Change-Id: I2da3ce13d7c254d06376c717ae22f2cb446c63bd Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'sdc-os-chef/scripts/docker_stats.sh')
-rwxr-xr-xsdc-os-chef/scripts/docker_stats.sh41
1 files changed, 0 insertions, 41 deletions
diff --git a/sdc-os-chef/scripts/docker_stats.sh b/sdc-os-chef/scripts/docker_stats.sh
deleted file mode 100755
index 1759569b63..0000000000
--- a/sdc-os-chef/scripts/docker_stats.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/bash
-
-FILE='/data/logs/docker_stats.out'
-FE_ID=`docker ps|grep sdc-front|awk '{print $1}'`
-BE_ID=`docker ps|grep sdc-back |awk '{print $1}'`
-
-echo `date` >> ${FILE}
-
-if [ ! -z "${FE_ID}" ]; then
- docker stats ${FE_ID} --no-stream >> /data/logs/docker_stats.out
-else
- echo "frontend Docker is down!!!" >> /data/logs/docker_stats.out
-fi
-
-if [ ! -z "${BE_ID}" ]; then
- docker stats ${BE_ID} --no-stream >> /data/logs/docker_stats.out
-else
- echo "backend Docker is down!!!" >> /data/logs/docker_stats.out
-fi
-
-echo "------------------------------------------" >> ${FILE}
-
-grep -v "^\-" ${FILE} |grep -v ^CONT| awk 'BEGIN {
- split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec",month)
- for (i in month) {
- month_nums[month[i]]=i
- }
-}
-/UTC/ {
- d=$6"-"$2"-"substr("00",0,2-length($3))$3"-"substr($4,0,5)
- next
-}
-/MiB/ {
- print $1" "d" "$3/1024" "$8
- next
-}
-/GiB/ {
- print $1" "d" "$3" "$8
- next
-}' > `echo ${FILE}|awk -F"." '{ print $1".csv"}'`
-