2020년 12월 21일 월요일
2020년 9월 10일 목요일
xm console enter and exit
2020년 9월 3일 목요일
How to get the DRAC IP address from the localhost
I believe what you're looking for is this:
[root]# racadm getniccfg
NIC Enabled = 1
DHCP Enabled = 0
IP Address = 192.168.0.120
Subnet Mask = 255.255.255.0
Gateway = 192.168.0.1
(Note, above settings are the defaults for DRAC)
How to find ILO IP address of HP server running on Linux
To find ILO ip address we need hponcfg tool which can be installed using following package “hponcfg-4.3.0-0.x86_64”
using following command you can get ILO IP address
hponcfg -w /tmp/ilo.out
cat /tmp/ilo.out
2020년 9월 1일 화요일
How to specify the MAC addresses for LLT interfaces in a cluster.
LLT node information:
Node State Link Status Address
* 0 systemA OPEN
ce4 UP 00:14:4F:44:88:51
ce10 UP 00:14:4F:67:6E:BB
1 systemB OPEN
ce4 UP 00:14:4F:67:5B:ED
ce10 DOWN 00:14:4F:44:88:1F
2020년 8월 31일 월요일
tsr log linux
- To collect the system information data.
racadm supportassist collect -t Sysinfo
- To collect the filtered data.
racadm supportassist collect -t Debug –filter
- To collect the data and export to a NFS network share:
racadm supportassist collect -t SysInfo,TTYLog -l 10.94.161.103:/supportassist_share
- To collect the data and upload to the Dell support assist server.
racadm supportassist collect -t Sysinfo -upload
- To collect the data and export to a local share. This is allowed only from a remote or a local RACADM.
racadm supportassist collect -t ttylog -f tsr.zip
- To collect the data and export to a remote share as well as to the Dell support assist server.
racadm supportassist collect -t Debug -l //192.168.10.24/share -u myuser -p mypass -upload
- To export the last collected SupportAssist data, to a CIFS share
racadm supportassist exportlastcollection -l //192.168.10.24/share -u myuser -p mypass
- To export the collected SupportAssist data to a CIFS or NFS share. The default share details must be updated for this command to work.
racadm supportassist exportlastcollection
- To accept the End User License Agreement (EULA).
racadm supportassist accepteula
- To check the End User License Agreement (EULA) status.
racadm supportassist geteulastatus
- To register the iDRAC for SupportAssist features.
racadm supportassist register -pfname micheal -plname dell -pmnumber 9999988888 -panumber 8888899999 -pmailid micheal_dell@dell.com -sfname sourav -slname ganguly -smnumber 9999977777 -sanumber 7777799999 -smailid sourav_ganguly@dell.com -company dell -street1 bagmanetechpark -street2 cvramannagar -city bangalore -state karnataka -country india -zip 560093
- To upload the last collection to the Dell SupportAssist server.
racadm supportassist uploadlastcollection
- To expose the iSM installer to the host OS for the iSM installation.
racadm supportassist exposeisminstallertohostos
- To Schedule auto collection of SupportAssist data weekly.
racadm supportassist autocollectscheduler create -time 4:05am -dow sunday -rp weekly
- To schedule auto collection of the SupportAssist data monthly.
racadm supportassist autocollectscheduler create -time 7:55pm -dom 20 -rp monthly
- To schedule auto collection of the SupportAssist data quarterly.
racadm supportassist autocollectscheduler create -time 7:55am -wom 2 -dow monday -rp quarterly
- To view the auto collection data.
racadm supportassist autocollectscheduler view
- To clear the auto collection data.
racadm supportassist autocollectscheduler clear
2020년 8월 28일 금요일
Change IP of iDRAC from linux
If you install OpenManage onto the host, you can apply an IP address to the iDRAC that way. OpenManage would provide a graphical tool, but if this is a headless install, it would also provide the racadm command set.
racadm setniccfg -s <IPv4 address> <Subnet> <IPv4 Gateway>
2020년 6월 4일 목요일
How to use racadm to get raid rebuild percentage?
OpenManage CLI command. There is a CLI guid on the OpenManage Server Administrator support page. The command would be something like this:
omreport storage pdisk controller=0
linux 에서 tsr log 수집 방법
2019년 4월 9일 화요일
Fixing Postfix permission issues on Linux
If you are receiving a message similar to…
Jan 15 22:12:36 ip-10-0-0-133 postfix/postdrop[8301]:warning: mail_queue_enter: create file maildrop/939392.8301: Permission denied
Jan 15 22:12:37 ip-10-0-0-133 postfix/postdrop[8302]:warning: mail_queue_enter: create file maildrop/8821.8302: Permission denied
Jan 15 22:12:37 ip-10-0-0-133 postfix/postdrop[8303]:warning: mail_queue_enter: create file maildrop/14290.8303: Permission denied
You probably have a permission issue with your Postfix installation. This is usually caused by a bad upgrade or maybe user error when moving or recovering mail folders.
This can easily be solved by running the following commands below as root.
/etc/init.d/postfix stop
killall -9 postdrop
chgrp -R postdrop /var/spool/postfix/public
chgrp -R postdrop /var/spool/postfix/maildrop
/usr/sbin/postfix set-permissions
postfix check
/etc/init.d/postfix start
This should work on just about any Linux distro.
2017년 7월 4일 화요일
scsi disk 삭제 방법
rhel 기준이며 잘안될때는 재기동이 짱입니다 ㅠㅠ
Procedure 1. Ensuring a Clean Device Removal
Close all users of the device and backup device data as needed.
Use umount to unmount any file systems that mounted the device.
Remove the device from any md and LVM volume using it. If the device is a member of an LVM Volume group, then it may be necessary to move data off the device using the pvmove command, then use the vgreducecommand to remove the physical volume, and (optionally) pvremove to remove the LVM metadata from the disk.
If the device uses multipathing, run multipath -l and note all the paths to the device. Afterwards, remove the multipathed device using multipath -f device.
Run blockdev –flushbufs device to flush any outstanding I/O to all paths to the device. This is particularly important for raw devices, where there is no umount or vgreduce operation to cause an I/O flush.
Remove any reference to the device's path-based name, like /dev/sd, /dev/disk/by-path or the major:minor number, in applications, scripts, or utilities on the system. This is important in ensuring that different devices added in the future will not be mistaken for the current device.
Finally, remove each path to the device from the SCSI subsystem. To do so, use the command echo 1 > /sys/block/device-name/device/delete where device-name may be sde, for example.
Another variation of this operation is echo 1 > /sys/class/scsi_device/h:c:t:l/device/delete, where h is the HBA number, c is the channel on the HBA, t is the SCSI target ID, and l is the LUN.
2017년 6월 9일 금요일
[보안] 리눅스 패스워스 사용정책
centos rhel
패스워드 사용 정책에 관한 포스팅을 하겠습니다.
주요 파일은 /etc/login.defs , /etc/pam.d/common-password 입니다.
오늘 포스팅 주제에 관해서는 제 환경이 우분투이라는 점입니다.
오늘 다룰 주제에서 레드헷 계열과는 조금 다른점이 있어서 이점 양해바랍니다.
유저가 접속 할때 ID/PW 를 입력하여 접속을 시도합니다.
모든 사용자가 거처야할 필수 코스죠
가장 기본적인 코스인 만큼 그에 대한 정책은 제각각입니다.
그중 가장 기본적인 세가지의 설정에 대해서 언급하겠습니다.
패스워드 최소길이 (PASS_MIN_LEN)
최대 사용기간(PASS_MAX_DAYS)
최소 사용기간(PASS_MIN_DAYS)
이렇게 있습니다. 정해져있는 값은 없습니다.
PASS_MIN_LEN 8 (자리)
PASS_MAX_DAYS 60 (일)
PASS_MIN_DAYS 7 (일)
위와 같은 설정으로 잡겠습니다.
패스워드 정책에 대해서는 위와 같은 설정 파일을 설정해주는 방법과
각 기관에 따른 정책(ex. 패스워드의 영문/숫자/특수문자 조합 및 길이) 두가지로 나뉠수 있습니다.
아래 그림을 보시면 주석(#)이 아닌 세개의 줄을 보실수 있습니다.
위의 2개는 앞서 설명드렸고, PASS_WARN_AGE는 암호 만료일 지정시 만료전 경고를 보여주기 시작하는 일 수 입니다.
]# vi /etc/login.defs
명령어를 사용하여 아래의 숫자를 원하는 수로 변경해주시면 됩니다.
[ 그림 1 - /etc/login.defs 설정 파일 일부분 ]
PASS_MIN_LEN의 경우 앞서 말씀드린것과 같이 우분투 계열은 다른 설정 파일에 존재합니다.
기본적으로 대부분 아래 그림과 같이 설정되어 있을겁니다. 빨간부분 중간에 그림 3과 같이 입력해 주시면 됩니다.
[ 그림 2 - /etc/pam.d/common-password /설정 파일 일부분(수정 전) ]
아래 그림처럼 min=8 을 입력해주시면 8자리 이상의 패스워드를 입력하셔야 합니다.
[ 그림 3 - /etc/pam.d/common-password /설정 파일 일부분(수정 후) ]
그럼 위를 토대로 스크립트를 작성하겠습니다.
#!/bin/bash
PASSWD_CONF=/etc/login.defs
PASSWD_LEN=/etc/pam.d/common-password
echo "########## 1. 계정관리 - 1.4 패스워드 사용규칙 적용 ######################"
### 항목구분 ###
echo " 1. 계정관리"
### 항목명 ###
echo " 1.4 패스워드 사용규칙 적용"
### 위험도 ###
echo " 위험도 : 상"
### 기준설명 ###
echo " [기준]"
echo " 가. 패스워드 사용규칙 설정 "
echo " 패스워드 최소길이, 최대 사용기간, 최소 사용기간, 계정잠금 임계값 설정"
echo " # vi /etc/login.defs를 실행하여 아래와 같은 설정 적용 (단위: 일)"
echo " PASS_MIN_LEN 8"
echo " PASS_MAX_DAYS 60"
echo " PASS_MIN_DAYS 7"
echo " Ubuntu의 경우 길이제한 부분은 # vi /etc/pam.d/common-password를 실행하여 아래와 같은 설정을 적용"
echo " (수정 전) password [success=1 default=ignore] pam_unix.so obscure sha512"
echo " (수정 후) password [success=1 default=ignore] pam_unix.so obscure min=8 sha512"
echo " 나. 패스워드 설정"
echo " 문자/숫자/특수문자의 2종류 조합으로 8자리 이상, 3종류으로 10자리 이상"
echo "※ 가, 나 항목 모두 적용 해야 함"
### 현재설정 ###
echo "/etc/login.defs 설정 확인 "
if [ `cat $PASSWD_CONF | grep -v "^#" | grep 'PASS_MIN_LEN' | awk '{if ($2 < 8) print $0}' | wc -l` -eq 1 ]
then
echo ">>취약: 패스워드 최소길이가 8보다 작게 설정되어 있습니다."
cat $PASSWD_CONF | grep -v "^#" | grep 'PASS_MIN_LEN' | awk '{if ($2 < 8) print $0}'
else
echo ">>양호: 패스워드 최소길이가 8 이상으로 설정되어 있습니다."
fi
if [ `cat $PASSWD_CONF | grep -v "^#" | grep 'PASS_MAX_DAYS' | awk '{if ($2 > 70) print $0}' | wc -l` -eq 1 ]
then
echo ">>취약: 패스워드 최대 사용기간이 70일보다 크게 설정되어 있습니다."
cat $PASSWD_CONF | grep -v "^#" | grep 'PASS_MAX_DAYS' | awk '{if ($2 > 70) print $0}'
else
echo ">>양호: 패스워드 최대 사용기간이 70일 이하로 설정되어 있습니다."
fi
if [ `cat $PASSWD_CONF | grep -v "^#" | grep 'PASS_MIN_DAYS' | awk '{if ($2 < 7) print $0}' | wc -l` -eq 1 ]
then
echo ">>취약: 패스워드 최소 사용기간이 7일보다 작게 설정되어 있습니다."
cat $PASSWD_CONF | grep -v "^#" | grep 'PASS_MIN_DAYS' | awk '{if ($2 < 7) print $0}'
else
echo ">>양호: 패스워드 최소 사용기간이 7일 이상으로 설정되어 있습니다."
fi
echo "/etc/pam.d/common-password 설정 확인 "
if [ `cat $PASSWD_LEN | grep -v "^#" | grep 'min' | wc -l` -eq 1 ]
then
echo "양호 : 패스워드 최소 길이가 설정되어 있습니다."
cat $PASSWD_LEN | grep -v "^#" | grep 'min'
else
echo " 취약 : 패스워드 최소 길이가 설정되어 있지않습니다."
fi
위와 같은 방법으로 하시면 됩니다.
이번 스크립트의 경우, 경우의 수가 많기 때문에 각자에 맞게 변형해주시면 될것같습니다.
이상으로 마치겠습니다.
2017년 6월 7일 수요일
[네트워크] 리눅스cent rhel 서버 네트워크 대역폭 제어 – ETHTOOL / TC
오늘은 리눅스 서버에서 기본적으로 네트워크 대역폭을 제어할 수 있는 방법에 대해 알아보도록 하겠습니다.
서버호스팅을 이용하다 보면 서버 사양만 고려하고 대역폭과 트래픽에 대해 쉽게 간과하여 자칫 트래픽 과금 폭탄을 맞을 수 있습니다.
해당 내용은 이전에 작성한 포스팅을 참고하시기 바랍니다.
[트래픽 계산 및 과금 방법 포스팅 바로가기]
호스트메카를 포함한 여러 호스팅 업체에서는 특별한 케이스 외 일반적으로 대역폭을 별도로 제한하지 않습니다.
이유는 간단하죠.
요금체계가 트래픽 과금 방식이기 때문입니다.
일정량의 기본 트래픽을 제공하고 초과되는 트래픽에 대해 별도 과금하여 회사 매출로 이어지게되는…
그리고 업체에서 직접 대역폭을 제한할 경우, 고객이 원하는 인터넷 속도를 맞출 수가 없게되죠. 그건 바로 고객 불만 사항으로 접수될테구요.
어찌됐든 업체에서 제공해 주지 않는다고 해서 그냥 쓰시는 분들도 있겠지만, 추가로 돈내기 싫으신 분들은 직접 제어하는 게 좋겠죠?
그래서 대표적으로 많이 쓰는 두 가지 방법을 소개해 드릴까 합니다. 바로 ethtool 과 tc !!
그럼 하나하나 살펴보도록 하죠.
[ethtool]
– ethtool은 리눅스 내 네트워크 상태 정보를 알아보거나 설정하는데 사용되는 명령어 입니다.
– 기본 사용법 : ethtool 장치명
[설명]Supported link modes지원 가능한 링크 모드Supported auto-negotiation자동협상인식기능의 지원여부Speed현재 속도 (대역폭)Duplex전송 모드Auto-negotiation자동협상인식기능 동작 여부
위 내용을 바탕으로 살펴보면,
테스트 서버의 지원 가능한 랜카드의 대역폭은 10/100/1000 이며, auto-negotiation 기능을 사용할 수 있습니다.
또 현재 연결된 네트워크 속도(대역폭)는 100Mb/s이며, 전송 모드는 Full 상태임을 알 수 있습니다.
그럼 ethtool을 이용하여 설정을 변경해 볼까요?
설정은 네트워크 속도 : 10Mb/s, 전송 모드 Full, auto-negotiation : off 로 하겠습니다.
– 설정 사용법 : ethtool -s 장치명 speed (10/100/1000) duplex (full/half) autoneg (on/off)
ethtool 명령어를 이용해 쉽게 10Mb/s 로 대역폭이 제한되었음을 확인할 수 있습니다.
편리하긴 하지만 한가지 문제가 있겠죠? 바로 세밀한 대역폭 조절이 어렵다는 것!!
ethtool은 Supported link modes에 지원되는 값으로만 설정이 가능하기에 30/50/80 등 사용자가 지정한 값으로는 조절이 불가합니다.
그럴 때 이용할 수 있는 명령어가 바로 tc 입니다.
tc를 이용하면 사용자가 직접 장치별 대역폭을 지정해서 사용할 수 있습니다.
또 해당 명령어를 사용하기 쉽게 스크립트 형태로 제공하고 있으니 참고하시기 바랍니다.
[tc 스크립트 바로가기]
[tc]
– 리눅스 기본 패키지인 iproute 안에 내장된 명령어로 Traffic Control의 약자입니다.
네트워크 스위치의 도움 없이 서버 자체에서 이더넷 속도를 제한할 수 있으며, QOS(Quality Of Service)와 비슷한 기능을 제공합니다.
* 링크 내 해당 스크립트에서 수정할 부분은 아래와 같습니다.
22라인 IF=eth0 # Interface (장치명)
25라인 DNLD=1mbit # DOWNLOAD Limit (다운로드 제한)
28라인 UPLD=1mbit # UPLOAD Limit (업로드 제한)
31라인 IP=216.3.128.12 # Host IP (서버 IP)
자 그럼 저는 원하는 값으로 수정하였으니, 스크립트를 실행하고 결과를 확인해 보도록 하겠습니다.
외부에서 파일을 다운로드 할 때의 트래픽 변화입니다. 제가 제한을 어떻게 걸었는지 아시겠죠?
35 > 25 > 15 mb로 설저을 변경하면서 테스트를 진행하였습니다.
잘 적용이 되는 듯 합니다만, 한가지 특이한 점은 서버 기준 Out트래픽(UPLD)만 제한이 되고, In트래픽은 제한되지 않습니다.
원인은 tc를 통해 제어하는 트래픽 세이핑 방법은 Out트래픽에만 적용되기 때문인데요. 추후 In트래픽 제한 방법에 대해 별도 소개하도록 하겠습니다.
여기까지가 가장 기본적인 tc 사용법이며 활용 방법은 무궁무진합니다.
tc를 잘 활용하면, 특정 IP 서버 혹은 특정 국가별 대역폭 조절도 가능하죠. 자세한 건 검색을 통해서 확인하시기 바랍니다.
2017년 5월 15일 월요일
ufc 211 스티페 미오치치 vs 주니어 도스 산토스
2015년 3월 3일 화요일
RHEL 6.x 교육 1일차
[root@station12 /]# echo \$HOME is '$(date)'
$HOME is $(date)
[root@station12 /]# echo \$HOME is '$(^C
[root@station12 /]# echo \$HOME is $(date)
$HOME is 2015. 03. 02. (월) 23:01:18 KST
\ ' " 사용법 숙지
cpus로 프린터 셋팅하기
localhost:631 #접속하여 셋팅하면됨 very simple#
프린터 출력
lp -d 프린터 이름 -n 16 /etc/sevices ##16은 출력매수
상태확인
[root@station12 /]# lpstat -t #모든사용자 프린트 상태확인#
일정이 실행 중
시스템 기본 대상 없음
deskjet500에 대한 장비: serial:/dev/ttyS0?baud=57600+bits=8+parity=none+flow=none
2015년 03월 02일 (월) 오후 09시 25분 19초 이후에 deskjet500 승인 요청
deskjet500 프린터가 대기 중. 2015년 03월 02일 (월) 오후 09시 25분 19초 이후에 활성화됨
[root@station12 /]# lpstat #프린트 상태확인 내 계정
deskjet500-2 root 0 2015년 03월 02일 (월) 오후 11시 03분 27초
deskjet500-3 root 0 2015년 03월 02일 (월) 오후 11시 03분 32초
[root@station12 /]# cancel #프린터 출력 취소
cd drd 사용법
ll /dev/cdrom #cdrom 확인
dvd mount 방법
[root@station12 /]# mount -t iso9660 /dev/dvd /mnt #dvd mount
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@station12 /]# ll /mnt #마운트 확인
합계 3428
dr-xr-xr-x. 3 root root 2048 2013-01-31 05:32 EFI
lr-xr-xr-x. 1 root root 7 2013-01-31 05:32 EULA -> EULA_en
-r--r--r--. 3 root root 10726 2012-11-08 00:17 EULA_de
-r--r--r--. 3 root root 8724 2012-11-08 00:17 EULA_e[root@station12 /]# ll /mnt
/dev/null 사용법
[root@station12 /]# cal > /dev/null #dev/null로 보내서 출력이 없음
[root@station12 /]# cal # 원래 출력값
3월 2015
일 월 화 수 목 금 토
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
tree 사용법 (파일 구조 살피기)
[root@station12 /]# tree | more
.
├── bin
│ ├── alsaunmute
│ ├── arch
│ ├── awk -> gawk
│ ├── basename
│ ├── bash
│ ├── cat
│ ├── cgclassify
│ ├── cgcreate
│ ├── cgdelete
lsmod 모듈 확인
[root@station12 rules.d]# lsmod #모듈 확인
Module Size Used by
nls_utf8 1455 1
ppdev 8537 0
parport_pc 22690 0
lp 9242 0
parport 36209 3 ppdev,parport_pc,lp
bridge 79078 0
nfs 416657 0
lockd 73534 1 nfs
fscache 53874 1 nfs
auth_rpcgss 44917 1 nfs
nfs_acl 2647 1 nfs
fuse 69253 2
autofs4 26513 3
[root@station12 rules.d]# lsmod | grep r81
r8169 60023 0
mii 5376 1 r8169
[root@station12 rules.d]# modinfo r8169 #모듈 상세확인
filename: /lib/modules/2.6.32-358.6.1.el6.x86_64/kernel/drivers/net/r8169.ko
firmware: rtl_nic/rtl8168g-1.fw
firmware: rtl_nic/rtl8106e-1.fw
firmware: rtl_nic/rtl8411-1.fw
firmware: rtl_nic/rtl8402-1.fw
firmware: rtl_nic/rtl8168f-2.fw
firmware: rtl_nic/rtl8168f-1.fw
firmware: rtl_nic/rtl8105e-1.fw
firmware: rtl_nic/rtl8168e-3.fw
firmware: rtl_nic/rtl8168e-2.fw
firmware: rtl_nic/rtl8168e-1.fw
firmware: rtl_nic/rtl8168d-2.fw
firmware: rtl_nic/rtl8168d-1.fw
version: 2.3LK-NAPI
license: GPL
description: RealTek RTL-8169 Gigabit Ethernet driver
author: Realtek and the Linux r8169 crew <netdev@vger.kernel.org>
모듈 설치 및 제거
[root@station12 rules.d]# modprobe nfs #설치
[root@station12 rules.d]# modprobe -r nfs #제거
FATAL: Module sunrpc is in use.
WARNING: Error running remove command for sunrpc
삭제된 모듈 정보 복구
[root@station12 rules.d]# > /lib/modules/2.6.32-358.6.1.el6.x86_64/modules.dep #모듈정보 삭제
[root@station12 rules.d]# ll /lib/modules/2.6.32-358.6.1.el6.x86_64/modules.dep #확인
-rw-r--r--. 1 root root 0 2015-03-03 00:06 /lib/modules/2.6.32-358.6.1.el6.x86_64/modules.dep
[root@station12 rules.d]# depmod #모듈 정보 복구
[root@station12 rules.d]# ll /lib/modules/2.6.32-358.6.1.el6.x86_64/modules.dep #복구 확인
-rw-r--r--. 1 root root 196799 2015-03-03 00:06 /lib/modules/2.6.32-358.6.1.el6.x86_64/modules.dep
모듈 삭제 및 생성
[root@station12 rules.d]# lsmod | grep 8169 # 삭제할 모듈확인
r8169 60023 0
mii 5376 1 r8169
[root@station12 rules.d]# modprobe -r r8169 # 삭제
[root@station12 rules.d]# lsmod | grep 8169 # 삭제 된것 확인
[root@station12 rules.d]# insmod r8169 # insmod 설치 시도 절대경로를 알지못하면 아래처럼 설치가안됨
insmod: can't read 'r8169': No such file or directory
[root@station12 rules.d]# modprobe r8169 #modprobe를 이용 하여 설치
[root@station12 rules.d]# lsmod | grep 8169 #설치확인
r8169 60023 0
mii 5376 1 r8169
커널 파라미터 수정 ******중요
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all #icmp 무시 셋팅
[root@station12 rules.d]# ping 10.100.0.11 # 확인 ping이 안나감
PING 10.100.0.11 (10.100.0.11) 56(84) bytes of data.
^C
--- 10.100.0.11 ping statistics ---
[root@station12 Desktop]# sysctl -a | grep icmp_echo_ignore #sysctl 네트워크 환경 전부확인
net.ipv4.icmp_echo_ignore_all = 1
net.ipv4.icmp_echo_ignore_broadcasts = 1
위에 셋팅은 임시적으로서 재기동 하면 셋팅 초기화됨
영구적으로 하려면 /etc/sysctl.conf 수정
vi /etc/sysctl.conf
net.ipv4.icmp_echo_ignore_all = 1
재기동 후에도 적용하려면
/etc/sysctl.conf 를 수정하여야한다.
24 packets transmitted, 0 received, 100% packet loss, time 23381ms
[root@station12 Desktop]# vi /etc/sysctl.conf # 열어서
net.ipv4.tcp_max_syn_backlog = 200000 # 설정값 수정
[root@station12 Desktop]# sysctl -a | grep back
vm.dirty_background_ratio = 10
vm.dirty_background_bytes = 0
vm.dirty_writeback_centisecs = 500
net.core.netdev_max_backlog = 1000
net.ipv4.tcp_max_syn_backlog = 2048 #아직 변화 없음 기본적으로 재기동시 적용
[root@station12 Desktop]# sysctl -p #재기동 안하고 적용
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
net.ipv4.tcp_max_syn_backlog = 200000
[root@station12 Desktop]# sysctl -a | grep back
vm.dirty_background_ratio = 10
vm.dirty_background_bytes = 0
vm.dirty_writeback_centisecs = 500
net.core.netdev_max_backlog = 1000
net.ipv4.tcp_max_syn_backlog = 200000 #변경 내용확인
RHEL 파일시스템 변천사 (5~7)
RHEL5 -> ext3
RHEL6 -> ext4
RHEL7 -> xfs
램디스크 삭제 및 생성
[root@station12 boot]# ll /boot #폴더 확인
합계 22754
-rw-r--r--. 1 root root 2407872 2013-04-24 04:53 System.map-2.6.32-358.6.1.el6.x86_64
-rw-r--r--. 1 root root 104085 2013-04-24 04:53 config-2.6.32-358.6.1.el6.x86_64
drwxr-xr-x. 3 root root 1024 2015-02-28 00:24 efi
drwxr-xr-x. 2 root root 1024 2015-03-03 01:47 grub
-rw-r--r--. 1 root root 16531618 2015-02-28 00:24 initramfs-2.6.32-358.6.1.el6.x86_64.img
drwx------. 2 root root 12288 2015-02-28 00:20 lost+found
-rw-r--r--. 1 root root 185842 2013-04-24 04:54 symvers-2.6.32-358.6.1.el6.x86_64.gz
-rwxr-xr-x. 1 root root 4045712 2013-04-24 04:53 vmlinuz-2.6.32-358.6.1.el6.x86_64
[root@station12 boot]# rm initramfs-2.6.32-358.6.1.el6.x86_64.img # 램디스크 삭제
rm: remove 일반 파일 `initramfs-2.6.32-358.6.1.el6.x86_64.img'? y
[root@station12 boot]# dracut # 램디스크 복구 --force 옵션도 있음
만약 커널이 여러개일 경우 특정 램디스크 생성하는법
[root@station12 boot]# dracut /boot/initramfs.img kernel_version
램디스크 내용보기
[root@station12 boot]# ll /boot
합계 22814
-rw-r--r--. 1 root root 2407872 2013-04-24 04:53 System.map-2.6.32-358.6.1.el6.x86_64
-rw-r--r--. 1 root root 104085 2013-04-24 04:53 config-2.6.32-358.6.1.el6.x86_64
drwxr-xr-x. 3 root root 1024 2015-02-28 00:24 efi
drwxr-xr-x. 2 root root 1024 2015-03-03 01:47 grub
-rw-r--r--. 1 root root 16593216 2015-03-03 02:15 initramfs-2.6.32-358.6.1.el6.x86_64.img
drwx------. 2 root root 12288 2015-02-28 00:20 lost+found
-rw-r--r--. 1 root root 185842 2013-04-24 04:54 symvers-2.6.32-358.6.1.el6.x86_64.gz
-rwxr-xr-x. 1 root root 4045712 2013-04-24 04:53 vmlinuz-2.6.32-358.6.1.el6.x86_64
[root@station12 boot]# mkdir tmp #임시 폴더 생성해서
[root@station12 boot]# cp initramfs-2.6.32-358.6.1.el6.x86_64.img ./tmp #램디스크 파일복사
[root@station12 boot]# cd tmp
[root@station12 tmp]# ll
합계 16206
-rw-r--r--. 1 root root 16593216 2015-03-03 02:20 initramfs-2.6.32-358.6.1.el6.x86_64.img
[root@station12 tmp]# zcat initramfs-2.6.32-358.6.1.el6.x86_64.img | cpio -icdmu # 압축풀고
92119 blocks
[root@station12 tmp]# ll #확인
합계 16266
drwxr-xr-x. 2 root root 1024 2015-03-03 02:21 bin
drwxr-xr-x. 2 root root 1024 2015-03-03 02:21 cmdline
drwxr-xr-x. 3 root root 1024 2015-03-03 02:21 dev
-rw-r--r--. 1 root root 19 2013-01-09 22:34 dracut-004-303.el6
drwxr-xr-x. 2 root root 1024 2015-03-03 02:21 emergency
drwxr-xr-x. 7 root root 1024 2015-03-03 02:21 etc
-rwxr-xr-x. 1 root root 8879 2013-01-09 22:34 init
drwxr-xr-x. 2 root root 1024 2015-03-03 02:14 initqueue
drwxr-xr-x. 2 root root 1024 2015-03-03 02:14 initqueue-finished
drwxr-xr-x. 2 root root 1024 2015-03-03 02:14 initqueue-settled
drwxr-xr-x. 2 root root 1024 2015-03-03 02:14 initqueue-timeout
-rw-r--r--. 1 root root 16593216 2015-03-03 02:20 initramfs-2.6.32-358.6.1.el6.x86_64.img
drwxr-xr-x. 7 root root 1024 2015-03-03 02:21 lib
drwxr-xr-x. 3 root root 5120 2015-03-03 02:21 lib64
drwxr-xr-x. 2 root root 1024 2015-03-03 02:21 mount
drwxr-xr-x. 2 root root 1024 2015-03-03 02:21 pre-pivot
drwxr-xr-x. 2 root root 1024 2015-03-03 02:21 pre-trigger
drwxr-xr-x. 2 root root 1024 2015-03-03 02:21 pre-udev
drwxr-xr-x. 2 root root 1024 2015-03-03 02:14 proc
drwxr-xr-x. 2 root root 1024 2015-03-03 02:21 sbin
drwxr-xr-x. 2 root root 1024 2015-03-03 02:14 sys
drwxr-xr-x. 2 root root 1024 2015-03-03 02:14 sysroot
drwxrwxrwt. 2 root root 1024 2015-03-03 02:14 tmp
drwxr-xr-x. 7 root root 1024 2015-03-03 02:21 usr
drwxr-xr-x. 4 root root 1024 2015-03-03 02:21 var
[root@station12 tmp]# cd lib
[root@station12 lib]# ll
합계 19
-rwxr-xr-x. 1 root root 7248 2013-01-09 22:34 dracut-lib.sh
drwxr-xr-x. 4 root root 1024 2015-03-03 02:21 firmware
drwxr-xr-x. 6 root root 1024 2015-03-03 02:21 kbd
drwxr-xr-x. 3 root root 1024 2015-03-03 02:21 modules
drwxr-xr-x. 6 root root 1024 2015-03-03 02:21 terminfo
drwxr-xr-x. 3 root root 1024 2015-03-03 02:21 udev
2014년 12월 1일 월요일
중국남방항공 유럽 항공권 핫딜
2014년 4월 24일 목요일
제주도 맛집 정리
제주 추천하는 제주도 맛집 총정리본. #1 돼지고기편
http://www.slrclub.com/bbs/vx2.php?id=free&no=24383134
제주 추천하는 제주도 맛집 총정리본. #2 제주전통음식
http://www.slrclub.com/bbs/vx2.php?id=free&no=24383165
제주 추천하는 제주도 맛집 총정리본. #3 제주전통음식 2탄
http://www.slrclub.com/bbs/vx2.php?id=free&no=24383209
제주 추천하는 제주도 맛집 총정리본. #4 횟집
http://www.slrclub.com/bbs/vx2.php?id=free&no=24383247
제주 추천하는 제주도 맛집 총정리본. #5 고기국수와 면
http://www.slrclub.com/bbs/vx2.php?id=free&no=24383269
제주 추천하는 제주도 맛집 총정리본. #6 정식/백반 일반 식당들
http://www.slrclub.com/bbs/vx2.php?id=free&no=24383373
제주 추천하는 제주도 맛집 총정리본. #7 해장국과 중국집 [마지막 편]
http://www.slrclub.com/bbs/vx2.php?id=free&no=24383409
덧 1)
추가로 제주도 식당 지도 만들어 봤습니다.
(맛집 아닌 곳 다수 포함입니다...주의하세요.^^)
http://maps.google.com/maps/ms?msid=207190800777223749583.0004e0198...
덧 2)
제주도에서 선정한 착한식당 리스트 링크입니다. (pdf 파일)
대부분 무난한 식당들입니다. 참고하세요...
http://www.jeju.go.kr/temp_files/2013/price.pdf
2014년 4월 1일 화요일
HP-UX 파일시스템 정리
/var 파일시스템은 각종 로그가 쌓이는 위치 입니다.
주기적으로 정리를 해주어야 시스템 운영에 이상이 없습니다.
# df -k
# du -sk /var
# cd /var
# du -sk *
위의 명령어를 사용하여 /var 파일 시스템의 용량을 보시고
/var 로 들어가셔서 du -sk * 하시면 해당 파일 또느 디렉토리의 용량들이 나옵니다.
그 용량들을 보시고 하위 드렉토리 또는 파일을 찾아 계속 들어가다 보면
용량이 터무니 없이 큰 파일을 찾을수 있을 겁니다.
이런 식으로 점차 줄여 나가시면 됩니다.
또는 find 명령을 이용하실수도 있습니다.
# find /var -size +50000000c >> 50MB 이상 되는 파일 검색
find /var -size +10000000c 하면 10MB 이상되는 file들을 보여 줍니다...
보통 /var에서는 /var/adm/wtmp, /var/adm/btmp, /var/adm/crash, /var/mail/,
/var/adm/syslog/OLDsyslog.log, /var/adm/syslog/mail.log 정도 지우시면 될것 같습니다.
wtmp와 btmp는 내용만 지우세요... # > wtmp 이렇게 하면 파일의 형태는 그대로 있고, size만 0으로 됩니다.
팁1
디렉토리갯수 세기
$ ls -l | grep ^d | awk '{print $9}'|wc -l
화일갯수 세기
$ ls -l | grep ^- | awk '{print $9}'|wc -l
--> "ls -l" 대신 "ls -Rl"
HP 서버 파일시스템 100% 찾을시
찾는 방법은 앞에서 잘 설명 해주셨네요. 보통 /var 파일시스템을 가능하면 많이 잡는게 좋습니다. 최소 4GB에서 ~ 8GB 정도는 잡아 두시는게 좋은데요. 이유야 log가 많이 쌓이니까요 ^^;
1. /var/spool/mqueue <= 요기 sendmail 데몬이 올라가 있거나, 기타 설정상의 문제로 mail이 계속 쌓이는 경우가 있습니다. 그냥 다 지워 주면 됩니다.
2. /var/adm/crash <= 시스템의 crash dump 파일이 남아 있어 용량을 차지하는 경우가 있습니다.
3. /var/mail/root <= root 유저에게는 각종 Event 정보의 mail이 옵니다, 특별히 관리를 하지 않으셨으면 확인해보세요 정리는
#/var/mail/root< 내용만 지워집니다.(< 오른쪽에 아무것도 없으면 null 값을 의미합니다.)
4. /var/adm/sw <== 요기는 HPUX의 OS Patch 관련 내용이 저장되는 곳입니다. 보통 OS Patch를 하면 패치하기전의 상태로 rollback 할수 있도록 기존 정보를 저장해둡니다. patch 몇번하다 보면 이 용량이 상당히 많아 집니다. 또 중복되어 필요없어진 내용도 남아 있게됩니다. 패치잘됐고 용량 확보가 필요하다 싶으시면 cleanup 이라는 명령을 사용해서 정리를 해줄수 있습니다.(자세한 설명은 man cleanup 하시면 돼겠죠? ^^; 또, 하시기 전에 OS backup 받아두면 든든하지 않을까요)
#cleanup -c 1 <= 1의 의미가 마지막 패치에 대한 rollback 본만 남기고 정리한다는 의미일 겁니다.(가물가물 ^^;) 패치 많이 했으면 상당한 용량이 확보 됩니다.
2014년 3월 31일 월요일
제주도 구제주 맛집정리
구제주편 맛집 정리해서 보냅니다ㅋ
쏘쏘한 곳도 있고 빠진 곳도 있지만 참고사항으로 보세요~
디테일한 것은 "제주 식당이름" 검색해서 블로그로 보시고요~
메모장 같은데 복사해서 저장했다가 뭐 먹을까 고민할 때 꺼내보세요ㅎㅎ
그외 추천 장소는 댓글 달아주는 센스ㅎ
1.구제주
1) 한식
감초식당(보성시장)-순대국밥
누룽지식당(구세무서)-고등어조림
다담(터미널)-연잎밥정식
다소니(보건소)-들깨수제비
다채움(남광초)-놀이방있는 샤브샤브
닭모리(일도)
대광식당(시청)-냉면
대원가(도남)-해물탕
도남막창(도남)
돌하루방식당(일도)-각재기국
동이트는집(일도)-추어탕
매운디(베라체)-매운갈비찜
명물식당(탑동소방서)-활한치물회
미루네(이도)-정식
배비장(베라체)-보쌈정식 순대정식
불타는차돌쭈꾸미(이도)
복진아구찜(일도)
삼도정손순두부(삼도)
상춘재(아라)-멍게비빔밥과 추어탕
서문뒷고기(삼도)-두루치기
선비묵집(아라)-묵정식
선우(제주법원)-육개장 보말국
소드래(일도)-정식
쎌바(시청)
손심엉(베라체)-검정보리해물칼국수
솔지식당(시청)-돼지고기멜조림
신설오름(일도)-몸국
아라쭈꾸미(인제 일도주유소)
어머니와장독대(일도)-보리밥정식
온누리식당(이도)-갈비찜
우진해장국(삼도)-고사리육개장
이순애순대국밥(봉개)
은희네해장국(일도)
윤가정식(아라)
진영식당(용담)-순대국밥
착한식당(삼도)-만두전골
초록바다(이도)-조기구이정식
태광식당(용담)-주물럭
태선갈비(일도)
태백산3호점(아라)-정식
토근식당(시청)-정식
토담골(아라)-전복삼계탕
푸주옥(도남)-설렁탕 도가니탕
화성식당(삼양)-접짝뼈국
흑돈세상(아라)
홍소반(이도)-정식
24시국수회관(삼도)-주물럭
2) 중식
덕성원(일도)-게짬뽕
리향(용담)-탕수육 짬뽕
마라도에서온짜장면(일도)-착한짜장면
아서원(삼도)-냉국수
임성반점(용담킹마트)-짬뽕
유일반점(시청)-냉우동
차이메이(이도)
천금반점-짬뽕(삼도)
3) 일식
라멩하우스(시청)
스시도모다찌(시청)-회전초밥
이돈갓(시청)-일본식돈까스
우도동굴횟집(동광초)
청어람(일도)
청해일횟집(이도)
쿠루쿠루(이도)-일본가정식
토닥토닥(삼도)-돈까스정식
4) 양식
닐모리동동(용담)-파스타
루스트(이도)-빠네
매너(이도)-샐러드파스타 피자
바그다드(시청)-커리 탄두리치킨
스크루지펍(베라체)-런치세트
슬로우가든(시청)-파스타
파스타앤(시청)-치킨크림스파게티->신제주 한데모아(?)
키친1983(아라)
킴스커틀렛(이도)-돈까스 볶음우동
쿠킹스토리밥(용담)
5) 기타
고로케야(일도)-수제고로케
골막국수(일도)
남춘식당(일도)-콩국수 김밥
다가미(정부청사)-다가미김밥
명동칼국수(중앙로)
북교 해바라기(삼도)-순두부
빈스푸드(아라)-탕수육 짬뽕 볶음밥
삼대국수회관(일도)-고기국수
자매국수(일도)-비빔국수
코코분식(시청)-칼국수 비빔밥 육계장
코크니셰(시청)-롤 치킨데리야키철판요리
피자알볼로(중앙여고체육관)
항아리칼국수(정부청사)
호떡골목(동문시장)-야채호떡
홍가네칼국수(이도)
홍열이네(일도)-매운닭날개 등갈비
6)카페&베이커리&떡
깐니네카페(오라)-메론빙수
꿈꾸는흰당나귀(시청)-말차빙수
네꼬야(아라)-커피&홍차
더치립(베라체)-초코큐브식빵
떡하니(이도주공)-쑥치즈설기
루드비히(아라)-드립커피
베리베리(베라체)-수제컵케잌
봉씨네파이파이(이도)
브런치카페앨리(이도)
빠네띠에(이도)
뽕글랑(제주여고)
서사라떡빵앗간(서사라)-막걸리빵 찐빵
아라찐빵
엘리엇스체어(이도)-커피 샌드위치
와이파이(이도)-찹쌀파이
오랑주(구세무서)-수제케잌
오빵구이(이도)-쑥찐빵
이레브랑제리(이도)
카카듀(이도)-녹차빙수 유자차
커피쟁이(시청)
토르토니(시청)-초코퐁듀
한라산쑥찐빵(베라체)
행복한차실(칠성통)-대추차
2014년 2월 28일 금요일
hp-ux depot 제거하기
# swlist -s vm180:/kjbdepot
# Initializing...
# Contacting target "vm180"...
#
# Target: vm180:/kjbdepot
#
#
# No Bundle(s) on vm180:/kjbdepot
# Product(s):
#
EchoApp A.1.00 EchoApp Lab Exercise
root@vm180 [/root]
#
root@vm180 [/root]
# swremove -d \* @ /kjbdepot
======= 02/28/14 16:44:55 KST BEGIN swremove SESSION
(non-interactive) (jobid=vm180-0006)
* Session started for user "root@vm180".
* Beginning Selection
* Target connection succeeded for "vm180:/kjbdepot".
* Software selections:
EchoApp.ECHOAPP-HELP-DOC,r=A.1.00,a=HP-UX_B.11.00_32/64,v=ABC
EchoApp.ECHOAPP-MISC-DOC,r=A.1.00,a=HP-UX_B.11.00_32/64,v=ABC
EchoApp.ECHOAPP-RUNTIME,r=A.1.00,a=HP-UX_B.11.00_32/64,v=ABC
* Selection succeeded.
* Beginning Analysis
* Session selections have been saved in the file
"/root/.sw/sessions/swremove.last".
* The analysis phase succeeded for "vm180:/kjbdepot".
* Analysis succeeded.
* Beginning Execution
* The execution phase succeeded for "vm180:/kjbdepot".
* Execution succeeded.
NOTE: More information may be found in the agent logfile using the
command "swjob -a log vm180-0006 @ vm180:/kjbdepot".
======= 02/28/14 16:44:55 KST END swremove SESSION (non-interactive)
(jobid=vm180-0006)
root@vm180 [/root]
# swlist -s vm180:/kjbdepot
# Initializing...
# Contacting target "vm180"...
ERROR: The expected depot or root does not exist at "/kjbdepot".
ERROR: There is currently no depot software on host "vm180" at
location "/kjbdepot". Make sure that an absolute pathname is
specified for location (beginning with "/").