Nov 1, 2017 - scouter_apm_spring_boot


-Dscouter.config="E:\\scouter\\agent.java\\conf\\scouter.conf" -javaagent:"E:\\scouter\\agent.java\\scouter.agent.jar"

vm arguments에 설정 필요

Aug 24, 2017 - jenkins_ssh_deploy

sh /data/recommend/spring-boot.sh stop
rm -rf /data/recommend/recommend.jar
cp /data/recommend/$BUILD_ID/recommend.jar /data/recommend/
sh /data/recommend/spring-boot.sh start 8080


#!/bin/sh
SERVICE_NAME=recommend
PATH_TO_JAR=/data/recommend/recommend.jar
PID_PATH_NAME=/tmp/recommend-pid_$2
case $1 in
    start)
        echo "Starting $SERVICE_NAME ..."
        if [ ! -f $PID_PATH_NAME ]; then
            /usr/local/jdk1.8.0_121/bin/java -jar -Dspring.profiles.active=$3 -Dserver.port=$2 -Dscouter.config=/data/scouter/agent.java/conf/scouter.conf -Dobj_name=recommend_$2 -javaagent:/data/scouter/agent.java/scouter.agent.jar -Xms2048m -Xmx3072m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC $PATH_TO_JAR /tmp 2>> /dev/null >> /dev/null &
                        echo $! > $PID_PATH_NAME
            echo "$SERVICE_NAME started ..."
        else
            echo "$SERVICE_NAME is already running ..."
        fi
    ;;
    stop)
        if [ -f $PID_PATH_NAME ]; then
            PID=$(cat $PID_PATH_NAME);
            echo "$SERVICE_NAME stoping ..."
            kill $PID;
            echo "$SERVICE_NAME stopped ..."
            rm $PID_PATH_NAME
            rm -rf /tmp/*.$2

        else
            echo "$SERVICE_NAME is not running ..."
        fi
    ;;
    restart)
        if [ -f $PID_PATH_NAME ]; then
            PID=$(cat $PID_PATH_NAME);
            echo "$SERVICE_NAME stopping ...";
            sudo kill $PID;
            echo "$SERVICE_NAME stopped ...";
            sudo rm $PID_PATH_NAME
            sudo rm -rf /tmp/*.$2
            echo "$SERVICE_NAME starting ..."
            /usr/local/jdk1.8.0_121/bin/java -jar -Dspring.profiles.active=$3 -Dserver.port=$2 -Dscouter.config=/data/scouter/agent.java/conf/scouter.conf -Dobj_name=recommend_$2 -javaagent:/data/scouter/agent.java/scouter.agent.jar -Xms2048m -Xmx3072m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC $PATH_TO_JAR /tmp 2>> /dev/null >> /dev/null &
                        echo $! > $PID_PATH_NAME
            echo "$SERVICE_NAME started ..."
        else
            echo "$SERVICE_NAME is not running ..."
        fi
    ;;
esac

#참고자료 http://hreeman.tistory.com/m/136

Jul 21, 2017 - dgding javascript lesson2

Data type?

메모리는 스위치에서 -> 스위치를 온오프 하는 형태로 비트가 늘어 날수록 2의 승만큼으로 늘어남

8비트 0~255 표현 가능

8비트단위로 묶어서 1바이트(스위치 8개가 있음 됨)

2바이트는 16비트(한번에 메모리에 값을 쓸수있는양)

메모리의 특성 값과 위치(주소)

변수는 메모리의 크기와 위치

변수가 차지하는 메모리의 크기가 데이터 타입