'개요 및 구성내용 등'에 해당되는 글 1건

  1. 2009.07.09 [JEUS] Jeus 시작하기,개요 및 구성내용 등
98..Etc/70.JEUS2009. 7. 9. 15:17
반응형

JEUS (Java Enterprise User Solution) 인터넷으로 각광 받고 있는 Java 기반으로 솔루션으로, 환경에서 어플리케이션을 운용하는 필요한 각종 서비스들을 제공해 주는 어플리케이션 서버이다.

JEUS 어플리케이션을 개발하고 실행할 있는 플랫폼 역할을 하면서, 트랜잭션 관리, 세션 유지, 부하 분산 다양한 기능을 제공할 뿐만 아니라, 계층화된 구조로 성과 기능 확장성이 우수해 비즈니스 로직을 손쉽고 효과적으로 구현할 있게 한다.

 

 

2.   JEUS 디렉토리 구조

2.1 전체 디렉토리 구조

JEUS 최초 설치하면 설치 지정된 디렉토리(JEUS_HOME) 다음과 같은 디렉토리가 생긴다.

 

 

각각의 디렉토리에 대한 설명은 다음에 계속한다.

 

2.2 bin 디렉토리

JEUS 실행, 모니터링 JEUS 운영에 관련된 스크립트 파일이 존재한다. Windows 경우에는 batch파일로 있으며, UNIX 경우에는 shell script파일로 되어 있다. 여기 있는 파일들 jeus.properties.bat(UNIX 경우: jeus.properties) 있는데 파일에는 JEUS실행에 필요한 각종 환경변수들이 설정되어 있다. 이를 제외한 나머지 실행파일들은 실행전에 항상 파일을 호출하여 환경변수를 적용하게 되어 있으므로 환경 변수의 수정이 필요한 경우에는 파일의 내용을 수정하면 된다.

 

2.3 client 디렉토리

EJB 등을 사용할 경우 client에서 사용하게 client모듈 등이 들어가게 되는 디렉토리이다. 일반적인 경우 사용하지 않는다.

 

2.4 config 디렉토리

운영시 사용하게 되는 모든 설정 파일들이 들어있는 디렉토리이다. 하위 디렉토리로 dtds디렉토리는 JEUS설정 파일의 모든 xml 대한 구조(dtd) 가지고 있는 디렉토리이고, hostname으로 되어 있는 디렉토리에 현재 운영과 관련된 모든 설정을 가지고 있다.

 

2.5 lib 디렉토리

디렉토리는 운영과 관련된 library들이 들어 있다. 아래에는 다음과 같이 3개의 디렉토리가 있다.

-          application: 개발시 필요한 library들을 넣어두는 디렉토리이다. Jar/zip형태의 파일을 넣어도 되고, package형태로 풀어놓아도 된다.

-          datasource: 디렉토리는 JDBC 혹은 각종 connector 위한 library 넣어두는 디렉토리이다. Jar/zip형태의 파일만 인식한다.

-          system: 디렉토리는 JEUS 엔진과 관련된 library들이 들어 있다.

위의 디렉토리들 개발 혹은 운영 필요한 라이브러리들은 application/datasource 넣어두면 된다. System 경우는 JEUS에서 사용하는 곳이므로 되도록이면 다른 파일들을 넣지 않는 것이 좋다.

 

2.6 license 디렉토리

라이센스가 들어가는 디렉토리이다. 최초 설치시(JEUS 4.2부터) 3개월간 사용할 있는 데모라이센스가 들어가 있다. 라이센스 파일은 license이다.

 

2.7 logs 디렉토리

JEUS 운영 남게 되는 각종 로그 파일이 쌓이게 되는 디렉토리이다. JEUS운영환경의 설정에 따라 내부에는 디렉토리나 파일들이 naming rule 따라 만들어지게 된다.

 

2.8 samples 디렉토리

각종 예제 프로그램들이 목록에 따라 들어가 있는 디렉토리이다.

 

2.9 webhome 디렉토리

최초 설치시 각종 샘플과 같은 각종 application들이 들어가 있는 디렉토리이다. 하위 디렉토리는 다음과 같은 것이 이다.

-          admin_home: browser 이용해 JEUS 제어하고자 필요한 프로그램들이 들어 있다. 이는 JEUS에서 사용하는 디렉토리이므로 건드리지 않는 것이 좋다.

-          ejb_home: EJB 필요한 jar파일이나 class 들어가는 디렉토리이다.

-          servlet_home: WEB application 들어가는 디렉토리이다.

-          ear_home: EAR application들이 들어가는 디렉토리이다.

이러한 디렉토리들은 유저의 필요에 따라(admin_home제외) 변경을 있다. 변경을 하고자 한다면 $JEUS_HOME/bin/jeus.properties.bat파일을 열어 관련된 환경변수를 수정하면 된다.

 

2.10 webserver 디렉토리

JEUS 기본적으로 포함되어 있는 Web Server(WebtoB light) 들어 있는 디렉토리이다.

 

2.11 workspace 디렉토리

JEUS 운영 내부적으로 사용하는 임시 디렉토리이다.

 

 

3.   JEUS 실행 구조

JEUS 크게 가지 형태의 process 운영된다고 있다.

하나는 manager process이고 나머지 하나는 container process이다.

첫째로 manager process container process 관리하는 역할과 clustering환경 구성 JEUS 상호간에 필요한 정보들을 주고 받는 process 개발 만들어진 각종 application과는 직접적인 관이 없다.

번째로 container프로세스는 개발자에 의해 개발된 application 실행시켜 주는 process이다.

이러한 구조를 그림으로 나타내면 다음과 같다.

 

 

그림에서처럼 manager process 자신에게 포함된 container들을 관리하는 역할과 물리적으로 떨어져 있는 서버의 다른 manager process 통신을 하면서 clustering환경을 유지하는 역할을 하게 된다.

Container process 하나의 서버에 여러 개가 존재할 있다. 또한 container process 여러 개의 engine 포함하게 된다. 이러한 engine 개발된 application 자신에게 해당하는 application 실행시켜주게 된다. 예를 든다면 EJB engine EJB프로그램을 Servlet engine WEB application 실행하게 되는 것이다. 이러한 container process 하나의 독립적인 process 동작하게 된다.

 

3.2 설정 파일

앞에서 JEUS 모든 설정 파일은 $JEUS_HOME/config 디렉토리에 존재한다고 했었다. Config 디렉토리의 구조를 살펴보면 다음과 같다. 아래 그림은 최초 설치 만들어져 있는 디렉토리이다.

 


앞에서도 간단히 설명을 했듯이 dtds 디렉토리는 xml 관련된 dtd파일이 들어 있는 곳이고, security 디렉토리는 JEUS운영 사용하게 되는 policy파일이 들어 있는 디렉토리이다.

나머지 hostname(그림에서는 ybsong_note)으로 되어 있는 디렉토리인데, 현재 JEUS 설치된 서버의 운영과 관련된 모든 설정들은 디렉토리에 들어 있다.

가장 먼저 살펴볼 파일은 hostname 디렉토리에 들어 있는 JEUSMain.xml파일이다.

참고로 운영을 위해 각종 설정 파일을 생성할 먼저 JEUSMain.xml파일을 만들게 되고, 파일의 구성에 따라 부수적으로 필요한 설정 파일을 만들어 설정을 하게 된다.

 

JEUS에서 가장 중요한 설정 파일로 가장 기본이 되는 설정으로 manager프로세스에 대한 설정이라고 보면 된다. 여기에는 어떠한 container프로세스가 있는지 container에는 어떠한 engine 들어 있는지에 대한 설정이 포함되어 있다. JEUS구동 시에도 가장 먼저 파일을 읽어 들인 설정에 따라 필요한 container process 실행시킨다고 생각하면 쉽게 이해될 것이다.

아래는 최초 설정 들어 있는 JEUSMain.xml 파일이다.

<?xml version="1.0"?>

<!DOCTYPE jeus-system PUBLIC "-//Tmax Soft, Inc.//DTD JEUS Main Config 4.0//EN"

                             "http://www.tmaxsoft.com/jeus/dtd/4.0/jeus-main-config.dtd">

<jeus-system>

    <node>

        <name>ybsong_note</name>

        <class-ftp>true</class-ftp>

        <sequential-start>true</sequential-start>

        <enable-webadmin>true</enable-webadmin>

        <system-log>

            <level>debug</level>

        </system-log>

        <engine-container>

            <name>container1</name>

            <engine-command>

                <type>servlet</type>

                <name>engine1</name>

                <startup-mode>xml</startup-mode>

            </engine-command>

            <engine-command>

                <type>ejb</type>

                <name>engine1</name>

                <startup-mode>xml</startup-mode>

                <deploy-mode>xml</deploy-mode>

            </engine-command>

            <tm-config>

                <pooling>

                    <min>10</min>

                    <max>20</max>

                    <step>2</step>

                    <period>600000</period>

                </pooling>

                <active-timeout>300000</active-timeout>

                <commit-timeout>120000</commit-timeout>

                <capacity>20000</capacity>

            </tm-config>

        </engine-container>

    </node>

</jeus-system>

아래에 중요한 개의 tag 대해 설명하였다.

-          node: 하나의 서버를 의미한다. 물리적인 하나의 서버를 의미한다고 봐도 무방하다. 내부에 engine-container tag 포함하고 있다.

-          engine-container: 앞에서 설명한 container process 의미한다. 여러 개를 가질 있으며 이는 여러 개의 container프로세스가 운영될 있음을 의미한다.

-          engine-command: 이는 앞에서 언급된 engine 의미한다. Type 따른 하는 운영되는 application 형태가 달라지게 된다.

위의 tag engine-container engine-command 적절히 조합하여 필요한 만큼의 container process engine 생성하면 된다. JEUSMain.xml 설정이 끝났다면 이젠 여기서 설정된 engine들에 대한 설정이 필요하게 된다.

참고로 Container process 대한 설정은 필요하지 않다. 이유는 Container process application 운영하는 기본 단위가 아니고 engine 기본 단위이므로 이들에 대한 설정만을 필요로 한다. 다시 말하면, container process 그대로 하나의 process 단위이며 engine 묶어주는 그룹의 개념만을 지니고 있으므로 JEUSMain.xml 내용만으로 이상의 설정은 필요 없는 것이다.

JEUSMain.xml 대한 자세한 설정은 JEUS Server 매뉴얼을 참조하면 된다.

 

3.4 engine 설정 파일

Engine 설정 파일은 engine 이름으로 디렉토리 아래에 존재하게 된다. Engine 이름을 붙이는 방법은 JEUS 내부의 naming rule 다음과 같이 JEUSMain.xml파일의 내용을 가지고 만들어지게 된다.

[hostname]_[engine tag type]_[engine tag name]

앞에서 보여진 JEUSMain.xml파일을 참고하면 다음과 같이 개의 engine이름이 존재하게 되는 것이다.

-          ybsong_note_ejb_engine1

-          ybsong_note_servlet_engine1

이렇게 engine 이름을 만들었다면 이러한 엔진을 위한 설정파일이 들어가게 되는 디렉토리를 만들어야 한다. 디렉토리는 바로 JEUSMain.xml 있는 디렉토리에 engine이름으로 디렉토리를 만들면 된다(앞에서 보인 config디렉토리의 구조에 관한 그림 참조).

engine 대한 설정 파일들은 모두 자신의 이름으로 디렉토리 안에 존재하게 되는 것이다. 또한 engine마다 필요한 설정 파일은 engine type 따라 달라지게 된다. Type 가지가 있다. 아래에 type 따른 설정 파일의 이름을 기술해 놓았다.

-          servlet type: WEBMain.xml

-          ejb type: EJBMain.xml

-          jms type: JMSMain.xml

이후에는 이들 가장 많이 사용하는 servlet ejb type 설정 파일에 대해 살펴본다.

 

3.5 servlet engine 설정 파일

앞에서 봤듯이 servlet type engine 설정 파일은 WEBMain.xml이다.

최초 설치 아래와 같은 설정 파일이 [hostname]_servlet_engine1 디렉토리에 들어 있다.

<?xml version="1.0"?>

<!DOCTYPE web-container PUBLIC "-//Tmax Soft., Inc.//DTD WEB Main Config 4.0//EN"

                               "http://www.tmaxsoft.com/jeus/dtd/4.0/web-main-config.dtd">

<web-container>

    <context-group>

        <group-name>MyGroup</group-name>

        <group-docbase>webapps</group-docbase>

        <session-config>

            <shared>true</shared>

            <timeout>20</timeout>

        </session-config>

        <logging>

            <error-log>

                <target>stdout</target>

                <level>information</level>

                <buffer-size>0</buffer-size>

            </error-log>

            <user-log>

                <target>file</target>

                <buffer-size>0</buffer-size>

            </user-log>

            <access-log>

                <target>file</target>

                <buffer-size>0</buffer-size>

                <valid-day>1</valid-day>

                <log-format>

                    <time-format>default</time-format>

                </log-format>

            </access-log>

        </logging>

        <context>

            <context-name>examples</context-name>

            <context-path>/examples</context-path>

        </context>

        <webserver-connection>

            <http-listener>

                <port>8088</port>

                <listener-id>http1</listener-id>

                <output-buffer-size>8192</output-buffer-size>

                <thread-pool>

                    <min>25</min>

                    <max>30</max>

                    <step>2</step>

                    <max-idle-time>1000</max-idle-time>

                </thread-pool>

            </http-listener>

        </webserver-connection>

    </context-group>

</web-container>

위의 파일 내용 개의 tag 아래에서 설명한다.

-          context-group: tag context 묶음을 의미한다. J2EE spec에서는 context 대해서만 기술되어 있다. JEUS에서 context group 개념을 사용하는 것은 세션 정보의 공유 등을 위해서 사용한다. 그대로 group 개념이므로 내부에 context tag 포함하고 있음을 있다. 참고로 context WEB application 단위로 생각하면 쉽게 이해할 있다. group-docbase group 물리적으로 존재하는 디스크 위치(디렉토리) 의미한다.

-          context: WEB application 단위이다. Context 설정에 따라 이에 따른 deployment descriptor(DD)파일이 하나씩 존재하게 된다. 파일의 위치는 WEBMain.xml 같은 위치이며 이름은 jeus-web-dd_[context_name].xml파일이다.

-          webserver-connection: servlet type engine WEB application 처리하는 engine이므로 web server와의 결을 담당하는 부분이 필요하게 된다. 이에 대한 설정을 하는 tag이다. 위에서는 http-listener 되어 있지만, 외에도 webtob-listener/apache-listener 등이 있다.
http-listener
다른 web server없이 JEUS자체적으로 HTTP 받아들이고자 경우 사용하고, webtob-listener 자체 web server WebtoB, apache-listener Apache와의 동을 위해 사용하면 된다.

아래에는 context마다 하나씩 존재하게 되는 DD파일을 표시하였다.

<?xml version="1.0"?>

<!DOCTYPE jeus-web-dd PUBLIC "-//Tmax Soft., Inc.//DTD JEUS WEB Deployment Info 4.0//EN"

                             "http://www.tmaxsoft.com/jeus/dtd/4.0/jeus-web-dd.dtd">

<jeus-web-dd>

    <context>

        <context-name>examples</context-name>

        <docbase>examples</docbase>

        <auto-reload>

            <enable-reload>true</enable-reload>

            <check-on-demand>true</check-on-demand>

        </auto-reload>

    </context>

</jeus-web-dd>

DD파일은 각각의 context 대한 설정을 나타낸다. Context-name WEBMain.xml 설정된 context-name 의미하고, docbase 디스크 상에서의 물리적인 위치다. Auto-reload 운영 프로그램이 수정될 경우 이를 바로 반영할지에 대한 여부를 나타낸다.

자세한 내용들은 JEUS Web Container매뉴얼을 참조하면 된다.

 

3.6 EJB engine 설정 파일

EJB type engine 설정 파일은 EJBMain.xml 파일이다.

최초 설치 포함된 EJBMain.xml파일은 다음과 같다.

<?xml version="1.0"?>

<!DOCTYPE ejb-engine PUBLIC "-//Tmax Soft, Inc.//DTD EJB Main Config 4.0//EN"

                            "http://www.tmaxsoft.com/jeus/dtd/4.0/ejb-main-config.dtd">

<ejb-engine>

    <enable-user-notify>false</enable-user-notify>

    <enable-interop>false</enable-interop>

    <system-log>

        <target>stdout</target>

        <level>debug</level>

    </system-log>

    <module-list>samples</module-list>

</ejb-engine>

위의 tag module-list engine 시작될 가지고 올라가야 EJB 모듈을 나열하는 tag이다.

EJB engine 경우 위와 같이 간단하다. 이는 EJB 경우 engine 설정보다는 EJB 구성하는데 필요한 ejb-jar.xml파일과 DD.xml 많은 내용들이 기술되어 있기 때문이다. 이들에 대한 내용은 개발과 관련된 부분이므로 JEUS EJB 매뉴얼 혹은 개발자 교재를 참조하면 된다.

 

 

4.   JEUS 구동 종료

4.1 JEUS console tool 이용한 구동 종료

JEUS 구동은 크게 가지 작업으로 나누어진다.

먼저 JEUS manager process(jeus명령어) 구동한 jeusadmin tool 이용해 manager 접속한 boot명령을 이용해 부팅을 하게 된다.

Manager 구동하면 다음과 같이 보여진다.

[c:\dmscm]#jeus

[ErrorMsgManager] Message Manager is initialized

[2004.04.29 14:28:08][0] [JeusServer] JEUSMain.xml is loaded

[2004.04.29 14:28:08][3] [LocalSecurityRealm] Loading File Realm from C:\Jeus42\config\ybsong_note\file-realm.xml

[2004.04.29 14:28:09][0] [JeusServer] JEUSMain.xml is loaded

[2004.04.29 14:28:09][0] [JeusServer] JMX Manager started

[2004.04.29 14:28:10][0] [JRSMAcceptThread] Exported Remote Security Provider at

 port 9743

[2004.04.29 14:28:10][0] [JeusServer] JeusServer is Ready

위와 같이 Ready 메시지가 나오면 manager 구동된 것이다. 다른 command창을 열러 jeusadmin [hostname] 명령을 주어 manager 아래와 같이 로그인 boot명령을 보내면 된다. ID/password 물어보게 되는데, 최초 설치 ID administrator이며 password 설치 입력한 값을 넣으면 된다.

[c:\dmscm]#jeusadmin ybsong_note

[ErrorMsgManager] Message Manager is initialized

[JeusCommander] Login

>administrator

[JeusCommander] Password

> 

[JeusCommander] JEUS 4.2 Jeus Manager Controller

ybsong_note>boot

[JeusCommander] ybsong_note boot done

ybsong_note_container1

ybsong_note>down

Do you really want to down whole JEUS? (y : n):y

[JeusCommander] ybsong_note down successful

ybsong_note>jeusexit

[JeusCommander] ybsong_note jeusexit successful

ybsong_note>exit

 

[c:\dmscm]#

위의 과정은 manager 로그인 boot명령을 통해 JEUSMain.xml 설정에 따라 container 올리는 작업과 down명령을 통해 내리는 작업을 순차적으로 나열한 것이다.

jeusexit명령어는 앞에서 띄워놓은 manager 종료시키는 작업을 수행한다. exit명령어는 jeusadmin tool 빠져나가는 명령어이다.

이와 같은 과정을 거쳐 JEUS 기동하고 내리는 작업을 완료하였다. 하지만 때에 따라서는 이러한 작업이 복잡하게 느껴질 있다. 편의를 위해 JEUS에서는 one-step으로 JEUS 구동하고 종료할 있는 방법을 제공한다. 아래와 같은 방법을 통하면 그러한 작업을 쉽게 있다.

구동 : jeus –xml –U[ID] –P[password]

종료 : jeusadmin [hostname] jeusexit –U[ID] –P[password]

 

4.2 JEUS GUI tool JManager 이용한 구동 종료

JManager GUI 이용해 JEUS 제어할 있도록 하는 tool이다. 실행하는 방법은 command창에서 jmanager라고 입력을 하면 된다. tool 이용해 부팅을 하기 위해서는 console 이용할 때와 마찬가지로 jeus명령어를 이용해 manager process 구동되어 있어야 한다.

JManager 구동하면 가장 먼저 다음과 같이 ID/password 물어보는 창이 보여진다.

 


로그인을 하면 다음과 같이 화면이 보여지게 된다.

 

 

위와 같이 화면이 나타나면 왼쪽 tree에서 hostname부분을 마우스 오른쪽 버튼을 눌러 나타나는 팝업 메뉴에서 boot 선택하면 된다. 종료를 때에는 down 선택하면 된다.

JManager 대한 자세한 내용은 JEUS GUI 매뉴얼을 참조하면 된다.

 

4.3 JEUS WEB tool 이용한 구동 종료

WEB tool browser 이용한 방법을 의미한다.

WEB tool 사용하기 위해서는 먼저 JEUSMain.xml 다음과 같이 설정이 되어 있어야 사용할 있다. JEUS 4.2 경우 설치 기본적으로 설정되어 있으므로 따로 설정할 필요는 없다.

<jeus-system>

    <node>

        <name>ybsong_note</name>

        <class-ftp>true</class-ftp>

        <sequential-start>true</sequential-start>

        <enable-webadmin>true</enable-webadmin>

        <system-log>

            <level>debug</level>

        </system-log>

        <engine-container>

Console tool 혹은 JManager 이용할 경우에는 jeus명령어를 통해 manager process 기동되어 있으면 사용할 있었으나, WEB tool 경우 boot명령까지 완료되어 있는 상태에서 사용할 있다. 이는 WEB tool 내부적으로 servlet engine 사용하기 때문이다. One-step 부팅을 이용하면 쉽게 사용할 있다.

먼저 부팅이 되어 있는 상태에서 다음과 같이 접속을 하면 ID/password 물어보는데, 이후부터는 JManager 비슷한 방법으로 사용을 하면 된다.

접속 URL: http://ip:9744/webadmin

IP JEUS 설치된 서버의 ip 말하며 9744 default port이다. 값은 환경변수에 따라 달라지는데, 기본적으로 JEUS_BASEPORT + 8번의 값을 사용한다. JEUS_BASEPORT $JEUS_HOME/bin/jeus.properties.bat파일에 설정되어 있다.

최초 브라우저를 이용해 접속을 하면 다음과 같은 화면이 보여지게 된다.

 

 

ID/password 입력한 로그인을 하면 다음과 같은 화면이 보여지게 된다.

 

 

 

이후부터는 직접 부팅과 다운 작업 설정의 변경, 모니터링과 같은 작업을 수행할 있다.

 

 

5.   container 추가

5.1 설정 파일을 직접 편집하는 방법

이는 3장에서 설명한 방법으로 직접 설정 파일을 편집하면 된다.

가장 먼저 편집해야 파일은 JEUSMain.xml 파일이다. 파일을 열어 engine-container tag 하나 만들면 된다. 쉽게 작업을 하려면 기존에 있는 engine-container tag copy & paste 필요한 부분들만 수정하면 된다. 수정이 필요한 부분은 engine-container/name tag name engine-command/name부분이다. 이를 수정하는 이유는 container 이름과 engine 이름이 중복되어 사용할 없기 때문이다.

JEUSMain.xml파일의 수정이 완료되었다면 그에 따라 engine 설정 파일을 만들어 주어야 한다. 역시 3장에서 설명한 것처럼 engine 이름에 따라 디렉토리를 만든 engine type 따른 설정 파일(WEBMain.xml, EJBMain.xml 혹은 JMSMain.xml) 만들어 준다. 역시 작업을 쉽게 하려면 기존에 있는 디렉토리 전체를 복사한 쉽게 설정 파일 필요한 부분만 수정을 하면 된다(ex: http-listener부분의 port 같은 부분).

 

5.2 WEB tool 이용하는 방법

여기서는 WEB tool 이용하는 방법에 대해서 설명한다. JManager 이용하는 방법에 대해서는 JEUS GUI tool 매뉴얼을 참조하면 된다.

 

 

위의 그림에서처럼 tree에서 hostname으로 아이콘을 마우스 오른쪽 버튼으로 클릭하면 팝업 메뉴가 나타나는데 여기서 Add container 선택하여 container 추가할 있다.

하지만 이렇게 Add container 경우 앞에서 설정 파일을 직접 편집할 때처럼 직접 많은 설정들을 해주어야 하므로 조금은 불편할 있다. 직접 편집을 복사해서 사용한 것처럼 WEB tool에서는 container 복제해주는 작업을 손쉽게 있는 기능이 있다. 이는 Clone container메뉴를 선택해서 사용하면 된다. 위의 그림에서 clone container 선택하면 아래와 같은 화면이 보여지게 된다.

 

 

위의 그림처럼 오른쪽 프레임에 가지 설정을 있는 화면이 보여진다. Source Engine Container 복제할 container 의미하며, Target Engine Container 만들어질 container 이름을 의미한다. 그리고 Target Engine engine 이름으로 사용할 이름을 말한다(여기서는 dmscm이라고 했으므로, ybsong_note_servlet_dmscm ybsong_note_ejb_dmscm 이라는 engine 만들어질 것이다).

또한 Instant Start 만들어진 container 바로 부팅할 것인지의 여부를 설정하는 것이다. 바로 부팅을 경우 포트의 충돌 등으로 인해 정상 동작하지 않을 있으므로 여기서는 선택을 하지 않도록 한다.

Clone버튼을 누르면 container 복사하는 작업이 수행된다.

 

 

위와 같이 성공했음을 보여주는 메시지가 나오고 왼쪽 tree hostname부분을 다시 클릭해보면, 아래 그림과 같이 개의 container 있음을 있다. 컬러로 보여지는 것은 현재 부팅되어 운영되고 있음을 나타내고, 흑백으로 보여지는 것은 설정은 되어 있으나 운영은 되고 있지 않음을 나타낸다.

이제 가지 수정 작업을 해야 하므로 수정이 필요한 container tree에서 선택한 보여지는 오른쪽 프레임의 상단 메뉴 Configuration 선택해 필요한 작업을 하도록 한다.

마우스로 필요한 곳들을 클릭하면서 필요한 설정을 변경하는 작업을 하면 된다.

 

 

6.   기타 console tool

6.1 jeusadmin 사용하기

jeusadmin tool manager 접속한 manager 제어하기 위한 tool이다. Container 부팅/다운, engine 부팅/다운 작업 등을 수행할 있다.

- jeusadmin <HostName>

/was>jeusadmin ybsong_note

[ErrorMsgManager] Message Manager is initialized

[JeusCommander] Login

>administrator

[JeusCommander] Password

> 

[JeusCommander] JEUS 4.0.4.9 Jeus Manager Controller

ybsong_note>

1) 현재 떠있는 엔진 목록보기

서버별로 설정에 따라 Engine Container 1 혹은 이상 구동 중이며, JVM 개의 Engine Container에는 servlet engine 혹은 EJB Engnine 구동 되고있다.

ybsong_note >allenglist

ybsong_note _servlet_engine1

ybsong_note _servlet_engine1

위와 같이 수행을 하게 되면 현재 구동중인 엔진의 목록을 있다. 또한 위의 엔진들을 booting / down 수도 있다. (help 명령어 참조)

방법 : starteng / downeng <engineName>

) starteng ybsong_note_servlet_engine1

   downeng ybsong_note_servlet_engine1

 

2) 현재 있는 Engine Container PID 목록보기

Engine Container 각각의 엔진을 담는 그릇과 같은 것으로 JVM 1개를 의미한다.

 

ybsong_note>allenglist

ybsong_note_servlet_engine1

ybsong_note_servlet_engine1

ybsong_note>pidlist

ybsong_note_container2 : 120782

ybsong_note_container1 : 58660

 

현재 운영중인 JVM 대한 PID할당 정보를 얻을 있으며, 또한 위의 Engine Container booting / down 수도 있다. (help 명령어 참조)

방법 : startcon / downcon <containerName>

) startcon ybsong_note_container1

   downcon ybsong_note_container1

 

6.2 webadmin 사용하기

webadmin tool servlet type 엔진을 관리하기 위한 console tool이다. 현재 servlet engine 모니터링 동적인 설정의 변경과 같은 작업을 수행할 있다.

- webadmin <engineName>

/was>webadmin ybsong_note_servlet_engine1

$ username : administrator

$ password : [ErrorMsgManager] Message Manager is initialized

-- Welcome to JEUS Web Container(v4.0.6.1) Admin --

 

$$1 [ybsong_note:engine1]

 

1) servlet engine 상태정보 보기(st명령)

 

$$1 [ybsong_note:engine1] st

[2003.11.14 14:52:55][0] [TMLinkManager] accept thread is started

[2003.11.14 14:52:55][0] [TMClient] TMClient initailized

[2003.11.14 14:52:55][1] [JNSLocal_] Try to connect to 192.168.21.5:9738

[2003.11.14 14:52:55][1] [JNSLocal_] Connected to JNSServer 192.168.21.5:9738

[2003.11.14 14:52:55][1] [JNSLocal_] Successfully started. (ID 192.168.21.5:37035)

        >>>>>>>> ybsong_note_servlet_engine1 <<<<<<<<

-- WebContainer [ybsong_note_servlet_engine1] --

< memory information >

VM Total Memory    = 134478336 Bytes

VM Free Memory     = 73117120 Bytes

 

< session information >

session clustering version : 2

number of local sessions : 11

number of remote sessions : 16 (active = 16, passivated = 0)

- primary session server name      : session1

- backup session server name       : null

- current session server name      : session1

- current session server is alive  : true

- current session server connections (total, used)  : 10, 0

 

< DBConnectionPool information >

[jdbc/dass] COM.ibm.db2.jdbc.app.DB2Driver

Total DB connections = 0, Free DB connections = 0

Init DB conns = 2, Max DB conns = 4, Increment rate = 1, Max idle time = -1

 

< WebtConnectionPool information >

-- ContextGroup [MyGroup] --

< thread information >

WebtobListener[webtob1] Current thread = 20, Wait Queue Count = 4, Max thread = 25

    webtob1-hth0(localhost:9900) [port: 9900] live connections = 20

HttpListener[WebListener1] Current thread = 10, Wait Queue Count = 0, Max thread = 20

 

< request information >

dass : request = 375, avgTime = 359 ms

 

Command is successfully achieved...

 

st 명령을 수행하게 되면 다음의 목록을 보여준다.

1)     해당 jvm 메모리 사용현황 : st –m

2)     DBConnectionPool 실시간 사용현황 : st –d

3)     Web Server와의 정보 : st –t

4)     설정한 Context 들어온 요청 count 평균처리시간 : st –r

5)     유지하고 있는 Session 객체의 개수 : st –s

위에서 주의 깊게 보아야 것은 다음과 같다.

1)     jvm 메모리 사용현황을 통하여 애플리케이션상의 Memory leak 현상이 없는지 파악하여야 한다. jvm 메모리 사용이 계속 증가하면 이를 의심해 보아야 한다.

2)     Session Information 통해서는 현재 login 통하여 들어와 있는 유저수를 있다.

* 보기 : st –i 1 –k 100  (1 간격으로 100 반복하여 수행하기)

 

2) 호출된 애플리케이션 정보보기

 

$$1 [ybsong_note:engine1] info

[2003.11.14 14:55:26][0] [TMLinkManager] accept thread is started

[2003.11.14 14:55:27][0] [TMClient] TMClient initailized

[2003.11.14 14:55:27][1] [JNSLocal_] Try to connect to 192.168.21.5:9738

[2003.11.14 14:55:27][1] [JNSLocal_] Connected to JNSServer 192.168.21.5:9738

[2003.11.14 14:55:27][1] [JNSLocal_] Successfully started. (ID 192.168.21.5:37115)

        >>>>>>>> ybsong_note_servlet_engine1 <<<<<<<<

<<< WebContainer Name: ybsong_note_servlet_engine1 >>>

#### ContextGroup : MyGroup

  #### Context : dass

    0:[/dass/jsp/KR/stock/9065input.jsp] <Ready> class: jeus_jspwork._dass._jsp._KR._stock._403_9065input, total_reqs: 2

    1:[/dass/jsp/KR/stock/0311input.jsp] <Ready> class: jeus_jspwork._dass._jsp._KR._stock._403_0311input, total_reqs: 5

    2:[/dass/jsp/KR/banking/0758output.jsp] <Ready> class: jeus_jspwork._dass._jsp._KR._banking._403_0758output, total_reqs: 4

    3:[/dass/jsp/KR/signon_output.jsp] <Ready> class: jeus_jspwork._dass._jsp._KR._403_signon_5foutput, total_reqs: 15

 

…(중략)

 

    52:[/dass/jsp/dassadmin/session/UserCount.jsp] <Ready> class: jeus_jspwork._dass._jsp._dassadmin._session._403_UserCount, total_reqs: 91

 

 

Command is successfully achieved...

 

ContextGroup안에 있는 Context 호출된 Application 호출 빈도수를 알아 있다. 이를 통해서 많이 호출되고 있는 Application 추출할 수가 있다.

* 보기 : info –i 1 –k 100  (1 간격으로 100 반복하여 수행하기)

 

3) application 수행 thread 상태보기

 

$$1 [ybsong_note:engine1] ti

[2003.11.14 14:57:56][0] [TMLinkManager] accept thread is started

[2003.11.14 14:57:56][0] [TMClient] TMClient initailized

[2003.11.14 14:57:56][1] [JNSLocal_] Try to connect to 192.168.21.5:9738

[2003.11.14 14:57:56][1] [JNSLocal_] Connected to JNSServer 192.168.21.5:9738

[2003.11.14 14:57:56][1] [JNSLocal_] Successfully started. (ID 192.168.21.5:37195)

        >>>>>>>> ybsong_note_servlet_engine1 <<<<<<<<

-- Thread State [webtob1-hth0(localhost:9900)] --

[webtob1-hth0(localhost:9900)-w0][waiting, wt=497100 ms]

[webtob1-hth0(localhost:9900)-w1][waiting, wt=554373 ms]

[webtob1-hth0(localhost:9900)-w2][waiting, wt=1446008 ms]

[webtob1-hth0(localhost:9900)-w3][waiting, wt=498939 ms]

[webtob1-hth0(localhost:9900)-w4][waiting, wt=1481884 ms]

…(중략)

[webtob1-hth0(localhost:9900)-w19][waiting, wt=499114 ms]

[total : 20    active : 0    idle : 20    blocked : 0    reconnecting : 0]

 

-- Thread State [WebListener1] --

[WebListener1-w0][waiting, wt=130521 ms]

[WebListener1-w1][waiting, wt=132761 ms]

[WebListener1-w2][waiting, wt=127836 ms]

…(중략)

[WebListener1-w9][waiting, wt=125673 ms]

[total : 10    active : 0    idle : 10    blocked : 0    reconnecting : 0]

 

Command is successfully achieved...

 

위의 정보를 통하여 현재 실시간으로 들어오고 있는 uri 정보를 수가 있다. 특히  rt(=run time)라는 수행시간정보를 통하여 해당 호출된 서비스가 waiting 빠졌는지, 처리가 얼마나 걸리고 있는지를 실시간으로 모니터링 있다. 만일 rt 시간이 비정상적으로 길어지거나, 모든 Thread 차서 여유 공간이 없다면, waiting 또는 hanging 현상을 의심해보고 Thread Dump 등을 통하여 원인을 찾도록 한다.

 

* 보기 : ti –i 1 –k 100  (1 간격으로 100 반복하여 수행하기)

 

$$1 [DS-CBS4:engine1] ti -a

[2003.11.14 15:03:46][0] [TMLinkManager] accept thread is started

[2003.11.14 15:03:46][0] [TMClient] TMClient initailized

[2003.11.14 15:03:46][1] [JNSLocal_] Try to connect to 192.168.21.5:9738

[2003.11.14 15:03:46][1] [JNSLocal_] Connected to JNSServer 192.168.21.5:9738

[2003.11.14 15:03:46][1] [JNSLocal_] Successfully started. (ID 192.168.21.5:37401)

        >>>>>>>> ybsong_note_servlet_engine1 <<<<<<<<

-- Thread State [webtob1-hth0(localhost:9900)] --

[webtob1-hth0(localhost:9900)-w0][waiting, 2003.11.14 14:49:39, wt=846868 ms][req=11, avgTime=488 ms, total=11][alive=true]

…(중략)

[webtob1-hth0(localhost:9900)-w19][waiting, 2003.11.14 14:49:37, wt=848882 ms][req=10, avgTime=715 ms, total=10][alive=true]

[total : 20    active : 0    idle : 20    blocked : 0    reconnecting : 0]

 

-- Thread State [WebListener1] --

[WebListener1-w0][waiting, 2003.11.14 15:02:41, wt=64660 ms][req=21, avgTime=318 ms, total=21][alive=true]

…(중략)

[WebListener1-w9][waiting, 2003.11.14 15:02:41, wt=64682 ms][req=21, avgTime=18 ms, total=21][alive=true]

[total : 10    active : 0    idle : 10    blocked : 0    reconnecting : 0]

 

Command is successfully achieved...

 

* ti –a 이용하여 요청을 처리한 건수 처리시간 평균을 보여준다.

출처 : Tong - jackie92님의 ◐ Web & WAS통

Posted by 1010