'분류 전체보기'에 해당되는 글 322건
- 2017.03.27 유사수신행위의 규제에 관한 법률 ( 약칭: 유사수신행위법 )
- 2017.03.13 GDP(국내총생산)/GNP(국민총생산)/GNI(국민총소득)/GDI(국내총소득)
- 2017.03.06 마우스 기능 용어
- 2017.01.14 OSI 7 Layer
- 2016.12.27 mysql backup & restore
- 2016.12.23 rsync 설치 및 설정 방법 (centos)
- 2016.10.09 aws s3 cli 이용하여 버킷 사용량 구하기
- 2016.06.22 이상한 에브리온 TV
- 2016.06.22 핌피(PIMFY, Please In My Front Yard)
- 2016.06.22 파이썬 내장 함수 : isinstance
GNP(Gross National Product, 국민총생산)
GDP(Gross Domestic Product, 국내총생산)
GNI(Gross National Income, 국민총소득)
GDI(Gross Domestic Income, 국내총소득)
GDP(Gross Domestic Product, 국내총생산)는 한 나라 영역 내에서 가계, 기업, 정부 등 경제 주체에 의해 일정 기간 생산된 모든 최종 재화와 서비스를 시장 가격으로 평가한 것을 말한다. GDP에서 말하는 영역이란 경제 활동의 중심이 국내에 있다는 것을 말한다. GDP의 조사와 작성은 한국은행이 담당하며 분기, 반기, 연간 단위로 공표된다.
GNP(Gross National Product, 국민총생산)는 한 나라 국민이 일정 기간 생산한 모든 최종 재화와 서비스를 시장 가격으로 평가한 것을 말한다. GDP가 영토 중심 개념인 반면, GNP는 국적이 중요한 기준이 된다. 현재 GNP 지표는 발표되지 않고, 이를 GNI(Gross National Income, 국민총소득)가 대신하고 있다.
GNI는 한 나라의 국민이 생산 활동에 참여한 대가로 받은 소득의 합계로서, 해외로부터 국민(거주자)이 받은 소득(국외수취 요소소득)은 포함되고 국내총생산 중에서 외국인에게 지급한 소득(국외지급 요소소득)은 제외된다.
GDI는 실질 지표로 주로 나타내는데, 실질 GDI는 실질 GDP에서 교역 조건 변화에 따른 실질무역손익을 더한 것을 말한다.
따라서 이들 관계는 다음과 같이 나타낼 수 있다.
◦ 명목 GNI=명목 GNP=명목 GDP+국외 순수취 요소소득
◦ 실질 GDI=실질 GDP+교역 조건 변화에 따른 실질무역손익
http://terms.naver.com/entry.nhn?docId=300437&cid=43665&categoryId=43665
http://m.post.naver.com/viewer/postView.nhn?volumeNo=4768808&memberNo=31543081&vType=VERTICAL
광마우스
붉은색 또는 푸른색 LED 빛을 센서로 이용.
빛이 반사되거나 번지는 유리, 플라스틱, 투명 재질의 바닥에서는 사용 불가
블루트랙센서
평평하지 않은 바닥에서도 작동하는 고성능 레이저 센서
고광택 표면에서는 사용 어려움
마우스패드 없이도 사용 가능
틸트휠
종, 횡 스크롤.
종 스크롤(상하 스크롤) 기능에 횡 스크롤 기능을 추가한 휠
옆으로 넓은 문서를 편집할 때 유용한 기능
감도
마우스를 1인치(2.54cm) 움직였을 때 커서가 움직이는 거리를 나타내는 단위(단위 DPI)
모니터 해상도가 높다면 마우스 감도도 높아야 좋음
일반적인 DPI의 용어 의미와 다르게 마우스 감도에서의 DPI는 모니터의 커서가 움직인 픽셀 수를 의미함.
감도가 높다가 다 좋은 것은 아니며, 감도가 높고 배율조정이 가능한 제품이 좋음. (최대감도 vs 감도)
ex) 감도 : 1000 dpi, 최대 감도 : 4000 dpi
* DPI(Dots Per Inch) : 실제 크기 1인치 당 점의 개수
PPI(Pixels Per Inch)와 유사.
DPI는 인쇄물에 사용되며, '점이 찍혀 있고, 없고'의 상태가 있음
PPI는 TV, 모니터, 스마트폰 같은 기기에서 사용되며, '켜져 있느냐, 없느냐'의 상태가 있음.
스캔속도(FPS)
마우스의 움직임에 대한 정확한 반응 수치
수치가 높을 수록 빠른 움직임에도 끊김없이 정확하게 반응
스캔속도가 낮으면 마우스를 빠르게 움직였을 경우 커서가 이상한 위치에 있거나, 이동에 끊김이 발생
ex) 스캔속도 : 8000fps, 스캔속도 : 1200fps
Backup
xtrabackup 설치
$ yum install -y xtrabackup |
mysql 압축 풀백업
$ innobackupex --stream=xbstream --parallel=4 --compress --compress-threads=2 /var/lib/mysql > /root/backup/backup.xbstream |
백업 결과 파일(.xbstream) 확인
$ du -sh /root/backup/backup.xbstream |
Restore
xbstream 파일 압축풀기
$ xbstream -x < /root/backup/backup.xbstream |
qpress 설치
CentOS / RedHat (centos 7.0에서 진행) |
$ yum install http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm $ yum install qpress |
Ubuntu / Debian |
$ apt-key adv --keyserver keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A echo 'deb http://repo.percona.com/apt VERSION main' >> /etc/apt/sources.list echo 'deb-src http://repo.percona.com/apt VERSION main' >> /etc/apt/sources.list $ apt-get update $ apt-get install qpress |
.qp 파일 압축풀기
$ for i in $(find -name "*.qp"); do qpress -vd $i $(dirname ${i}) && rm -f $i; done |
apply-log로 mysql 데이터 준비
$ innobackupex --apply-log ./ |
mysql 중지(CentOS 7.0)
$ systemctl stop mysql |
기존 DB 삭제 및 백업 DB 복사
$ rm -Rf /var/lib/mysql/* $ innobackupex --copy-back ./ |
mysql 데이터 owner 정보 변경
$ chown -Rf mysql.mysql /var/lib/mysql |
mysql 시작
$ systemctl start mysql |
Reference
http://blog.secaserver.com/2014/11/restoring-xbstream-backup-created-percona-xtrabackup/
Source에서 backup으로 보내기
[Backup Server]
rsync 설치
yum -y install rsyncrsyncd.conf 설정
vi /etc/rsyncd.conf
[192_168_0_6] path = /backup/192.168.0.6 hosts allow = 192.168.0.6 hosts deny = * list = true uid = root gid = root read only = false |
rsyncd 데몬 시작
systemctl restart rsyncd
systemctl enable rsyncd백업용 디렉토리 생성
mkdir /backup/192.168.0.6
[Source Server]
rsyncd 설치
yum -y install rsync백업 수행
rsync -avrz --delete /root/parse 192.168.0.85::192_168_0_6crontab 추가 (10분마다 수행)
crontab -e
*/10 * * * * rsync -avrz --delete /root 192.168.0.85::192_168_0_6 2>&1
※ crontab log 확인
/var/log/cron
Backup에서 Source를 가져오기
[Source Server]
백업 대상 디렉토리 : /data_std
rsync 설치
yum -y install rsyncrsyncd.conf 설정
vi /etc/rsyncd.conf
[data] path = /data_std comment = data uid = root gid = root use chroot = yes read only = yes hosts allow = 192.168.0.85 max connections = 10 timeout 600 |
rsyncd 데몬 시작
systemctl restart rsyncd
systemctl enable rsyncd
[Backup Server]
rysnc 설치
rsync 수행
rsync -avrz --delete 192.168.0.6::data /data
rsync option
-a : 아카이브모드 -v : 백업 진행과정 보기 -r : 지정한 디렉토리의 하위 디렉토리까지 재귀적으로 실행 -z : 데이터 압축전송 delete : 원본에서 삭제된 파일은 백업측에도 삭제(동기화) ignore-errors : 에러무시 -T, temp-dir=/Tmp : 임시파일 저장소 exclude=*.mp4 : 확장자 mp4 파일을 제외하고 동기화 existing : 추가된 파일은 전송하지 않고 갱신된 파일만 전송 stats : 결과를 보고 |
aws s3 cli를 이용하여 버킷 사용량 구하기
[환경]
* CentOS
[aws cli install]
1. python 2.6.5 이상
2. pip 설치
$ yum install python-pip
3. aws cli 설치
$ pip install awscli
4. aws cli 환경설정
$ aws configure
AWS Access Key ID : access key 입력 (관련 값은 Security Credentials>Users 에서 확인 가능)
AWS Secret Access Key : secret access key ( Security Access Key 입력)
Default region name : ap-northeast-2 (seoul region을 이용하는 경우)
Default output format : json
5. 대상 버킷에 대한 사용량 구하기 위한 스크립트
$ aws s3 ls s3://<bucketname> --recursive | grep -v -E "(Bucket: |Prefix: |LastWriteTime|^$|--)" | awk 'BEGIN {total=0}{total+=$3}END{print total/1024/1024" MB"}'
<bucketname>에 사용량 확인을 원하는 bucket명을 입력
핌피(PIMFY)는 Please In My Front Yard의 약자로, 수익성 있는 사업을 내 지방에 유치하겠다는 것으로 일종의 지역이기주의 현상이다. 핵시설이나 쓰레기 매립장 등 혐오시설은 절대로 내 고장에 둘 수 없다는 '님비현상(NIMBY:Not IN MY Back Yard)'과는 정반대 개념이지만, 지역이기주의란 점에서는 같다.
파이썬 내장함수
isinstance(object, classinfo)
Return true if the object argument is an instance of the classinfo argument, or of a (direct, indirect or virtual) subclass thereof. Also return true if classinfo is a type object (new-style class) and object is an object of that type or of a (direct, indirect or virtual) subclass thereof. If object is not a class instance or an object of the given type, the function always returns false. If classinfo is a tuple of class or type objects (or recursively, other such tuples), return true if object is an instance of any of the classes or types. If classinfo is not a class, type, or tuple of classes, types, and such tuples, a TypeError exception is raised.
Changed in version 2.2: Support for a tuple of type information was added.
isinstance는 object가 classinfo의 인스턴스인지 점검 후 True / False 값을 리턴한다.
isinstance를 이용하여 object의 데이터 타입을 확인 할 수 있다.
>>>isinstance( "hello", str)
True