Programming/angular2019. 2. 18. 17:09

아래와 같은 에러가 발생을 하면서 ie로 확인하면 안되는 경우 

SCRIPT5022: 예외가 발생했지만 catch할 수 없습니다.

polyfills.-------------.bundle.js (1,57771) 


요렇게 하면 된다더라.. (라고 발빼기)

src\polyfills.ts :


/** IE9, IE10 and IE11 requires all of the following polyfills. **/

import 'core-js/es6/symbol';

import 'core-js/es6/object';

import 'core-js/es6/function';

import 'core-js/es6/parse-int';

import 'core-js/es6/parse-float';

import 'core-js/es6/number';

import 'core-js/es6/math';

import 'core-js/es6/string';

import 'core-js/es6/date';

import 'core-js/es6/array';

import 'core-js/es6/regexp';

import 'core-js/es6/map';

import 'core-js/es6/set'; 

[링크 : https://stackoverflow.com/questions/45353619/angular4-application-running-issues-in-ie11]


링크에 의하면 기본값으로 IE9~IE11 호환을 하지 않도록 되어 있어서 발생하는 것으로 추측된다.

'Programming > angular' 카테고리의 다른 글

angular 빌드 최적화(?)  (0) 2019.03.18
angular with reverse proxy  (0) 2019.03.18
angular proxy  (0) 2018.11.02
vscode 및 angular.js 셋팅..  (0) 2018.08.08
Posted by 구차니
프로그램 사용/squid2019. 2. 18. 10:56

이건 또 언제보냐..

일단 뒤에 squid 번역해 보고 나니 조금 이해 되는 듯 한데

이해한 걸 적자면.. ILM(If-Last-Modified) 으로 설정되었을 경우

(현재 시간 - LastModified 시간) * Percent(Squid에서 설정되는 그 값)가 Fresh 하다고 간주되는 시간이다.

근데... 현재 시간이 그럼 늦게 접속하면.. 오랜시간 동안 변하지 않았으니

Fresh로 오랫동안 간주해도 된다는 의미인가?

2019/02/18 - [프로그램 사용/squid] - 끄으으응.. squid 번역을 한번 했어야 했나.. refresh_pattern


The response is stale if the response age is greater than the refresh_pattern max value.

refresh_pattern max 값 보다 응답 시간이 클 경우 응답은 부패한 것 으로 간주합니다.


The response is fresh if the LM-factor is less than the refresh_pattern percent value.

refresh_pattern percent 값 보다 LM-factor가 적을 경우 응답은 신선한 것 으로 간주합니다.


The response is fresh if the response age is less than the refresh_pattern min value.

refresh_pattern min 값 보다 응답 시간이 적을 경우 응답은 신선한 것 으로 간주합니다.


Otherwise, the response is stale.

그 외에는 응답은 부패한 것으로 간주합니다. 


override-expire

When set, this option causes Squid to check the min value before checking the Expires header. Thus, a non-zero min time makes Squid return an unvalidated cache hit even if the response is preexpired.

이 옵션은 Squid가 Expire 헤더를 확인하기 전에 min 값을 확인하도록 설정합니다. 그러므로 0이 아닌 min 값은 Squid가 응답이 만료되기 전이라도 캐시 적중을 무효화 하게 됩니다.


override-lastmod

When set, this option causes Squid to check the min value before the LM-factor percentage.

이 옵션은 Squid가 LM-factor 퍼센트 보다 먼저 min 값을 확인하도록 설정합니다.


reload-into-ims

When set, this option makes Squid transform a request with a no-cache directive into a validation (If-Modified-Since) request. In other words, Squid adds an If-Modified-Since header to the request before forwarding it on. Note that this only works for objects that have a Last-Modified timestamp. The outbound request retains the no-cache directive, so that it reaches the origin server.

이 옵션은 Squid가 no-cache 지시어가 있는 요청을 유효한 (IMS If-Modified-Since)요청으로 변환하도록 설정합니다. 다르게 말하자면, Squid는 IMS(If-Modified-Since) 헤더를 덧붙여서 전달합니다. 이 설정은 Last-Modified 타임스탬프가 존재하는 객체에 대해서만 작동합니다. 

아웃바운드 요청은 no-cache 지시어를 유지하며, 원본 서버에 도달하게 됩니다.


ignore-reload

When set, this option causes Squid to ignore the no-cache directive, if any, in the request.

이 옵션은 Squid가 no-cache 지시어를 무시하도록 설정합니다. 

[링크 : http://etutorials.org/.../Chapter+7.+Disk+Cache+Basics/7.7+refresh_pattern/]

'프로그램 사용 > squid' 카테고리의 다른 글

squid as transparent proxy  (0) 2019.02.19
끄으으응.. squid 번역을 한번 했어야 했나.. refresh_pattern  (0) 2019.02.18
squid access log 종류..  (2) 2019.02.17
mrtf centos  (0) 2019.02.14
squid cache hit rate 올리기  (0) 2019.02.14
Posted by 구차니
프로그램 사용/squid2019. 2. 17. 20:32

일단 쓰면서 보면 제일 눈에 많이 띄는건 아래의 녀석들인데..


TCP_MISS

TCP_INM_HIT

TCP_MEM_HIT

TAG_NONE


HIER_DIRECT

HIER_NONE


HIT는 HIT인데 나머지는 감이 안온다.. ㅠㅠ

찾아도 왜이렇게 안보일까...?

'프로그램 사용 > squid' 카테고리의 다른 글

끄으으응.. squid 번역을 한번 했어야 했나.. refresh_pattern  (0) 2019.02.18
squid LM-factor? (Last Modified)  (0) 2019.02.18
mrtf centos  (0) 2019.02.14
squid cache hit rate 올리기  (0) 2019.02.14
squid 비디오 차단  (0) 2019.02.13
Posted by 구차니

아.. 망했다.. ㅠㅠ

[링크 : https://www.medo64.com/2010/12/extracting-sparse-tar/]

'프로그램 사용 > kvm(virt-manager)' 카테고리의 다른 글

virsh domstats 로 가상머신의 cpu 사용율 확인하기  (0) 2019.03.29
kvm snapshot  (0) 2019.03.17
sparse file nfs /smb  (0) 2019.02.15
virsh create / define  (0) 2019.02.15
kvm 설치  (4) 2019.02.15
Posted by 구차니
Linux2019. 2. 16. 07:43

history를 보는데 어라 *이 머지? 하고 찾아보니

 1035* virsh dumpxml

 1036  ll 


원래 명령어가 아닌 수정된 경우에는 이렇게 표시 된다고..

반대로 생각하면.. 수정해버리면 실제 실행된 명령을 모르게 할 수 있다는 의미네?

Lines prefixed with a ‘*’ have been modified. 

[링크 : https://www.gnu.org/software/bash/manual/html_node/Bash-History-Builtins.html]

'Linux' 카테고리의 다른 글

cron 실행 및 시간 관련 문제  (0) 2019.02.24
linux multi core 압축  (0) 2019.02.22
네트워크 속도 모니터링  (0) 2019.02.03
ls에서 전체년도 보기  (0) 2019.02.03
bcache - SSD write cache  (0) 2019.02.01
Posted by 구차니

'프로그램 사용 > kvm(virt-manager)' 카테고리의 다른 글

kvm snapshot  (0) 2019.03.17
tar 로 압축된 sparse file 풀기  (0) 2019.02.16
virsh create / define  (0) 2019.02.15
kvm 설치  (4) 2019.02.15
sparse file with cp  (0) 2019.02.15
Posted by 구차니

정부랑 방통위랑 뺑뻉이 돌리면서 개소리 하는걸로 밖에 안보인다 정도

그리고 여가부 영향을 받았다는 음모론까지 나올 정도로

일괄되게 "남자들이 야동을 못보게 되서 반대한다"라고 하는데

예상외로 음란물의 비율은 10.72% 정도로 높은편은 아니다


[링크 : http://www.korea.kr/news/actuallyView.do?newsId=148858369&pWise=sub&pWiseSub=B3]


문제는 '불법'을 어떻게 규정짓냐와

기존의 DNS 장난질 보다 한단계 기술적으로 진보된 패킷 분석으로 올라간 것이 문제이고

(단순하게 생각해도 해당 사이트를 막기 위해서는 서버 접속 요청을 모두 감시해야 원하는 목적을 달성 할 수 있다.)

즉, 정부의 입맛대로 '불법'을 규정지어 원하는대로 차단을 하게 되면 피할 방법이 없게 된다는 것이다.


내가 하면 로맨스 남이 하면 불륜도 아니고

테러방지법에 대해서 필리버스터로 막던 민주당의 내로남불 행위로 밖에 볼 수가 없게 된다.

물론 이번에 적용된 SNI 차단이 이번 정권에서 바로 도입하고 승인된거라고 볼 순 없겠지만 (도입시간이 필요하니까)

정통부 해명만 보이고 정부 공식 해명은 없는 상황이기에 결국에는 (이전에도 그래왔던) 정부탓을 할 수 밖에 없다.


이미 ESNI 라고 해서 TLS 1.3 우회기술이 도입전이긴 하지만 사용가능한 우회수단이 존재하는 상황에서

그리고 패킷 정보 조회라는 관점에서 중국의 만리장성 방화벽과 무슨 차이가 있냐라는 의문이 든다.


현재기술/비용으로는 이 정도 패킷 검사는 부하가 크게 걸리지 않아서 가벼운(?) 접속할 서버 이름만 본다지만

좀 더 시간이 지나서 필터링 기술의 CPU 사용량이 적어지거나 하드웨어 제품이 나오게 되었을 경우에도

과연 정부 수준의 Man In The Middle 공격 수준의 패킷 분석을 하지 않을거라는 보장이 있을까?

[링크 : https://en.wikipedia.org/wiki/Man-in-the-middle_attack]


+

웬수와 이야기 하다가 적절해 보이는 예시 생성


정부 공인 "불법" 번호인 010-0000-0000 으로 전화거는 사람을 걸러내기 위해서

정부에서 통신3사의 협조를 구해 이통사로 전화거는 모든 call을 감시하여

해당 번호를 차단한다면 당신은 어떻게 반응할 것인가?

Posted by 구차니

centos 에서 서비스 명을 겨우 찾음.. -_-


# ll /etc/systemd/system/basic.target.wants

합계 0

lrwxrwxrwx. 1 root root 41  1월 16  2017 firewalld.service -> /usr/lib/systemd/system/firewalld.service

lrwxrwxrwx. 1 root root 47  1월 16  2017 gitlab-runsvdir.service -> /usr/lib/systemd/system/gitlab-runsvdir.service

lrwxrwxrwx. 1 root root 41  1월 16  2017 microcode.service -> /usr/lib/systemd/system/microcode.service 

[링크 : https://www.digitalocean.com/.../how-to-use-systemctl-to-manage-systemd-services-and-units]


# systemctl status gitlab-runsvdir

● gitlab-runsvdir.service - GitLab Runit supervision process

   Loaded: loaded (/usr/lib/systemd/system/gitlab-runsvdir.service; enabled; vendor preset: disabled)

   Active: active (running) since 화 2019-01-22 12:42:45 KST; 3 weeks 3 days ago

 Main PID: 620 (runsvdir)

   CGroup: /system.slice/gitlab-runsvdir.service

           ├─  620 runsvdir -P /opt/gitlab/service log: ....................................................................

...

           ├─18710 sleep 3000

           └─18789 sleep 1


 1월 22 12:42:45 localhost.localdomain systemd[1]: Started GitLab Runit supervision process.

 1월 22 12:42:45 localhost.localdomain systemd[1]: Starting GitLab Runit supervision process... 


설치

[링크 : https://wikidocs.net/16279]

[링크 : https://blog.asamaru.net/2015/09/22/how-to-install-gitlib-on-centos/]


업그레이드 및 중지

[링크 : https://hreeman.tistory.com/79]


자동실행

[링크 : https://stackoverflow.com/questions/27983295/gitlab-autostart-on-boot]

'프로그램 사용 > Version Control' 카테고리의 다른 글

git 저장소 합치기  (0) 2019.06.03
gitignore 특정 파일은 예외에서 제외시키기  (0) 2019.04.17
git branch  (0) 2019.01.29
git 윈도우 자격증명 관리  (0) 2019.01.16
git tag  (0) 2018.12.07
Posted by 구차니
하드웨어/RAID2019. 2. 15. 13:44

에에에에에에엥??!?!?!


동일 시스템 아니고 동일 하드가 아니라 다르게 나올수도 있고

다른 서비스 도는게 있어서 전혀 영향이 없다라고 할 순 없는 좀 불공평한 상황이긴 하지만

SAS 10K HDD RAID-5 * 4

SAS 10K HDD RAID-0 * 4

# dd if=/dev/zero of=/home/testfile bs=1G count=1 oflag=direct

1073741824 bytes (1.1 GB) copied, 0.968236 s, 1.1 GB/s


# dd if=/dev/zero of=/home/testfile bs=1M count=1024 oflag=direct

1073741824 bytes (1.1 GB) copied, 0.877165 s, 1.2 GB/s

1073741824 bytes (1.1 GB) copied, 1.67205 s, 642 MB/s

1073741824 bytes (1.1 GB) copied, 1.64823 s, 651 MB/s

1073741824 bytes (1.1 GB) copied, 1.70338 s, 630 MB/s

1073741824 bytes (1.1 GB) copied, 1.67719 s, 640 MB/s


# dd if=/dev/zero of=/home/testfile bs=1G count=1 oflag=direct

1073741824 bytes (1.1 GB) copied, 0.981585 s, 1.1 GB/s

1073741824 bytes (1.1 GB) copied, 1.86161 s, 577 MB/s

1073741824 bytes (1.1 GB) copied, 1.83748 s, 584 MB/s


# dd if=/dev/zero of=/home/testfile bs=512 count=1024 oflag=direct

524288 bytes (524 kB) copied, 0.0448593 s, 11.7 MB/s

524288 bytes (524 kB) copied, 0.0444185 s, 11.8 MB/s

524288 bytes (524 kB) copied, 0.0448892 s, 11.7 MB/s


# dd if=/dev/zero of=/home/testfile bs=512 count=102400 oflag=direct

52428800 bytes (52 MB) copied, 2.87847 s, 18.2 MB/s


# dd if=/dev/zero of=/home/testfile bs=4096 count=102400 oflag=direct

419430400 bytes (419 MB) copied, 3.62074 s, 116 MB/s

419430400 bytes (419 MB) copied, 3.60996 s, 116 MB/s


# dd if=/dev/zero of=/home/testfile bs=1G count=1 oflag=direct

1073741824 bytes (1.1 GB) copied, 1.33766 s, 803 MB/s


# dd if=/dev/zero of=/home/testfile bs=1G count=1 oflag=direct

1073741824 bytes (1.1 GB) copied, 1.33303 s, 805 MB/s

1073741824 bytes (1.1 GB) copied, 2.53404 s, 424 MB/s

1073741824 bytes (1.1 GB) copied, 2.69058 s, 399 MB/s

1073741824 bytes (1.1 GB) copied, 1.35569 s, 792 MB/s

1073741824 bytes (1.1 GB) copied, 2.63433 s, 408 MB/s


# dd if=/dev/zero of=/home/testfile bs=1M count=1024 oflag=direct

1073741824 bytes (1.1 GB) copied, 2.34943 s, 457 MB/s

1073741824 bytes (1.1 GB) copied, 2.39908 s, 448 MB/s

1073741824 bytes (1.1 GB) copied, 1.12215 s, 957 MB/s // 쉬었다가 실행


# dd if=/dev/zero of=/home/testfile bs=512 count=1024 oflag=direct

524288 bytes (524 kB) copied, 0.0496745 s, 10.6 MB/s

524288 bytes (524 kB) copied, 0.0369942 s, 14.2 MB/s

524288 bytes (524 kB) copied, 0.0600279 s, 8.7 MB/s


# dd if=/dev/zero of=/home/testfile bs=512 count=102400 oflag=direct

52428800 bytes (52 MB) copied, 4.08467 s, 12.8 MB/s


# dd if=/dev/zero of=/home/testfile bs=4096 count=102400 oflag=direct

419430400 bytes (419 MB) copied, 6.50347 s, 64.5 MB/s

419430400 bytes (419 MB) copied, 6.21405 s, 67.5 MB/s



내가 멀 잘못했나 해서 보는데 맞는데.. 머지?

Read/ Write 정책에 block size 모두 동일하고.. 우찌된게 RAID-5가 전반적으로 좋냐?


RAID-0


RAID-5 (크.. redundancy 1 흐믓하다)



+

다른 서버

얘는 

삼성 SATA SSD * 2 RAID-0

시게이트 SAS HDD * 6 RAID-0 로 묶인놈


요게 SSD


요건 HDD


RAID 컨트롤러 성능이 문제인가.. 아니면 stripe 사이즈가 문제인가?

예상외로 너무 성능이 안나오는데?

SATA SSD RAID-0 * 2

 SAS 10K HDD RAID-0 * 6

# dd if=/dev/zero of=/home/testfile bs=1G count=1 oflag=direct

1073741824 bytes (1.1 GB) copied, 1.38812 s, 774 MB/s

1073741824 bytes (1.1 GB) copied, 0.837179 s, 1.3 GB/s // 5초 쉬었다


# dd if=/dev/zero of=/home/testfile bs=1M count=1024 oflag=direct

1073741824 bytes (1.1 GB) copied, 0.736994 s, 1.5 GB/s

1073741824 bytes (1.1 GB) copied, 1.03865 s, 1.0 GB/s


# dd if=/dev/zero of=/home/testfile bs=512 count=1024 oflag=direct

524288 bytes (524 kB) copied, 0.0402945 s, 13.0 MB/s

524288 bytes (524 kB) copied, 0.0447082 s, 11.7 MB/s


# dd if=/dev/zero of=/home/testfile bs=512 count=102400 oflag=direct

52428800 bytes (52 MB) copied, 4.22318 s, 12.4 MB/s

52428800 bytes (52 MB) copied, 3.15094 s, 16.6 MB/s


# dd if=/dev/zero of=/home/testfile bs=4096 count=102400 oflag=direct

419430400 bytes (419 MB) copied, 5.89989 s, 71.1 MB/s

419430400 bytes (419 MB) copied, 6.28572 s, 66.7 MB/s

# dd if=/dev/zero of=/mnt/data/testfile bs=1G count=1 oflag=direct

1073741824 bytes (1.1 GB) copied, 1.1833 s, 907 MB/s

1073741824 bytes (1.1 GB) copied, 0.775761 s, 1.4 GB/s


# dd if=/dev/zero of=/mnt/data/testfile bs=1M count=1024 oflag=direct

1073741824 bytes (1.1 GB) copied, 0.52785 s, 2.0 GB/s

1073741824 bytes (1.1 GB) copied, 0.879442 s, 1.2 GB/s


# dd if=/dev/zero of=/mnt/data/testfile bs=512 count=1024 oflag=direct

524288 bytes (524 kB) copied, 0.04629 s, 11.3 MB/s

524288 bytes (524 kB) copied, 0.0437859 s, 12.0 MB/s


# dd if=/dev/zero of=/mnt/data/testfile bs=4096 count=102400 oflag=direct

419430400 bytes (419 MB) copied, 3.37354 s, 124 MB/s

419430400 bytes (419 MB) copied, 3.44868 s, 122 MB/s


# dd if=/dev/zero of=/mnt/data/testfile bs=4096 count=102400 oflag=direct

419430400 bytes (419 MB) copied, 4.17253 s, 101 MB/s

419430400 bytes (419 MB) copied, 4.63281 s, 90.5 MB/s



'하드웨어 > RAID' 카테고리의 다른 글

raid 특성인가?  (0) 2019.02.22
RAID 1+0 구성과 span  (0) 2019.02.19
R730 RAID5 성능 테스트(?)  (0) 2019.02.13
PowerEdge RAID Controller - PERC  (0) 2019.02.12
512b vs 4k sector HDD (Advanced Format - AF)  (0) 2019.02.12
Posted by 구차니

적었나 기억이 안나네..

일단 다른 시스템으로 이전하면서 사용이 가능한지 확인하려고 하는데

dumpxml로 설정을 받아내고(그냥 뱉어내니 파일로 저장을 해주어야 함)

그걸 create 냐 define이냐로 고민을 하고 있는데

(난 도움말 보고 create면 된다라고 하고, 다른 사람은 define으로 해야 한다라고 해서)


fedora 글로는 create면 되는 듯 한데?

# virsh dumpxml GuestID > guest.xml

# virsh create configuration_file.xml 

[링크 : https://docs.fedoraproject.org/..._with_virsh-Creating_a_virtual_machine_XML_dump_configuration_file.html]


일단 define은 생성만 하고 실행을 안하고 create는 pause를 주지 않으면 바로 실행 하는 듯?

실험을 해보니 create로 하면 등록되지 않고 바로 실행되고

define + start가 적합한 등록 방법으로 보인다.

create FILE [--console] [--paused] [--autodestroy]

Create a domain from an XML <file>. An easy way to create the XML <file> is to use the dumpxml command to obtain the definition of a pre-existing guest. The domain will be paused if the --paused option is used and supported by the driver; otherwise it will be running. If --console is requested, attach to the console after creation. If --autodestroy is requested, then the guest will be automatically destroyed when virsh closes its connection to libvirt, or otherwise exits.

Example

virsh dumpxml <domain> > domain.xml

vi domain.xml (or make changes with your other text editor)

virsh create domain.xml


define FILE

Define a domain from an XML <file>. The domain definition is registered but not started. If domain is already running, the changes will take effect on the next boot. 

[링크 : https://linux.die.net/man/1/virsh]

'프로그램 사용 > kvm(virt-manager)' 카테고리의 다른 글

tar 로 압축된 sparse file 풀기  (0) 2019.02.16
sparse file nfs /smb  (0) 2019.02.15
kvm 설치  (4) 2019.02.15
sparse file with cp  (0) 2019.02.15
qcow2 sparse file  (0) 2019.02.14
Posted by 구차니