Linux2019. 7. 3. 15:15

libxml2를 깔다보니 xmllint가 끌려왔는데

내가 원하는 속성을 한번더 출력하지 않으면 더 행복할거 같은데...

 

xmllint --xpath '//element/@attribute' file.xml
xmlstarlet sel -t -v "//element/@attribute" file.xml
xpath -q -e '//element/@attribute' file.xml
xidel -se '//element/@attribute' file.xml
saxon-lint --xpath '//element/@attribute' file.xml

[링크 : https://stackoverflow.com/questions/15461737/how-to-execute-xpath-one-liners-from-shell]

'Linux' 카테고리의 다른 글

musl / uclibc  (0) 2019.07.15
hostnamectl  (0) 2019.07.10
브릿지를 이용하여 복수개의 네트워크 카드를 허브로 사용하기  (0) 2019.07.03
wget -m (mirror)  (0) 2019.06.26
bash argument list is too long  (0) 2019.06.25
Posted by 구차니
Linux API/network2019. 7. 3. 13:30

음.. 두개는 연관이 없는 건가? 헷갈림

 

raw socket

sd = socket(PF_INET, SOCK_RAW, IPPROTO_UDP);

[링크 : https://www.tenouk.com/Module43a.html]

[링크 : http://naver.pages.kr/140042345641]

 

#define IPPROTO_TCP 6

#define IPPROTO_UDP 17

[링크 : https://unix.superglobalmegacorp.com/BSD4.4/newsrc/netinet/in.h.html]

 

promiscous mode

s = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL))

[링크 : https://sangchul.kr/530]

[링크 : https://stackoverflow.com/questions/114804/reading-from-a-promiscuous-network-device]

 

#define ETH_P_ALL 0x0003 /* Every packet (be careful!!!) */

[링크 : https://github.com/spotify/linux/blob/master/include/linux/if_ether.h]

 

 

PF_*, AF_* 차이(없다)

[링크 : http://blog.naver.com/PostView.nhn?blogId=l18400&logNo=60109296392]

 

AF_INET is used, if you want to communicate using Internet protocols: TCP or UDP.

AF_PACKET is used if you want to play with packets at the protocol level, i.e. you are implementing your own protocol. Only processes with effective UID 0 [root] or the capability CAP_NET_RAW may open packet sockets.

[링크 : https://www.quora.com/Whats-the-difference-between-the-AF_PACKET-and-AF_INET-in-python-socket]

'Linux API > network' 카테고리의 다른 글

TCP timeout  (0) 2020.09.29
UDS (Unix Domain Socket)  (0) 2020.09.01
리눅스 UDP 소켓  (0) 2019.05.24
리눅스 TCP 소켓  (0) 2019.05.24
linux udp cpp example  (0) 2019.05.16
Posted by 구차니
Linux2019. 7. 3. 09:58

말이 기네

간단하게 br0 인터페이스로 여러개의 NIC을 단순 허브로 사용하겠다~ 라는것

 

근데 막상해보니 자기 자신(eth0)의 ip가 먹통이 되듯 외부로 안나가고 외부로 부터 ping도 안되지만

eth1 쪽으로 다른 pc를 물렸을때 다른 pc는 정상적으로 인터넷이 된다.. (이게 머야)

sudo brctl addbr br0
sudo brctl addif eth0
sudo brctl addif eth1
sudo brctl stp br0 off
sudo brctl setageing br0 0
sudo brctl setfd br0 0
sudo ifconfig br0 up

[링크 : https://sugerent.tistory.com/368]

[링크 : https://techglimpse.com/convert-linux-bridge-hub-vm-interospection/]

'Linux' 카테고리의 다른 글

hostnamectl  (0) 2019.07.10
command line xml parse  (0) 2019.07.03
wget -m (mirror)  (0) 2019.06.26
bash argument list is too long  (0) 2019.06.25
sgrep  (0) 2019.06.24
Posted by 구차니
Linux/centos2019. 7. 2. 16:37

결론은.. USB 미디어 잘못이거나 잘못 구워서 다시 잘 구워쓰세요.. 인가?

 

그나저나.. 회사에서 싸게 구매한 샌디스크 USB3.0 32GB 이녀석 하나는

인식도 안되게 날아가더니 얘는 이렇게 이미지가 깨졌나 (한번 설치한적은 있으니 장기간 보관문제?)

설치 미디어가 좀 불안하네

그게 아니라면.. rufus iso 모드로 해서 그런걸까?

 

[링크 : https://blog.naver.com/unsutilizer/221033311684]

[링크 : https://wnsgp.tistory.com/12]

[링크 : https://unix.stackexchange.com/questions/147426/dev-root-does-not-exist-in-centos-7]

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

centos7 minimal / X11 사용하기  (0) 2020.02.04
리눅스 로그인 실패 로그  (2) 2019.07.07
httpd + php + selinux..  (0) 2019.03.20
'abrt-cli status' timed out  (0) 2019.03.01
centos nfs client  (0) 2019.02.27
Posted by 구차니

서버 메모리 어떻게 꽂아야 하나 고민하다 찾는데 이상한 용어 속출 -_-

 

어째.. 그 채널이 내가 아는 그 채널이 아닌 느낌이지만

총 4개의 채널을 지원하고, 데스크 탑 처럼 dual channel 이런건 아니지만 한 채널당 3개 까지 꽂을 수 있다.

그리고 개별 메모리 모듈은 dual rank나 sing rank인데 이건 메모리에 1R / 2R이라고 쓰여진 그녀석

(1R는 대개 단면이고 고용량 메모리, 2R는 양면 이고 저용량 메모리로 많이 붙인 녀석)

아무튼.. 메모리를 많이 붙이다 보니 컨트롤러 달아서 쓰는데 걔는 quad rank인거로 보이고 얘는 LRDIMM으로 되는 듯

 

근데 한개 채널에 메모리를 몇개 populated 시키냐에 따라서 메모리 버스 클럭이 제한되니

2133을 쓰려면 채널당 2개의 DIMM을 꽂아 쓰는게 유리하고

반대로 생각하면, 대용량 메모리로 사용하기 위해서는 굳이 고속 메모리가 필요없다 라고 해석이 된다.

 

Memory bus operating frequency can be 1333 MT/s, 1600 MT/s, 1866 MT/s, or 2133 MT/s depending on the following factors:

DIMM type (RDIMM or LRDIMM)
Number of DIMMs populated per channel
System profile selected (for example, Performance Optimized, Custom, or Dense Configuration Optimized)
Maximum supported DIMM frequency of the processors

Processor 1 
channel 0: slots A1, A5, and A9 
channel 1: slots A2, A6, and A10 
channel 2: slots A3, A7, and A11 
channel 3: slots A4, A8, and A12

 

DIMMs Populated/Channel

[링크 : https://qrl.dell.com/Files/en-us/Html/Manuals/R730/System%20memory]

[링크 : https://www.dell.com/support/manuals/kr/ko/krdhs1/poweredge-r730/r730_ompublication/system-memory]

 

[링크 : https://gigglehd.com/gg/hard/933610]

[링크 : https://en.wikipedia.org/wiki/Memory_rank]

[링크 : https://server007.tistory.com/entry/메모리-single-dual-rank-차이점-혼용가능]

 

RDIMM - Registered DIMM (Reg ?)

LRDIMM - Load Reduced DIMM (Quad Rank?)

[링크 : https://blog.naver.com/thirdwave/220029424653]

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

서버 획득!  (2) 2020.07.12
R420 PERC H310 Mini 용량 인식 테스트  (0) 2019.07.25
dell r510 dvd to hdd  (0) 2019.06.06
option rom  (0) 2019.06.03
서버 (리던던시) 파워  (0) 2019.05.02
Posted by 구차니

솔찍히 회식보다는 일찍 집에 가는게 좋다 ㅠㅠ

회식한다고 9시쯤 출발하면 집에 11시 떨어지니까 ㅠㅠ

Posted by 구차니

태안쪽 다녀왔더니 완전 체력이 바닥났다.

모기 때문에 못자고

새벽에 깨는바람에 일찍 올라오고 하다보니..

 

그 와중에 밥통 고장나서 새로 사게 될거

부모님께 밥통을 물려받아서 좋은데

껍데기랑 알매기다 달라서 대실망 ㅠㅠ

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

딸래미와 포켓몬 고 시작  (0) 2019.07.21
잠에서 헤어나질 못함..  (0) 2019.07.20
밥솥 고장 =_=  (0) 2019.06.27
그늘막 사서 한강에서 놀기  (2) 2019.06.23
먼가 바쁜 하루  (0) 2019.06.22
Posted by 구차니
Programming/node.js2019. 6. 28. 15:55

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

node.js xpath select() select1()  (0) 2019.07.25
node.js xpath apidoc  (0) 2019.07.25
node.js 메모리 사용 가능 용량 늘리기  (0) 2019.06.21
node.js fs.createreadstream highWaterMark  (0) 2019.06.19
node.js xml2js  (0) 2019.06.19
Posted by 구차니

단순하게 두개의 테이블을 합쳐주는 역활을 하는 듯?

 

[링크 : http://www.postgresqltutorial.com/postgresql-union/]

 

+

이름이 서로 다른 항목을 union으로 합치니

postgresql에서 ?column? 으로 나와버려서 이름 바꾸려고 고군분투!

 

SELECT 'name' AS A FROM B

UNION

SELECT 'symbol' AS A FROM C

이런식으로 하면 AS 'A'가 컬럼 명으로 인식되서 나온다!

[링크 : https://social.msdn.microsoft.com/Forums/sqlserver/en-US/cae16db2-c08b-46bd-8b7b-d7941347ad3d/behaviour-of-union-when-select-column-names-differ-and-order-by-is-used?forum=transactsql]

 

[링크 : http://www.postgresqltutorial.com/postgresql-select-distinct/]

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

pgfutter  (0) 2019.08.06
postgres \COPY  (0) 2019.08.06
postgresql csv update  (0) 2019.06.26
postgresql csv import  (0) 2019.06.25
데이터베이스 테이블 복제하기(내용 없이)  (0) 2019.06.25
Posted by 구차니

헐.. 이건.. 대공사이거나 새로사세요 할 거 같은데

 

+

2019.06.28

센터전화하니 내방이나 기사출장으로 확인해봐야 한다고

힌지도 아니고 머라고 해야하나? 아무튼.. 힘받는 부분이라 하판 전부 다 갈아야 하는 대공사가 될 느낌인데?

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

잠에서 헤어나질 못함..  (0) 2019.07.20
체력 완전 오링  (0) 2019.06.30
그늘막 사서 한강에서 놀기  (2) 2019.06.23
먼가 바쁜 하루  (0) 2019.06.22
첫? 간만에? 드라이브  (2) 2019.06.16
Posted by 구차니