lsof | grep LISTEN


vsftpd     1016     root    3u     IPv4       2893                 TCP *:ftp (LISTEN)
tnslsnr    4612   oracle   11u     IPv6      50931                 TCP *:ncube-lm (LISTEN)
tnslsnr    8824   oracle   11u     IPv6     101559                 TCP *:ricardo-lm (LISTEN)
sshd       9575     root    3u     IPv6   26352928                 TCP *:ssh (LISTEN)
sshd       9575     root    4u     IPv4   26352930                 TCP *:ssh (LISTEN)
mysqld    17209    mysql    4u     IPv4    2492178                 TCP *:mysql (LISTEN)
xinetd    17628     root    5u     IPv4   13022951                 TCP *:rsync (LISTEN)
xinetd    17628     root    6u     IPv4   13022952                 TCP *:time (LISTEN)





신고

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

아파치 모듈 확인하기  (0) 2012.12.12
로그 파일에 대해  (0) 2012.12.12
어떤 데몬과 연결되어 있는지 확인하기  (0) 2012.12.12
리눅스 이더넷  (0) 2012.12.08
ps 명령시 STAT설명  (0) 2012.12.07
whowatch 사용  (0) 2012.12.07

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
netstat -an | grep LISTEN

tcp        0      0 0.0.0.0:37                  0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:10000               0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:21                  0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:23                  0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:5432              0.0.0.0:*                   LISTEN
tcp        0      0 :::8000                     :::*                        LISTEN
tcp        0      0 :::22                       :::*                        LISTEN


신고

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

 httpd 를 확인하여 종료하기

root@www ~ [1.44 1.28]> ps -ef | grep httpd | grep -v grep
nobody    6570 25612  0 Dec04 ?        00:00:00 /usr/local/httpd2/bin/httpd -k start
nobody    6571 25612  0 Dec04 ?        00:00:00 /usr/local/httpd2/bin/httpd -k start
nobody    6572 25612  0 Dec04 ?        00:00:00 /usr/local/httpd2/bin/httpd -k start
nobody    9025 25612  0 Dec02 ?        00:00:00 /usr/local/httpd2/bin/httpd -k start
nobody    9026 25612  0 Dec02 ?        00:00:00 /usr/local/httpd2/bin/httpd -k start
nobody    9027 25612  0 Dec02 ?        00:00:00 /usr/local/httpd2/bin/httpd -k start
nobody    9028 25612  0 Dec02 ?        00:00:00 /usr/local/httpd2/bin/httpd -k start
nobody    9031 25612  0 Dec02 ?        00:00:00 /usr/local/httpd2/bin/httpd -k start
nobody   24980 25612  0 Dec02 ?        00:00:00 /usr/local/httpd2/bin/httpd -k start
root     25612     1  0 Jul25 ?        00:00:03 /usr/local/httpd2/bin/httpd -k start



pid 만 구한다.

root@www ~ [1.44 1.28]> ps -ef | grep httpd | grep -v grep | awk '{print $2}'
6570
6571
6572
9025
9026
9027
9028
9031
24980
25612

종료 시그널 9번을 이용하여 모두 종료한다.

root@www ~ [1.44 1.28]> ps -ef | grep httpd | grep -v grep | awk '{print $2}' | xargs kill -9


다시 확인해 보면 실행된것이 없다.
root@www ~ [1.44 1.28]> ps -ef | grep httpd | grep -v grep


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

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

#!/bin/sh
Email="xxx@xxx.com";
find /hosting/ -type d -and -name '.*' | grep -v ssh | grep -v .ncftp > /root/hostinghack.txt
find /hosting2/ -type d -and -name '.*' | grep -v ssh | grep -v .ncftp > /root/hosting2hack.txt
(
echo "-----------------------------------------------------------------------------------" && \
echo "오늘 날짜 입니다." &&
date && echo -e "\n"
echo "-----------------------------------------------------------------------------------" && \
echo "-hosting" &&
cat /root/hostinghack.txt && echo -e "\n"
echo "- hosting2" &&
cat /root/hosting2hack.txt && echo -e "\n") \
| mail -s " guk testserver: hack check" ${Email}
echo "done +";
exit 0;



메일온 결과:

-----------------------------------------------------------------------------------
오늘 날짜 입니다.
Tue Nov 27 14:32:45 KST 2012


-----------------------------------------------------------------------------------
-hosting
/hosting/oracle/app/product/11g/uix/cabo/jsLibs/.ade_path
/hosting/oracle/app/product/11g/oc4j/.patch_storage
/hosting/oracle/.oracle


- hosting2
/hosting2/oracle/app/product/11g/uix/cabo/jsLibs/.ade_path
/hosting2/oracle/app/product/11g/oc4j/.patch_storage
/hosting2/oracle/.oracle

신고

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