# lspci
02:00.0 SCSI storage controller: LSI Logic / Symbios Logic MegaRAID SAS 8208ELP/8208ELP (rev 08)

www.lsi.com -> SUPPORT -> Support Downloads By Product 에서 해당 제품 Management Toos 다운로드
(http://www.lsi.com/support/products/Pages/MegaRAID%20SAS%208208ELP.aspx)

# wget http://www.lsi.com/downloads/Public/Obsolete/Obsolete%20Common%20Files/4.00.16_Linux_MegaCli.zip
# unzip 4.00.16_Linux_MegaCli.zip 
# unzip MegaCliLin.zip 
# rpm -Uvh MegaCli-4.00.16-1.i386.rpm 
# /opt/MegaRAID/MegaCli/MegaCli64 -h
# /opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -aALL
# /opt/MegaRAID/MegaCli/MegaCli64 -PdList -aALL


* 가지고 있는 최신 버전 설치 (첨부파일 이용)
# tar xvfz MegaCli-8.00.40-1.tgz
# cd MegaCli-8.00.40-1
# rpm -Uvh MegaCli-8.00.40-1.i386.rpm 
# rpm -Uvh Lib_Utils-1.00-08.noarch.rpm 
# rpm -Uvh MegaCli-8.00.40-1.i386.rpm 

MegaCli-8.00.40-1.tgz

 

-------------------------------------------------------------------------------------
2012. 09. 27. 추가

1.
http://www.lsi.com/Search/Pages/results.aspx?k=MegaCLiKL 에서
MegaCLI로 나오는거 받음 (웹브라우저로)

2. 

unzip MegaCLI-8.04.52.zip 
cd MegaCLI-8.04.52

unzip MegaCliKL-Linux.zip 
rpm -Uvh Lib_Utils-1.00-08.noarch.rpm 
rpm -Uvh Lib_Utils2-1.00-01.noarch.rpm 
rm -f Lib_Utils-1.00-08.noarch.rpm
rm -f Lib_Utils2-1.00-01.noarch.rpm 
rm -f MegaCliKL-8.04.52-1.src.rpm
rm -f MegaCliKL

cd MegaCLI_Linux
unzip MegaCLI_Linux.zip 
cd MegaCLI_Linux
cd Linux-64/
chmod u+x MegaCli64 
./MegaCli64 -AdpAllInfo -aAll
./MegaCli64 -PdList -aALL

MegaCliKL-Linux.zip


MegaCLI_Linux.zip

Posted by 광장군
,
php cli 로 된 프로그램이 지나치게 시스템 리소스를 잡아먹는거 방지하기 위해 timeout을 거는 경우가 있는데,
실제로 적용이 잘 안됨

CLI SAPI max_execution_time은 0으로 하드코딩 되어 있기 때문인데,
이 경우 timeout 이라는 shell command를 이용해서 처리함

sleep.php

<?php

    define('_SLEEP', 5);


    for ($i = 0; $i < _SLEEP; $i++)

    {

        echo "{$i}\n";

        sleep(1);

    }

    exit(0);

?> 


timeout_test.php

<?php

set_time_limit(4);


for ($i = 0; $i < 3; $i++)

{

    echo "{$i}\n";

    sleep(1);

}


echo "-- S result --\n";

echo shell_exec('php ./sleep.php');

echo "-- E result --\n";


echo "{$i}\n";


exit(0);

?> 


timeout이 4초인데도 불구하고 전체 실행 다 됨 <= cli에서 set_time_limit() 안먹음
CLI SAPI max_execution_time은 0으로 하드코딩 되어 있음

$ php timeout_test.php 

0

1

2

-- S result --

0

1

2

3

4

-- E result --

3

$


아래와 같이 timeout라는 shell command를 이용해서 실행가능함
4초가 넘어가는 경우에는 프로세스를 kill 해버림

$ timeout 4 php timeout_test.php 

0

1

2

-- S result --

$



아래 두 명령으를 동시해 실행해 봤을때 timeout이 걸렸을때 자식프로세스(sleep.php)까지 같이 kill 함

$ timeout 5 php timeout_test.php 

0

1

2

-- S result --
$


$ ps -ef | grep php

kilim     3346 32307  0 15:28 pts/14   00:00:00 timeout 5 php timeout_test.php

kilim     3347  3346  0 15:28 pts/14   00:00:00 php timeout_test.php

kilim     3349  3347  0 15:28 pts/14   00:00:00 sh -c php ./sleep.php

kilim     3350  3349  1 15:28 pts/14   00:00:00 php ./sleep.php

$

$ ps -ef | grep php

$

 

'PHP' 카테고리의 다른 글

외부 접속 지연 timeout - default_socket_timeout  (0) 2012.01.31
Posted by 광장군
,
프로그램에서 외부 호스트 접속이 필요한 경우가 있는데, 이 경우 외부접속이 지속되면 해당 프로그램에 악영향을 주는 경우가 있다.

아래와 같이 default_socket_timeout을 설정해서 외부접속지연을 막을 수 있다.

http://test_host/sleep.php

<?php

    define('_SLEEP', 5);


    for ($i = 0; $i < _SLEEP; $i++)

    {

        echo "{$i}\n";

        sleep(1);

    }

    exit(0);

?>



default_socket_timeoue_test.php <= set enough time

<?php

ini_set('default_socket_timeout', 10);

echo "-- S result --\n";

$rFp = @fopen('http://test_host/sleep.php', 'r');

if ($rFp !== false)

{

    stream_set_timeout($rFp, 2);

    stream_set_blocking($rFp, 0);

    $sResult = fread($rFp, 4096);

    echo $sResult;

    fclose($rFp);

}

echo "-- E result --\n";


exit(0);

?>

$ php default_socket_timeoue_test.php 

-- S result --

0

1

2

3

4

-- E result --



default_socket_timeoue_test.php <= set NOT enough time

<?php

ini_set('default_socket_timeout', 2);

echo "-- S result --\n";

$rFp = @fopen('http://test_host/sleep.php', 'r');

if ($rFp !== false)

{

    stream_set_timeout($rFp, 2);

    stream_set_blocking($rFp, 0);

    $sResult = fread($rFp, 4096);

    echo $sResult;

    fclose($rFp);

}

echo "-- E result --\n";


exit(0);

?>

$ php default_socket_timeoue_test.php 

-- S result --

-- E result --



* 위와 같이 default_socket_timeout 을 설정하면 해당 시간안에 socket data 못받아오면 socket close 시킴

* 참고로 stream_set_timeout()은 cli에서는 안먹힘, 이와 유사하게 set_time_out()또한 cli에서는 안먹힘

'PHP' 카테고리의 다른 글

cli에서 set_time_out() 테스트  (0) 2012.01.31
Posted by 광장군
,
http://www.dbguide.net/db.db?cmd=view&boardUid=146599&boardConfigUid=9&categoryUid=216&boardIdx=129&boardStep=1

http://eureka7.com.ne.kr/MySQL_4_1_API/memory-use.html

http://blog.naver.com/PostView.nhn?blogId=ez_&logNo=140127665878

http://cyller.tistory.com/5

http://www.ssovi.com/zb/view.php?id=pds&page=2&sn1=&divpage=1&sn=off&ss=on&sc=on&select_arrange=name&desc=desc&no=459

http://pneuma08.tistory.com/21

http://translate.google.co.kr/translate?hl=ko&sl=en&tl=ko&u=http%3A%2F%2Fwww.mysqlperformanceblog.com%2F2006%2F05%2F30%2Finnodb-memory-usage%2F&anno=2

http://dev.paran.com/2011/07/01/mysql-innodb-storage-engine-benchmark/

http://allkr.springnote.com/pages/4324675

http://phiz.kr/624

http://opencode.co.kr/bbs/board.php?bo_table=mysql_tips&wr_id=59

http://blog.naver.com/youlcc74?Redirect=Log&logNo=150126774869

'MySQL' 카테고리의 다른 글

우분투에서 MySQL 커파일시 ./configure 에러 관련  (0) 2012.02.03
Posted by 광장군
,
NORTEL Alteon L4 - Real Server Group 설정시 클라이언트 세션 유지 방법

Real Port Metric 항목을 Hash 로 선택

Real IP를 한번 할당 받은 서버는 향후에도 계속 해당 서버에만 접속 


 

Posted by 광장군
,
dell PowerEdge 1950 서버에 windows server 2003 설치할때
raid 카드 드라이버 못잡아서 설치 안됨

아래 경로에서 OS 선택하고, category -> Systems Managerment 선택후
Dell-CD iso images : CD ISO - Installation and Server Managerment 다운로드 받아서
CD부팅후 OS 설치 진행하면 됨
Posted by 광장군
,
* areca 1212-1222 메뉴얼에 나오는 내용

High availability

• Global Hot Spares
A Global Hot Spare is an unused online available drive, which is
ready for replacing the failure disk. The Global Hot Spare is one
of the most important features that SAS RAID controllers provide
to deliver a high degree of fault-tolerance. A Global Hot Spare
is a spare physical drive that has been marked as a global hot
spare and therefore is not a member of any RAID set. If a disk
drive used in a volume set fails, then the Global Hot Spare will
automatically take its place and he data previously located on the
failed drive is reconstructed on the Global Hot Spare.
For this feature to work properly, the global hot spare must have
at least the same capacity as the drive it replaces. Global Hot
Spares only work with RAID level 1, 10, 3, 5, 6, 30, 50, or 60
volume set. You can configure up to three global hot spares with
SAS RAID controller.
The “Create Hot Spare” option gives you the ability to define
a global hot spare disk drive. To effectively use the global hot
spare feature, you must always maintain at least one drive that is
marked as a global spare.

• Hot-Swap Disk Drive Support
The SAS RAID controller chip includes a protection circuit that
supports the replacement of SAS/SATA hard disk drives without
having to shut down or reboot the system. A removable hard
drive tray can deliver “hot swappable” fault-tolerant RAID solutions.
This feature provides advanced fault tolerant RAID protection
and “online” drive replacement.
 
• Auto Declare Hot-Spare
If a disk drive is brought online into a system operating in degraded
mode, the SAS RAID controllers will automatically declare
the new disk as a spare and begin rebuilding the degraded
volume. The Auto Declare Hot-Spare function requires that the
smallest drive contained within the volume set in which the failure
occurred.
In the normal status, the newly installed drive will be reconfigured
an online free disk. But, the newly-installed drive is automatically
assigned as a hot spare if any hot spare disk was used
to rebuild and without new installed drive replaced it. In this
condition, the Auto Declare Hot-Spare status will be disappeared
if the RAID subsystem has since powered off/on.
Important:
The hot spare must have at least the same capacity as the
drive it replaces.
The Hot-Swap function can be used to rebuild disk drives in arrays
with data redundancy such as RAID level 1, 10, 3, 5, 6, 30,
50 and 60.

• Auto Rebuilding
If a hot spare is available, the rebuild starts automatically when
a drive fails. The SAS RAID controllers automatically and transparently
rebuild failed drives in the background at user-definable
rebuild rates.
If a hot spare is not available, the failed disk drive must be replaced
with a new disk drive so that the data on the failed drive
can be automatically rebuilt and so that fault tolerance can be
maintained.
The SAS RAID controllers will automatically restart the system
and rebuilding process if the system is shut down or powered off
abnormally during a reconstruction procedure condition.
When a disk is hot swapped, although the system is functionally
operational, the system may no longer be fault tolerant. Fault
tolerance will be lost until the removed drive is replaced and the
rebuild operation is completed.
During the automatic rebuild process, system activity will continue
as normal, however, the system performance and fault tolerance
will be affected.
 
• Adjustable Rebuild Priority
Rebuilding a degraded volume incurs a load on the RAID subsystem.
The SAS RAID controllers allow the user to select the rebuild
priority to balance volume access and rebuild tasks appropriately.
The Background Task Priority is a relative indication of how much
time the controller devotes to a background operation, such as
rebuilding or migrating.
The SAS RAID controller allows user to choose the task priority
(Ultra Low (5%), Low (20%), Medium (50%), High (80%)) to balance
volume set access and background tasks appropriately. For
high array performance, specify an Ultra Low value. Like volume
initialization, after a volume rebuilds, it does not require a system
reboot.

 

'Linux' 카테고리의 다른 글

파티션 UUID 확인 하는 방법  (1) 2012.02.17
awk IP주소 가져오기  (0) 2012.02.07
man 내용 파일로 저장하기  (0) 2012.02.02
GeoIP 업데이트  (0) 2011.12.29
리눅스/linux 에서 SSD TRIM 기능 작동되는지 확인 방법  (0) 2011.12.12
Posted by 광장군
,
[Active Perl 설치]

* ActivePerl-5.8.8 대 버전 설치해야함

* 그 이상 버전 설치하면 CRONw 설치 안됨

* ActivePerl은 http://downloads.activestate.com/ 에서 다운 가능하나 5.8.8 버전은 없음. 알아서 구해야함

* perl -v 해서 내용 안나오면, path 문제
  ; 내컴퓨터 환경설정에서 path 조정, (맨앞에 perl 패스 나온거 맨뒤로 옮기면 잘 적용되는 경우도 있음)


[CRONw 설치]

* http://cronw.sourceforge.net/ 에서 다운로드

* 압축 풀어서 원하는 디렉토리 복사

* CRONw 에 들어가서 perl installer.pl로 설치

* 에러나면 INSTALL.TXT에서 옵션 빼고 실행
  ; ppm install modules\Win32-Daemon.ppd
  ; ppm install modules\Test-Simple.ppd
  ; ppm install modules\Number-Compare.ppd
  ; ppm install modules\Attribute-Handlers.ppd
  ; ppm install modules\Text-Glob.ppd
  ; ppm install modules\File-Find-Rule.ppd
  ; ppm install modules\Date-Manip.ppd
  ; ppm install modules\Params-Validate.ppd
  ; ppm install modules\Log-Dispatch.ppd
  ; ppm install modules\Log-Log4perl.ppd
  ; ppm install modules\Log-Dispatch-FileRotate.ppd

* 관리도구 - 서비스에서 Cron Service 실행
  ; CRONw\logs\cronw.log에 에러 생김
  ; TEXT/Glob.pm을 못하는 에러인 경우
    CRONw\modules\Text-Glob.tar.gz 압축을 풀어 lib 밑에 있는 TEXT/Glob.pm을 그대로 Perl\site\lib에 넣고 다시 실행

* CRONw\crontab.txt에 원하는 명령어 설정
  ; ex) */5 * * * * taskkill /f /im natsvc.exe
Posted by 광장군
,

GeoIP 업데이트

Linux 2011. 12. 29. 10:35

# wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
# gzip -d GeoIP.dat.gz
# mv /usr/share/GeoIP/GeoIP.dat /usr/share/GeoIP/GeoIP.dat_`date +%Y%m%d` 
# mv GeoIP.dat /usr/share/GeoIP/
# /etc/rc.d/init.d/httpd stop
# /etc/rc.d/init.d/httpd start
# rm -f GeoIP.dat.gz


* 최신 데이터 :  http://geolite.maxmind.com/download/geoip/database/
Posted by 광장군
,
* hdparm -tT 디바이스명 [read 테스트에 유용]

예) office 박스 sata2

kilim@kilim-office:~$ sudo hdparm -tT /dev/sda


/dev/sda:

 Timing cached reads:   9206 MB in  2.00 seconds = 4605.83 MB/sec

 Timing buffered disk reads: 418 MB in  3.01 seconds = 138.81 MB/sec


예) office 박스 scsi

kilim@kilim-office:~$ sudo hdparm -tT /dev/sdb


/dev/sdb:

 Timing cached reads:   9582 MB in  2.00 seconds = 4793.16 MB/sec

 Timing buffered disk reads: 384 MB in  3.00 seconds = 127.90 MB/sec


예) test 박스 sata2

[root@ktest ~]# hdparm -tT /dev/sda


/dev/sda:

 Timing cached reads:   3440 MB in  2.00 seconds = 1720.15 MB/sec

 Timing buffered disk reads:  174 MB in  3.01 seconds =  57.88 MB/sec



* dd if=/dev/zero of=test_file bs=1M count=1000 [write 테스트에 유용]

예) office 박스 sata2

kilim@kilim-office:~$ sudo dd if=/dev/zero of=bing bs=1M count=1000

1000+0 레코드 들어옴

1000+0 레코드 나감

1048576000 바이트 (1.0 GB) 복사됨, 4.28471 초, 245 MB/초


예) office 박스 scsi

kilim@kilim-office:~/DATA$ sudo dd if=/dev/zero of=bing bs=1M count=1000

1000+0 레코드 들어옴

1000+0 레코드 나감

1048576000 바이트 (1.0 GB) 복사됨, 3.62881 초, 289 MB/초


예) test 박스 sata2

[root@ktest ~]# dd if=/dev/zero of=bing bs=1M count=1000

1000+0 records in

1000+0 records out

1048576000 bytes (1.0 GB) copied, 15.7895 seconds, 66.4 MB/s


Posted by 광장군
,