ps -ajx

STAT 설명

D: 중지할 수 없는 휴지상태
R: 실행 가능 상태
S: 휴지상태
T: 추적중 혹은 일시 중지상태
Z: 죽은(zombie ,defunct) 프로세스
W: 메모리에 상주하는 페이지 없음.
<: 높은 우선순위 프로세스
N: 낮은 우선순위 프로세스
L: 메모리 상의 잠겨진 페이지 가지고 있음.


신고

'서버관리' 카테고리의 다른 글

어떤 데몬과 연결되어 있는지 확인하기  (0) 2012.12.12
리눅스 이더넷  (0) 2012.12.08
ps 명령시 STAT설명  (0) 2012.12.07
whowatch 사용  (0) 2012.12.07
id, 홈디렉토리 리스트 만들기  (0) 2012.12.07
열려 있는 포트 확인하기  (0) 2012.12.06

WRITTEN BY
김병국
유용했던 자료를 기록해 두었습니다. 도움이 되시길~~~ Welcome! I started this blog as a way to give back to all of the other system administrators who have taught me something in the past. Writing these posts brings me a lot of enjoyment and I hope you fun

받은 트랙백이 없고 , 댓글이 없습니다.
secret

root@www /backup [0.00 0.00]> touch test.txt
10:49:58
root@www /backup [0.00 0.00]> vi !!:$
vi test.txt
10:50:18

root@www /backup [0.00 0.00]> cp test.txt test2.txt
10:51:28
root@www /backup [0.00 0.00]> vi !^
vi test.txt
10:51:35

저작자 표시 비영리 동일 조건 변경 허락
신고

WRITTEN BY
김병국
유용했던 자료를 기록해 두었습니다. 도움이 되시길~~~ Welcome! I started this blog as a way to give back to all of the other system administrators who have taught me something in the past. Writing these posts brings me a lot of enjoyment and I hope you fun

받은 트랙백이 없고 , 댓글이 없습니다.
secret

1. up 화살표를 이용한다.
2. !! 를 입력한다.
3. !-1 을 입력한다.
4. Ctrl + P 를 입력한다.( 엔터를 입력해야 실행된다.)

저작자 표시 비영리 동일 조건 변경 허락
신고

WRITTEN BY
김병국
유용했던 자료를 기록해 두었습니다. 도움이 되시길~~~ Welcome! I started this blog as a way to give back to all of the other system administrators who have taught me something in the past. Writing these posts brings me a lot of enjoyment and I hope you fun

받은 트랙백이 없고 , 댓글이 없습니다.
secret

출력되는것을 추적할 수 있다.

root@www ~> cat ps4.sh 
set -x 
echo " ps4 demo test"
ls -l /etc/ | wc -l
du -sh ~

출력을 보면 ++ 실행 명령이 나오고 다음줄에 출력결과가 나온다.
그런데 몇번째줄인지 표시가 되지 않는다.
root@www ~> ./ps4.sh
++ echo ' ps4 demo test'
ps4 demo test
++ ls -l /etc/
++ wc -l
218
++ du -sh /root
60M     /root



root@www ~> cat ps4_1.sh 
export PS4='$0.$LINENO+ '
set -x 
echo " ps4 demo test"
ls -l /etc/ | wc -l
du -sh ~

$0 : 스크립트 이름
$LINENO : 스크립트 명령의 현재 라인 위치

root@www ~> ./ps4_1.sh
../ps4_1.sh.3+ echo ' ps4 demo test'
ps4 demo test
../ps4_1.sh.4+ ls -l /etc/
../ps4_1.sh.4+ wc -l
218
../ps4_1.sh.5+ du -sh /root
60M     /root

저작자 표시 비영리 동일 조건 변경 허락
신고

WRITTEN BY
김병국
유용했던 자료를 기록해 두었습니다. 도움이 되시길~~~ Welcome! I started this blog as a way to give back to all of the other system administrators who have taught me something in the past. Writing these posts brings me a lot of enjoyment and I hope you fun

받은 트랙백이 없고 , 댓글이 없습니다.
secret

OMSA


 the Dell OpenManage Linux Repository.

 

설치 os: 

cat /etc/redhat-release 
CentOS release 5.8 (Final)

2.6.18-308.1.1.el5 i686

 

파티션 구성

Disk /dev/sda: 1499.2 GB, 1499212021760 bytes
255 heads, 63 sectors/track, 182268 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1288 10241437+ 83 Linux
/dev/sda3 1289 1543 2048287+ 82 Linux swap / Solaris
/dev/sda4 1544 182268 1451673562+ 83 Linux

Disk /dev/sdb: 1499.2 GB, 1499212021760 bytes
255 heads, 63 sectors/track, 182268 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 182268 1464067678+ 83 Linux

 

How to set up

Yum setup

 

  1. Set up the Dell OpenManage Repository at http://linux.dell.com/repo/hardware, like this:
    wget -q -O - http://linux.dell.com/repo/hardware/latest/bootstrap.cgi | bash

    Downloading GPG key: http://linux.dell.com/repo/hardware/latest/RPM-GPG-KEY-dell
    Importing key into RPM.
    Downloading GPG key: http://linux.dell.com/repo/hardware/latest/RPM-GPG-KEY-libsmbios
    Importing key into RPM.
    Write repository configuration
    Downloading repository RPM
    Installing repository rpm: http://linux.dell.com/repo/hardware/latest/platform_independent/rh50/prereq/dell-omsa-repository-2-5.noarch.rpm
    Installing yum plugins for system id
    Loaded plugins: fastestmirror
    Determining fastest mirrors
    * base: ftp.daum.net
    * extras: ftp.daum.net
    * updates: ftp.daum.net
    base | 1.1 kB 00:00 
    dell-omsa-indep | 1.9 kB 00:00 
    dell-omsa-indep/primary_db | 292 kB 00:01 
    dell-omsa-specific | 1.9 kB 00:00 
    dell-omsa-specific/primary_db | 292 kB 00:01 
    extras | 1.9 kB 00:00 
    extras/primary_db | 172 kB 00:00 
    updates | 1.9 kB 00:00 
    updates/primary_db | 862 kB 00:00 
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package yum-dellsysid.i386 0:2.2.27-4.12.1.el5 set to be updated
    --> Processing Dependency: smbios-utils-python >= 2.2.0 for package: yum-dellsysid
    --> Running transaction check
    ---> Package smbios-utils-python.i386 0:2.2.27-4.12.1.el5 set to be updated
    --> Processing Dependency: python-smbios = 2.2.27-4.12.1.el5 for package: smbios-utils-python
    --> Running transaction check
    ---> Package python-smbios.i386 0:2.2.27-4.12.1.el5 set to be updated
    --> Processing Dependency: libsmbios = 2.2.27-4.12.1.el5 for package: python-smbios
    --> Processing Dependency: python-ctypes for package: python-smbios
    --> Running transaction check
    ---> Package libsmbios.i386 0:2.2.27-4.12.1.el5 set to be updated
    ---> Package python-ctypes.i386 0:1.0.2-4.35.1.el5 set to be updated
    --> Finished Dependency Resolution

    Dependencies Resolved

    ===========================================================================================================================================================
    Package Arch Version Repository Size
    ===========================================================================================================================================================
    Installing:
    yum-dellsysid i386 2.2.27-4.12.1.el5 dell-omsa-indep 16 k
    Installing for dependencies:
    libsmbios i386 2.2.27-4.12.1.el5 dell-omsa-specific 1.5 M
    python-ctypes i386 1.0.2-4.35.1.el5 dell-omsa-specific 210 k
    python-smbios i386 2.2.27-4.12.1.el5 dell-omsa-specific 70 k
    smbios-utils-python i386 2.2.27-4.12.1.el5 dell-omsa-specific 63 k

    Transaction Summary
    ===========================================================================================================================================================
    Install 5 Package(s)
    Upgrade 0 Package(s)

    Total download size: 1.8 M
    Downloading Packages:
    (1/5): yum-dellsysid-2.2.27-4.12.1.el5.i386.rpm | 16 kB 00:00 
    (2/5): smbios-utils-python-2.2.27-4.12.1.el5.i386.rpm | 63 kB 00:00 
    (3/5): python-smbios-2.2.27-4.12.1.el5.i386.rpm | 70 kB 00:00 
    (4/5): python-ctypes-1.0.2-4.35.1.el5.i386.rpm | 210 kB 00:01 
    (5/5): libsmbios-2.2.27-4.12.1.el5.i386.rpm | 1.5 MB 00:02 
    -----------------------------------------------------------------------------------------------------------------------------------------------------------
    Total 208 kB/s | 1.8 MB 00:08 
    Running rpm_check_debug
    Running Transaction Test
    Finished Transaction Test
    Transaction Test Succeeded
    Running Transaction
    Installing : libsmbios 1/5 
    Installing : python-ctypes 2/5 
    Installing : python-smbios 3/5 
    Installing : smbios-utils-python 4/5 
    Installing : yum-dellsysid 5/5

    Installed:
    yum-dellsysid.i386 0:2.2.27-4.12.1.el5

    Dependency Installed:
    libsmbios.i386 0:2.2.27-4.12.1.el5 python-ctypes.i386 0:1.0.2-4.35.1.el5 python-smbios.i386 0:2.2.27-4.12.1.el5 
    smbios-utils-python.i386 0:2.2.27-4.12.1.el5

    Complete!
    Loaded plugins: dellsysid, fastestmirror
    No plugin match for: rhnplugin
    Cleaning up Everything
    Cleaning up list of fastest mirrors
    Done!


     
  2. Optional Install OpenManage Server Administrator:
    yum install srvadmin-all

     

 

실행
/opt/dell/srvadmin/sbin/srvadmin-services.sh start

접속확인:
https://아이피:1311

root 계정으로 접속함.

디스크 장애 복구는 아래 url 확인.


command line interface


root@backup /opt/dell/srvadmin/bin
05:37 PM 
root # ./omconfig storage -?

storage Set storage component properties.

The available command(s) are:

Command Description
adisk Supports array disk configuration commands. DEPRECATED: please use pdisk
pdisk Supports physical disk configuration commands.
vdisk Supports virtual disk configuration commands.
controller Supports controller configuration commands.
enclosure Supports enclosure configuration commands.
battery Supports battery configuration commands.
globalinfo Supports global storage configuration commands.
connector Supports connector configuration commands.
cachecade Supports cachecade(s) configuration commands.

Usage: omconfig <command...> [name=value...] ... [option...]

Valid command line options are:

-? Print available command(s) or command help.
-fmt <lst|xml> Format for output results, default is lst.
Where: lst List format.
xml Raw XML format.
-outc <file> Redirect output to file, delete old if exists.
OR
-outa <file> Redirect output to file, append to old if exists.
OR
Output may also be redirected using Operating System facilities (e.g. |more).

 

 

체크 명령:

/opt/dell/srvadmin/bin/omreport storage pdisk controller=0

 

아래 스크립트를 이용해서 체크하면 된다.

<?
$check =`/opt/dell/srvadmin/bin/omreport storage pdisk controller=0 | grep "^Status" | wc -l`;
//echo $check;
if(trim($check) ==6){
echo "pass";
}else{
 // 알림설정.
}
?>

저작자 표시 비영리 동일 조건 변경 허락
신고

WRITTEN BY
김병국
유용했던 자료를 기록해 두었습니다. 도움이 되시길~~~ Welcome! I started this blog as a way to give back to all of the other system administrators who have taught me something in the past. Writing these posts brings me a lot of enjoyment and I hope you fun

트랙백이 하나이고 , 댓글이 없습니다.
secret


보통은 아래처럼 되어 있다.
root@www /usr/local/src> echo $PS2
>

아래처럼 변경한다.
root@www /usr/local/src> export PS2="continue-> "

아래처럼 표시 된다.
root@www /usr/local/src> ls \
continue-> ls \
continue-> ls \


저작자 표시 비영리 동일 조건 변경 허락
신고

WRITTEN BY
김병국
유용했던 자료를 기록해 두었습니다. 도움이 되시길~~~ Welcome! I started this blog as a way to give back to all of the other system administrators who have taught me something in the past. Writing these posts brings me a lot of enjoyment and I hope you fun

받은 트랙백이 없고 , 댓글이 없습니다.
secret