Programming/node.js2019. 7. 31. 18:12

일단은.. 8기가 짜리 파일을 잘 토막쳐서 읽고 있다.

예전에는 멀 잘못했는지 오래걸리기도 했고, 조금 읽다 보면 버버버버벅했는데

스트림으로 변경하고 나니 속도 저하도 없고

메모리 사용율 문제나 크래시도 발생하지 않고 있다.

 

다만.. readline 모듈의 경우 output을 process.stdout으로 해주면 프롬프트랑 섞이면서 난리나고

output을 다른 파일로 연결을 하는법을 아직 찾지 못해 헤매는 중..

(그냥 다른 파일로 직접 쓰는 중)

'Programming > node.js' 카테고리의 다른 글

node.js xpath 모듈  (0) 2019.08.08
xpath text()  (0) 2019.08.07
node.js xpath select() select1()  (0) 2019.07.25
node.js xpath apidoc  (0) 2019.07.25
node.js readline()  (0) 2019.06.28
Posted by 구차니
Linux2019. 7. 30. 15:04

awk '{print $2}' | uniq | sort

 

하면 2번째 열 내용만 추출해서 중복을 제거하고 내용을 정렬해서 출력함

 

[링크 : https://zetawiki.com/wiki/리눅스_중복행_제거_uniq]

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

'Linux' 카테고리의 다른 글

awk NR, NF  (0) 2019.08.12
smart trip temperature?  (0) 2019.08.05
musl / uclibc  (0) 2019.07.15
hostnamectl  (0) 2019.07.10
command line xml parse  (0) 2019.07.03
Posted by 구차니
Linux/Ubuntu2019. 7. 30. 14:20

아놔.. 머가 꼬였나 드럽게 안되네.. ㅠㅠ

sudo service postgresql restart

로는 정상적으로 재시작 안되는 것으로 보여서(일단 포트를 바꾸어도 변경이 없음)

아래의 명령을 통해서 해야지 재시작이 되는 듯 하다.

$ pg_ctlcluster
Error: Usage: /usr/bin/pg_ctlcluster    [-- ]
$ sudo pg_ctlcluster 11 main restart

 

----

$ sudo apt-get install postgresql
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다
상태 정보를 읽는 중입니다... 완료
다음의 추가 패키지가 설치될 것입니다 :
  pgdg-keyring postgresql-11 postgresql-client-11 postgresql-client-common postgresql-common sysstat
제안하는 패키지:
  postgresql-doc postgresql-doc-11 libjson-perl isag
다음 새 패키지를 설치할 것입니다:
  pgdg-keyring postgresql postgresql-11 postgresql-client-11 postgresql-client-common postgresql-common sysstat
0개 업그레이드, 7개 새로 설치, 0개 제거 및 5개 업그레이드 안 함.
1,778 k바이트/16.1 M바이트 아카이브를 받아야 합니다.
이 작업 후 53.6 M바이트의 디스크 공간을 더 사용하게 됩니다.
계속 하시겠습니까? [Y/n] y
받기:1 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 sysstat amd64 11.6.1-1 [295 kB]
받기:2 http://apt.postgresql.org/pub/repos/apt bionic-pgdg/main amd64 pgdg-keyring all 2018.2 [10.7 kB]
받기:3 http://apt.postgresql.org/pub/repos/apt bionic-pgdg/main amd64 postgresql-client-common all 203.pgdg18.04+1 [85.3 kB]
받기:4 http://apt.postgresql.org/pub/repos/apt bionic-pgdg/main amd64 postgresql-client-11 amd64 11.4-1.pgdg18.04+1 [1,388 kB]
내려받기 1,778 k바이트, 소요시간 3초 (561 k바이트/초)
패키지를 미리 설정하는 중입니다...
Selecting previously unselected package pgdg-keyring.
(데이터베이스 읽는중 ...현재 196920개의 파일과 디렉터리가 설치되어 있습니다.)
Preparing to unpack .../0-pgdg-keyring_2018.2_all.deb ...
Unpacking pgdg-keyring (2018.2) ...
Selecting previously unselected package postgresql-client-common.
Preparing to unpack .../1-postgresql-client-common_203.pgdg18.04+1_all.deb ...
Unpacking postgresql-client-common (203.pgdg18.04+1) ...
Selecting previously unselected package postgresql-client-11.
Preparing to unpack .../2-postgresql-client-11_11.4-1.pgdg18.04+1_amd64.deb ...
Unpacking postgresql-client-11 (11.4-1.pgdg18.04+1) ...
Selecting previously unselected package postgresql-common.
Preparing to unpack .../3-postgresql-common_203.pgdg18.04+1_all.deb ...
'/usr/bin/pg_config의 /usr/bin/pg_config.libpq-dev(으)로 전환, postgresql-common 패키지' 추가하는 중
Unpacking postgresql-common (203.pgdg18.04+1) ...
Selecting previously unselected package postgresql-11.
Preparing to unpack .../4-postgresql-11_11.4-1.pgdg18.04+1_amd64.deb ...
Unpacking postgresql-11 (11.4-1.pgdg18.04+1) ...
Selecting previously unselected package postgresql.
Preparing to unpack .../5-postgresql_11+203.pgdg18.04+1_all.deb ...
Unpacking postgresql (11+203.pgdg18.04+1) ...
Selecting previously unselected package sysstat.
Preparing to unpack .../6-sysstat_11.6.1-1_amd64.deb ...
Unpacking sysstat (11.6.1-1) ...
sysstat (11.6.1-1) 설정하는 중입니다 ...

Creating config file /etc/default/sysstat with new version
update-alternatives: using /usr/bin/sar.sysstat to provide /usr/bin/sar (sar) in auto mode
Created symlink /etc/systemd/system/multi-user.target.wants/sysstat.service → /lib/systemd/system/sysstat.service.
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for systemd (237-3ubuntu10.24) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
pgdg-keyring (2018.2) 설정하는 중입니다 ...
postgresql-client-common (203.pgdg18.04+1) 설정하는 중입니다 ...
postgresql-common (203.pgdg18.04+1) 설정하는 중입니다 ...

Creating config file /etc/postgresql-common/createcluster.conf with new version
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
  en_us
  ko
Removing obsolete dictionary files:
Created symlink /etc/systemd/system/multi-user.target.wants/postgresql.service → /lib/systemd/system/postgresql.service.
postgresql-client-11 (11.4-1.pgdg18.04+1) 설정하는 중입니다 ...
update-alternatives: using /usr/share/postgresql/11/man/man1/psql.1.gz to provide /usr/share/man/man1/psql.1.gz (psql.1.gz) in auto mode
postgresql-11 (11.4-1.pgdg18.04+1) 설정하는 중입니다 ...
Creating new PostgreSQL cluster 11/main ...
/usr/lib/postgresql/11/bin/initdb -D /var/lib/postgresql/11/main --auth-local peer --auth-host md5
이 데이터베이스 시스템에서 만들어지는 파일들은 그 소유주가 "postgres" id로
지정될 것입니다. 또한 이 사용자는 서버 프로세스의 소유주가 됩니다.

데이터베이스 클러스터는 "ko_KR.UTF-8" 로케일으로 초기화될 것입니다.
기본 데이터베이스 인코딩은 "UTF8" 인코딩으로 설정되었습니다.
initdb: "ko_KR.UTF-8" 로케일에 알맞은 전문검색 설정을 찾을 수 없음
기본 텍스트 검색 구성이 "simple"(으)로 설정됩니다.

자료 페이지 체크섬 기능 사용 하지 않음

이미 있는 /var/lib/postgresql/11/main 디렉터리의 액세스 권한을 고치는 중 ...완료
하위 디렉터리 만드는 중 ...완료
max_connections 초기값을 선택하는 중 ...100
기본 shared_buffers를 선택하는 중... 128MB
selecting default timezone ... Asia/Seoul
사용할 동적 공유 메모리 관리방식을 선택하는 중 ... posix
환경설정 파일을 만드는 중 ...완료
부트스트랩 스크립트 실행 중 ... 완료
부트스트랩 다음 초기화 작업 중 ... 완료
자료를 디스크에 동기화 하는 중 ... 완료

작업완료. 이제 다음 명령을 이용해서 서버를 가동 할 수 있습니다:

    pg_ctlcluster 11 main start

Ver Cluster Port Status Owner    Data directory              Log file
11  main    5432 down   postgres /var/lib/postgresql/11/main /var/log/postgresql/postgresql-11-main.log
update-alternatives: using /usr/share/postgresql/11/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode
postgresql (11+203.pgdg18.04+1) 설정하는 중입니다 ...
Processing triggers for systemd (237-3ubuntu10.24) ...
Processing triggers for ureadahead (0.100.0-21) ...

$ pg_ctlcluster 11 main start
Warning: the cluster will not be running as a systemd service. Consider using systemctl:
  sudo systemctl start postgresql@11-main
Error: You must run this program as the cluster owner (postgres) or root

$ sudo pg_ctlcluster 11 main start

'Linux > Ubuntu' 카테고리의 다른 글

ubuntu virtual desktop  (0) 2019.08.28
ubuntu 18.04 fsck 예약(?)  (0) 2019.08.27
bash-completion  (0) 2019.07.09
우분투 리눅스에 카카오톡 깔기  (2) 2019.07.09
ubuntu sftp with nautilius  (0) 2019.06.03
Posted by 구차니
하드웨어/Storage2019. 7. 30. 06:59

어우.. 요즘 시놀로지 해킹해서 크립토 라커 거는게 심해졌다고 하던데

NAS가 맨날 켜져 있어서 보니.. 헐.. 미친 -_-

게다가 아이피 대역도 완전 달라지면서 2번만 시도하고 도망가서 고민중...

 

[링크 : https://damduck01.com/551]

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

시놀로지 외부 스토리지 연결하기  (0) 2020.09.09
D-Link DNS-343 대실망쇼 -_-  (0) 2020.09.08
disk error recovery - TLER(WD)  (0) 2019.03.13
2.5인치 SAS/SATA 트레이  (0) 2019.02.28
시게이트 SSHD 스펙  (0) 2019.01.16
Posted by 구차니
회사일2019. 7. 26. 18:37

NGS 에서의 출력 결과인 듯

 

[링크 : https://sosal.kr/809]

[링크 : https://3months.tistory.com/156]

'회사일' 카테고리의 다른 글

tpmC?  (0) 2019.08.19
OLTP  (0) 2019.08.19
mosquitto - MQTT broker  (0) 2019.05.15
openM2M  (0) 2019.05.14
비면허 대역(unlicensed)  (0) 2019.05.14
Posted by 구차니
Microsoft/mssql2019. 7. 25. 18:12

-0-??? 없는게 더 이상한거였나?

 

[링크 : https://docs.microsoft.com/ko-kr/sql/relational-databases/import-export/import-flat-file-wizard?view=sql-server-2017]

[링크 : https://tshooter.tistory.com/135]

 

단 새 테이블로만 가능

 

새거에 넣고 복사해냐하나?

[링크 : http:// https://121202.tistory.com/m/107]

'Microsoft > mssql' 카테고리의 다른 글

linux mssql odbc 예제  (0) 2021.10.22
mssql on docker  (0) 2021.10.22
mssql UDL 파일  (0) 2021.10.22
mssql sqlcmd  (4) 2019.05.22
Posted by 구차니

일단 카탈로그 상으로는 3TB 까지 인식된다고 해서 어떻게 되나.. 하고

회사 하드 뒤져보니 4TB 짜리 노는게 있어서 일단 꽂고 켰는데 인식이 안되서(하드 불이 안들어 옴)

핫 스왑으로 뽑았다 꽂으니 이제서야 불이 들어온다.

아무튼.. PERC 설정 들어가니 4TB 정상적으로 인식이 된건가?

 

 

'하드웨어 > Server Case & board' 카테고리의 다른 글

quanta computer windmill F03 소비전력  (0) 2020.07.14
서버 획득!  (2) 2020.07.12
memory rank 와 RDIMM  (0) 2019.07.02
dell r510 dvd to hdd  (0) 2019.06.06
option rom  (0) 2019.06.03
Posted by 구차니
Programming/node.js2019. 7. 25. 14:41

select1()은 attribute 빼낼때 .value로 쓸수 있고

select()는 element 단위로 빼낼때 쓰는 듯

 

xpath 에서 attribute 빼내려면

/Ele@Attr이 아니라

/Ele/@Attr로 해야지 정상적으로 인식한다.

'Programming > node.js' 카테고리의 다른 글

xpath text()  (0) 2019.08.07
node.js readline과 r/w stream  (0) 2019.07.31
node.js xpath apidoc  (0) 2019.07.25
node.js readline()  (0) 2019.06.28
node.js 메모리 사용 가능 용량 늘리기  (0) 2019.06.21
Posted by 구차니
Programming/node.js2019. 7. 25. 13:32

'Programming > node.js' 카테고리의 다른 글

node.js readline과 r/w stream  (0) 2019.07.31
node.js xpath select() select1()  (0) 2019.07.25
node.js readline()  (0) 2019.06.28
node.js 메모리 사용 가능 용량 늘리기  (0) 2019.06.21
node.js fs.createreadstream highWaterMark  (0) 2019.06.19
Posted by 구차니
Programming/xml2019. 7. 25. 12:45

-xpath "@Version" 으로 하면 값과 Atrribute 이름이 같이 출력되는데

Version="" 식으로

 

"string(@Version)" 으로 하면 "" 안의 값만 출력된다.

 

[링크 : https://unix.stackexchange.com/questions/219373/]

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

xpath syntax - attribute 검색 및 특정값 얻기  (0) 2019.08.08
xpath..  (0) 2019.08.01
libxml2 - xmlNodeDump()  (0) 2019.07.09
libxml2  (0) 2019.07.04
xmlstarlet  (0) 2016.05.26
Posted by 구차니