'분류 전체보기'에 해당되는 글 125건

  1. 2014.07.09 [LINUX] OS bit 수 확인 방법, ulimit
  2. 2014.06.16 Java Hashtable
  3. 2014.06.16 WebLogic StuckThreadMaxTime
  4. 2014.06.01 WLS SAF check Script
  5. 2014.05.15 Technical Architecture BaseLine
  6. 2014.05.15 File I/O java
  7. 2012.11.28 Springframework
  8. 2012.11.18 Google Hackfair
  9. 2012.11.18 Oracle OpenWorld 세미나
  10. 2012.10.11 오픈커뮤니티 기술세미나
2014. 7. 9. 15:53

1. getconf 명령으로 확인

   # getconf LONG_BIT


2. uname 명령으로 확인

    # uname -m

    # uname -a


3. /proc/cpuinfo 정보를 통해 확인

    # cat /proc/cpuinfo


4. ulimit, shell과 shell 이 실행한 프로세스에 대하여 시스템 상의 사용 자원을 제한할 수 있도록 해주는 명령어

    # ulimit -a

    # ulimit -c            // core file size

    # ulimit -d            // data seg size


5. /etc/security/limits/conf

 

6. Redhat Release 버젼 확인

    # cat /etc/redhat-release

'Study' 카테고리의 다른 글

Shell Script  (0) 2014.07.09
VMSTAT, SAR, MPSTAT, iostat 명령어를 이용한 서버 모니터링  (0) 2014.07.09
File I/O java  (0) 2014.05.15
Springframework  (0) 2012.11.28
Luke - 3  (0) 2012.10.05
Posted by 아도니우스
2014. 6. 16. 12:40

import java.util.*;

class MyHash {
  public static void main(String args[]) {

    Hashtable<String,String> capitalCity = new Hashtable<String,String>();

    capitalCity.put("미국", "워싱턴"); // 해쉬에 아이템을 넣는 작업
    capitalCity.put("오스트리아", "빈");
    capitalCity.put("프랑스", "Paris");


    // 해시 속의 아이템 1개를 화면에 출력하기
    System.out.println(capitalCity.get("프랑스")); // 출력 결과: Paris
  }
}


cf) http://mwultong.blogspot.com/

'Java' 카테고리의 다른 글

Hotspot JVM GC 방식  (0) 2014.12.09
[모델1] 간단한 로그인 시스템  (0) 2014.11.01
Path 클래스 사용하기  (0) 2014.10.01
singleton 패턴  (0) 2014.10.01
Heap 영역과 Stack 영역  (0) 2014.09.04
Posted by 아도니우스
2014. 6. 16. 12:26
<Error> <WebLogicServer> <BEA-000337> <[STUCK] Exe 
cuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy 
for "681" seconds working on the request "Http Request: /opensso/setup/setSetup 
Progress", which is more than the configured time (StuckThreadMaxTime) of "600" 
seconds. Stack trace: ...

이 오류는 WebLogic Server가 "Stuck Thread Max Time"의 기본값인 600초를 초과했기 때문에 발생합니다.

해결 방법: 구성자가 응답하지 않는 경우 해당 구성자를 다시 시작합니다. 또한 WebLogic Server “Stuck Thread Max Time” 값을 기본값인 600초에서 더 큰 값(예: 1200초)으로 설정하는 것이 좋습니다. WebLogic 콘솔을 사용하여 이 값을 변경합니다( base_domain > Environment > Servers > Admin Server > Configuration/Tuning).

cf) http://docs.oracle.com/cd/E19575-01/820-7089/ghudn/index.html

cf) http://docs.oracle.com/cd/E13222_01/wls/docs81/perform/WLSTuning.html#1142807 (WLS Performance & Tuning)

cf) http://help.adobe.com/en_US/enterpriseplatform/10.0/InstallWebLogic/WS1a95df6a070ac5e3-42b8626f12fbf1e384a-7ffe.html

08/03

1. AIT AIA Stuck Thread Max Time : 800s -> 1200s 변경

'Weblogic' 카테고리의 다른 글

JDBC Monitoring  (0) 2014.08.19
weblogic coherence  (0) 2014.08.19
weblogic status check  (0) 2014.08.18
WLS SAF check Script  (0) 2014.06.01
Technical Architecture BaseLine  (0) 2014.05.15
Posted by 아도니우스
2014. 6. 1. 15:15

1. checkSAF.py

#connect(userConfigFile='/home/aiaadm/Script/secure/userconfig.secure', userKeyFile='/home/aiaadm/Script/secure/userkey.secure', url='10.000.000.000:7011')
domainRuntime()
cd('ServerRuntimes/aiaSvr21/SAFRuntime/aiaSvr21.saf/Agents/SOMFSAFAgent-21')
count2=cmo.isPausedForForwarding()
cd('/')
cd('ServerRuntimes/aiaSvr41/SAFRuntime/aiaSvr41.saf/Agents/SOMFSAFAgent-41')
count4=cmo.isPausedForForwarding()
count_total = count2+count4
print '%d' % count_total
disconnect()
exit()

 

2. checkSAF.sh

#!/bin/sh

java -cp /app/weblogic/wlserver_10.3/server/lib/weblogic.jar weblogic.WLST checkSAF.py -skipWLSModuleSkanning

'Weblogic' 카테고리의 다른 글

JDBC Monitoring  (0) 2014.08.19
weblogic coherence  (0) 2014.08.19
weblogic status check  (0) 2014.08.18
WebLogic StuckThreadMaxTime  (0) 2014.06.16
Technical Architecture BaseLine  (0) 2014.05.15
Posted by 아도니우스
2014. 5. 15. 17:25

1. Heap Dump : jmap -dump:format=b,file=/app/domains/heapdump_aiaSvr21.hprof PID

2. Thread Dump : /app/jdk1.6.0_37/bin/jstack -l PID > /home/aiaadm/lala.dump

3. GC : jstat -gcutil h20 -t PID interval count

           jstat -gccapacity PID

'Weblogic' 카테고리의 다른 글

JDBC Monitoring  (0) 2014.08.19
weblogic coherence  (0) 2014.08.19
weblogic status check  (0) 2014.08.18
WebLogic StuckThreadMaxTime  (0) 2014.06.16
WLS SAF check Script  (0) 2014.06.01
Posted by 아도니우스
2014. 5. 15. 17:17

import java.io.BufferedReader;

import java.io.File;

import java.io.FileReader;

import java.io.FileWriter;

import java.io.IOException;

import java.util.ArrayList;


public class FileIO{

public static int flag = 0;

public static ArrayList arrFilelist = new ArrayList();


public static void saveToFile(ArrayList arrFilelist) throws IOException {

// TODO code application logic here

FileWriter writer = new FileWriter("D:\\BaseController.csv");

writer.append("Number"+","+"PATH"+","+"Inheretence\n");

try {

for (int i = 0; i < arrFilelist.size(); i++) {

writer.append((i+1)+(String)arrFilelist.get(i));

writer.append('\n');

System.out.println("파일쓰기 완료 : " + (i+1));

}

writer.flush();

} catch (IOException e) {

e.printStackTrace();

} finally{

writer.close();

}

}


public static int checkMatching(String location, String filename)

throws IOException {

// Open BufferReader with given filename

// BufferedReader reader = new BufferedReader(new FileReader(location + "" + filename));

BufferedReader reader = new BufferedReader(new FileReader(location + "\\" + filename));

String line = null;

int count = 0;


try {

flag = 0;

// Loop per every line

while ((line = reader.readLine()) != null) {

// Search the string ex)

// line.matches(".*extends BaseController.*")

if (line.matches(".*extends BaseController.*")) {

count++;

System.out.println(count);

flag = 1;

} else {

}

}

} catch (Exception e) {

e.printStackTrace();

} finally {

// Close BufferReader

reader.close();

}

return count;

}


public static void FileList(String location) throws IOException {

File file = new File(location);

System.out.println("Location:>" + location + "<");

// Get list of files

File[] fileList = file.listFiles();

// Filelist is null, it will stop.

if (file.listFiles() == null) {

System.out.println("Stop searching : filelist is null");

return;

}


try {

// Loop file list

System.out.println("\tFilelist Loop starting...");

for (int i = 0; i < fileList.length; i++) {

String filename = fileList[i].getName();

System.out.println("\t\tchecking file : [" + filename + "]");

if (fileList[i].isFile()) {

// Save file list into Array(ArrayList, HashMap, .... List )

System.out.println("\t\tFound a file :  [" + location + "\\"+ filename + "]");

if(filename.matches(".*Controller.*")){

int count = FileIO.checkMatching(location + "\\", filename);

if(count>=0){

arrFilelist.add("," + location + "\\" + filename + "," + count);

System.out.println(arrFilelist);

}

}


} else if (fileList[i].isDirectory()) {

System.out.println("\t\tFound a directory : [" + filename + "]");

if (!filename.equals(".svn")) {

FileList(location + "\\" + filename);

}

}

}

} catch (Exception e) {

e.printStackTrace();

} finally {

// Close File I/O

}

FileIO.saveToFile(arrFilelist);

//System.out.println("File override");

}


public static void main(String[] args) throws IOException {

// Open File I/O

String location = "C:\\BitOss\\Workspace\\OSS_PNA_WFM\\src\\main\\java\\com\\kt\\oss";

// Get list of file in certain(given) directory, Get filename

FileIO.FileList(location);

ExceptionChecking chk = new ExceptionChecking();

if (flag == 1) {

System.out.println("BaseController를 포함하는 파일입니다.\n");

}

}

}

'Study' 카테고리의 다른 글

VMSTAT, SAR, MPSTAT, iostat 명령어를 이용한 서버 모니터링  (0) 2014.07.09
[LINUX] OS bit 수 확인 방법, ulimit  (0) 2014.07.09
Springframework  (0) 2012.11.28
Luke - 3  (0) 2012.10.05
Lucene - 2  (0) 2012.10.05
Posted by 아도니우스
2012. 11. 28. 16:12

일반적인 클래스 호출

클래스내에 선언과 구현이 한 몸이기 때문에 다양한 형태로 변화가 불가

class Test1{            class Test2{          class Test3{
 void method             void method           void method
 { }                          { }                        { }
}                            }                           }

class Test{
 Test1 test1= new Test1();
 Test2 test2= new Test2();
 Test3 test3= new Test3();

 void Test(){
  test1.method();  // 
  test2.method();  // method 호출
  test3.method();  //
 }
}

 

인터페이스를 이용한 클래스 호출

클래스를 인터페이스와 구현클래스로 분리하였고,

구현클래스 교체가 용이하여 다양한 형태로 변화가 가능하지만 구현클래스 교체시 호출 클래스의 소스를 수정해야 함

 

 팩토리패턴을 이용한 클래스 호출 방식

class Factory{
 static Super createB(){           static Super createC(){           static Super createD(){   
  return new B();                      return new C();                      return new D();
 }                                          }                                          }

}

public class A{
 Super b1 = Factory.createB();                           // B클래스를 생성하고 있다는 문장이 안보이면서 B객체가 생성       
 Super c1 = Factory.createC();
 Super d1 = Factory.createD();

 void a(){
  b1.method();
  c1.method();
  d1.method();
 }
}

팩토리 방식은 팩토리가 구현클래스를 생성하므로 클래스는 팩토리를 호출하는 코드로 충분

구현클래스 변경시 호출클래스에는 영향을 미치지 않고, 팩토리로 수정

하지만 클래스에 팩토리를 호출하는 소스가 들어가야 하기 때문에 팩토리에 의존함을 의미

 

IoC를 이용한 클래스 호출 방식

팩토리패턴의 장점을 더하여 어떠한 것에도 의존하지 않는 형태로 구성이 가능

실행 시점에 클래스간의 관계가 형성이 됨

즉, 의존성이 삽입된다는 의미로 IoC를 DI(Dependency Injection) 라는 표현으로 사용

 

IoC 란?

먼저, Spring framework에서 IoC의 궁극적인 최종 목표는 결합도를 낮추는 것

결합도란 한 개의 객체가 다른 객체와 얼마나 연결고리가 강한가...

IoC란 간단하게 말하여 프로그램 제어 흐름 구조가 바뀌는 것

일반적으로, main() 같은 프로그램이 시작되는 지점에서 다음에 사용할 Object를 결정, 생성하고, 만들어진 Object 내의

메소드를 호출하는 반복; 각 Object는 프로그램 흐름을 결정하거나 사용할 Object를 구성하는 작업에 능동적으로 참여

하지만, IoC는 제어 흐름의 개념을 거꾸로 뒤집는다. Object는 자신이 사용할 Object를 스스로 생성하거나 선택하지 않는다.

자신이 어떻게 만들어지고 어디서 사용되는 알 수 없기때문에 모든 제어 권한을 자신이 아닌 다른 대상에게 위임

프로그램 시작을 담당하는 main()같은 엔트리 포인트를 제외하면 모든 Object는 이런 방식으로 위임받은 제어 권한을 갖는

특별한 Object에 의해 결정되어 만들어짐

IoC 용어 정리

spring framework - IoC container, application context를 포함해서 spring이 제공하는 모든 기능을 통칭

bean - 스프링에서 제어권을 가지고 직접 만들고 관계를 부여하는 Object,

자바빈, EJB 빈과 비슷한 Object 단위의 Application Component;

bean factory - 스프링의 IoC를 담당하는 핵심 컨테이너

빈의 등록/생성/조회/반환/관리, 보통은 bean factory를 바로 사용하지 않고 이를 확장한 application context를 이용

BeanFactory는 bean factory가 구현하는 Interface (getBean() 등의 메소드가 정의되어 있음)

application context - bean factory를 확장한 IoC 컨테이너

빈의 등록/생성/조회/반환/관리의 기능은 bean factory와 같지만, 여기에 spring 각종 부가 서비스를 추가로 제공

ApplicationContext는 application context가 구현해야 하는 interface이며, BeanFacotry를 상속

 

IoC 구현 방법

- DI(Dependency Injection) : 의존성 주입

각 계층 사이, 각 클래스 사이에 필요로 하는 의존 관계를 컨테이너가 자동으로 연결해주는 것

각 클래스 사이의 의존 관계를 빈 설정(Bean Definition) 정보를 바탕으로 컨테이너가 자동으로 연결해 주는 것

 

의존성 주입(DI) 간단한 예제

<bean id = "exampleBean" class ="examples.ExampleBean">

<property name = "beanOne"><ref bean="anotherExample"/></property>

<!-- setter injection using the neater 'ref' attribute -->

<property name = "beanTwo" ref = "yetAnotherBean"/>

<property name = "integerProperty" value="1"/>

</bean>

 

<bean id = "anotherExampleBean" class="examples.AnotherBean"/>

<bean id = "yetAnotherBean" class = "examples.YetAnotherBean"/>

 

public class ExampleBean {

private AnotehrBean beanOne;

private YetAnotherBean beanTwo;

private int i;

 

public void setBeanOne(AnoterBean beanOne)

this.beanOne = beanOne;

public void setBeanTwo(YetAnother beanTwo)

this.beanTwo = beanTwo;

public void setIntegerProperty(int i)

this.i = i;

}

'Study' 카테고리의 다른 글

[LINUX] OS bit 수 확인 방법, ulimit  (0) 2014.07.09
File I/O java  (0) 2014.05.15
Luke - 3  (0) 2012.10.05
Lucene - 2  (0) 2012.10.05
Lucene - 1  (0) 2012.10.04
Posted by 아도니우스
2012. 11. 18. 21:30

 

- 일시 : 2012년 11월 17일 토요일 오후 1시 ~ 오후 9시, 11월 18일 일요일 오전 10시 ~ 오후 5시

- 장소 : CNN the biz 강남 교육연수센터

- 내용 : 안드로이드, 크롬, App Engine 등 구글 기술을 활용한 작품 전시회

 

영상처리에서 자주쓰이는 Face Detection을 하여 OpenGL을 이용하여 얼굴에 입체감을 씌우는 Mask를 하였는데

Google API, Anroid API를 활용(developer.android.com)하여 제작;

영상처리에서는 Face Detection은 어렵게 구현하는 방법 중 하나인데, API를 활용하여 구현했다는 것을 보고 API 활용성을 느낌

 

## Productive Tool & framework 종류

- HTML / JAVASCRIPT

- CoffeeSCRIPT

- AngularJS

- Chrome dev tool 

그 중, 오늘 소개한 Angular JS Conference에 대해 들음

Angular JSopen-source JavaScript framework. Its goal is to augment browser-based applications with Model–View–Controller (MVC) capability, reduce the amount of JavaScript needed to make web applications functional.

 

간단한 HTML5 예제

<!doctype HTML>

<html>

<head>

</head>

<body>

<div>

<label>NAME;</label>

<input type = "text" placeholder=" Enter a name here">

<hi>Hello World</hi>

</div>

</body>

</html>

 

 

- Goole HackFair 참고사이트 : https://docs.google.com/spreadsheet/ccc?key=0AoXWR1-16M0WdGxaNkhNQW1HMTV3d2NGc1ItaHR5Wnc#gid=0

 

'Semina' 카테고리의 다른 글

Oracle OpenWorld 세미나  (0) 2012.11.18
오픈커뮤니티 기술세미나  (0) 2012.10.11
Posted by 아도니우스
2012. 11. 18. 21:02

Oracle Open World 세미나

일정 : 11월 15일 (09:00 ~ 17:00)

장소 : 삼성역 InterContinental 호텔

주제 : Oracle Exadata Database 와 Oracle Database 12c 등 신제품 소개

 

Oracle Exadata Database Machine(www.oracle.com/exadata)

(모든 데이터베이스 Applicatin을 위해 최적화된 사전 구성 시스템, Database 서버, Storage 서버 및 Network 구성)

느낀점 : 최근, BIG Data로 인한 증가된 Data를 높은 압축율로 효율적으로 관리하고 Backup 및 최적화된 Infra 구성으로 향상된 속도를 보장한다고 느꼈음 

 

그 중 가장, 기억에 남는 강의는 '오라클 가상화 전략 및 로드맵'이었는데

Oracle VM Server for x86을 이용한 서버 가상화이었는데, Oracle VM 장점으로는 기존 하드웨어 활용하여 활용률을 증가시킨다는 점이었다.

이외에도, 오라클에서도 Sun FS Storage Appliance(가상화 백업용)으로 효율적인 데이터베이스를 관리한다는 것이었다. 다만, Solution Package가 있는데, 시스템 구축 시간을 줄였다고 했지만, 실제로 어떻게 구축하는 과정하는 방법하기보다, 너무 홍보와 같은 영업쪽에 치중하는 것 같아 아쉬움이 남음

 

※ SaaS(Software As a Service), PaaS(Platform As a Service), IaaS(InfraStructure As as Service)

   위와 같은 개념이 많이 나오는데, Oracle 에서는 IaaS를 바탕으로 한 DIasS(Database, InfraStructure as a Service) 까지 제공하는 서비스를 출시(http://cloud.oracle.com)

'Semina' 카테고리의 다른 글

Google Hackfair  (0) 2012.11.18
오픈커뮤니티 기술세미나  (0) 2012.10.11
Posted by 아도니우스
2012. 10. 11. 13:46

을지로에 위치한 오픈커뮤니티 기술세미나 10월 10일날 참석.

 

19:30부터 시작이었는데, 10분 늦게 도착

예상보다 많은 사람들이 미리 와 있어,, 놀람(그 만큼, Spring 기술에 대해서 관심이 많다는 뜻)

오픈 소스를 바탕으로 하면서, MVC구조를 잘 정의하고 있기 때문에 활용가치가 높다.

처음 시작하기 전, 기본 예제 프로그램을 보여주었는데, 인터넷 쇼핑물 System 구현을 별 어려움이 설명하는 것에 놀랐다..

그리고, Spring Version. 업그레이드에 대한 홍보를 했고, 휴식시간이 끝난 후 Eclipse 환경에서 실전 TIP을 설명해주었다..

'Semina' 카테고리의 다른 글

Google Hackfair  (0) 2012.11.18
Oracle OpenWorld 세미나  (0) 2012.11.18
Posted by 아도니우스