태그 : hpux
2009/08/10   DB Size 구하기 (일별 체크)
2009/04/17   HPUX 메모리 사용량 확인하기 [2]
2008/11/27   Oracle RAC 와 HeartBeat ... [2]
DB Size 구하기 (일별 체크)
1. PM.sql (DB Size 구하는 sqlplus 명령어)
[SUTMS1:/oracle/tmp/db_size]$ cat dbsize.sql
select sum(bytes)/1024/1024 MB from dba_segments;
quit
* 결과물
[SUTMS1] /oracle/tmp/db_size]$ sqlplus '/as sysdba' @/oracle/tmp/db_size/dbsize.sql

SQL*Plus: Release 10.2.0.4.0 - Production on Mon Aug 10 14:59:47 2009

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options


        MB
----------
203063.188

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[SUTMS1] /oracle/tmp/db_size
]$
2. crontab 에서 돌아갈 스크립트
[SUTMS1:/oracle/tmp/db_size]$ cat run.sh
date >> /oracle/tmp/db_size/dbsize.txt
sqlplus '/as sysdba' @/oracle/tmp/db_size/dbsize.sql | head -n 15 | tail -1 >> /oracle/tmp/db_size/dbsize.txt
3. cron job
[dbtms1:/]# crontab -l (ROOT USER)
00 6 * 8 * su - oracle -c "/oracle/tmp/db_size/run.sh"

하루에 한번 06시에 DB size 구해서 dbsize.txt 에 추가(add)하는 스크립트 && cron job
by 까나리 | 2009/08/10 14:58 | 시스템 | 트랙백 | 덧글(0)
HPUX 메모리 사용량 확인하기

# glance -> m 메모리 확인
Sys Mem  :   1.7gb   User Mem:   3.3gb   Phys Mem :   7.9gb
Buf Cache:   2.8gb   Free Mem:   105mb   FileCache:      na

현재 물리적인 메모리 8GB
- 시스템 1.6GB + 유저 3.3GB
- 버퍼캐쉬 2.8GB + 프리 0.1GB (사용가능한 메모리량)
hostname1:/]vmstat 2 5
         procs           memory                   page                         
    r     b     w      avm    free   re   at    pi   po    fr   de    sr     in
    1     0     0   773581   27051  127   27     0    0     0    0     0
    1     0     0   773581   27895   78   12     1    0     0    0     0 
    1     0     0   738741   27713   79   12     0    0     0    0     0  
    1     0     0   738741   27713   82   12     0    0     0    0     0 
    1     0     0   738741   27713   75   12     0    0     0    0     0 
 
* HPUX kernel page size 확인
hostname1:/]dmesg | grep page
    physical page size = 4096 bytes, logical page size = 4096 bytes

4K 임
     memory   
   avm    free
773581   27051
773581   27895
738741   27713
738741   27713
738741   27713

이 부분에서 보면 avm 과 free 단위는 page 4K 로 곱하면
avm = 2.95GB
free = 0.1GB 로 확인됨
 
현재 3기가 여유있으므로 부족한 상황은 아님.
by 까나리 | 2009/04/17 11:21 | 시스템 | 트랙백 | 덧글(2)
Oracle RAC 와 HeartBeat ...
오늘, 어제 오라클 DB 가 갑자기 오전 9시 30분에 죽었다는 소리를 전해들었다. 그것 때문에 오라클 엔지니어가 왔다갔는데, ServiceGuard 구성되어있는 수퍼돔 시스템에서 heartbeat 가 타임아웃 났다는 소리다. 바로 syslog.log 와 event.log 파일을 뒤져봤으나 그 시간대에 link down 이나 link up 이 일어나지 않았었다. 물론 heart beat 간에는 CAT.6 cross cable 로 연결되어있다.

< 우선 오라클 트레이스 로그 >
*** 2008-11-26 09:31:28.414
I'm the master node
Timeout when connecting to node 1 [status=5]
Timeout when connecting to node 1 [status=5]
Timeout when connecting to node 1 [status=5]
Timeout when connecting to node 1 [status=5]
kjzcpchk: open connection to node 1 failed for 3 retries
kjzgmapbcast:error encounter when broadcasting
DIAG attached to DLM
*** 2008-11-26 09:31:42.137
Timeout when connecting to node 1 [status=5]
Timeout when connecting to node 1 [status=5]
Timeout when connecting to node 1 [status=5]
Timeout when connecting to node 1 [status=5]
kjzcpchk: open connection to node 1 failed for 3 retries
kjzgmapbcast:error encounter when broadcasting
*** 2008-11-26 09:31:53.967
Timeout when connecting to node 1 [status=5]
Timeout when connecting to node 1 [status=5]
Timeout when connecting to node 1 [status=5]
Timeout when connecting to node 1 [status=5]
kjzcpchk: open connection to node 1 failed for 3 retries
kjzgmapbcast:error encounter when broadcasting
*** 2008-11-26 09:32:06.387
Timeout when connecting to node 1 [status=5]
Timeout when connecting to node 1 [status=5]
A rcfg proposal from node 1 is received
*** 2008-11-26 09:32:10.538
Reconfiguration completes [incarn=3]

이러니까 오라클 RAC 권장사항은, Heartbeat 전용 Switch 를 두고 NIC 도 bonding 으로 2장을 묶어서 쓰면 이런 문제가 없어진다고 한다. 현재 NIC 3장을 사용하고 있고 lan0와 lan1 은 묶어서 사용하고, lan2 는 heart beat 용으로 사용하고 있다. 다시한번 이런 문제가 발생하면 그 때 NIC 2장, 전용 Switch 를 구입하는걸로 얘기를 하자고 했는데, 어째서 시스템에서 아무런 메시지가 발생하지 않았는데 저런 조치를 취해야 하는지 의문이다. 누구 잘못일까???
by 까나리 | 2008/11/27 15:58 | 시스템 | 트랙백 | 덧글(2)
◀ 이전 페이지 다음 페이지 ▶