[rhel8.4] ps 명령어
·
OS/Linux&Unix
ps optionmeaning -a세션 리더와 터미널과 연관이 없는 프로세스를 제외한 모든 프로세스를 출력 aBSD 스타일로 터미널과 연관된 모든 프로세스(다른 유저의 프로세스도) 를 출력하거나, x 옵션과 함께 사용되어 모든 프로세스를 출력 -d세션 리더를 제외한 모든 프로세스들을 출력 r실행 프로세스만 출력 xBSD 스타일로 혼자 사용되면 사용자에 의해 소유된 모든 프로세스 출력하며, a 옵션과 함께 사용되어 모든 프로세스 출력 -l상세 내용을 함께 출력 -e모든 프로세스 출력 -f풀 포맷으로 목록을 출력 -h메뉴 x (PID, TTY, STAT, TIME, CMD 등 -j작업에 관련된 ID 를 출력 u프로세스 실행 user, CPU, memory, usage, 상태 등 출력 f프로세스 간 상속관계를..
[Linux] dmidecode 명령어
·
OS/Linux&Unix
dmidecode ==1. dmidecode 란 컴퓨터의 메인보드에 있는 DMI(Desktop Management Interface, SMBIOS) 테이블의 정보를 사람이 읽을 수 있는 ASCII 형태로 출력함 = DMI table을 Decoding 해주는 커맨드 2. 용도 및 목적마더보드의 모델 시리얼, 칩셋 정보, 메모리 뱅크 정보, vendor 정보 등 BIOS에서 확인 가능한 하드웨어 정보를 OS 상에서 확인할 수 있게 한다. 하드웨어에 문제가 생겨  파트 정보를 확인하거나 업그레이드 계획을 세울 때 유용하게 사용된다.==  1) 시스템 정보 출력 $ dmidecode | grep -i -A9 "system information"  2) BIOS 정보 출력$ dmidecode | grep -i -..
[rhel8.4] 네트워크 인터페이스 Bonding
·
OS/Linux&Unix
1.Bonding 인터페이스 생성 $ nmcli connection add type bond con-name [connection-name] ifname [interface-name] bond.options "mode=" 2. Bonding 인터페이스 할당 $ mncli connection add type ethernet slave-type bond con-name [connection-name] ifname [interface-name] master [bond-name] 3. Bonding 인터페이스 IP / GW / DNS 주소 할당 $ mncli connection modify [bond interface] ipv4.addresses [address] ipv4.gateway [address] ipv..
[k8s] imperative command
·
Devops/k8s
kubectl run nginx --image=nginx (deployment) kubectl run nginx --image=nginx --restart=Never (pod) kubectl run nginx --image=nginx --restart=OnFailure (job) kubectl run nginx --image=nginx --restart=OnFailure --schedule"* * * * *" (cronjob) kubectl run nginx --image=nginx \ --restart=Never --port=80 \ --namespace=myname --command -- serviceaccount=mysql --env=HOSTNAME=local \ --labels=bu=instanc..
kubernetes 커맨드 shortcuts
·
Devops/k8s
po - 파드 rs - 레플리카셋 deploy - 디플로이먼트 svc - 서비스 ns - 네임스페이스 netpol - 네트워크 폴리시 pv - 퍼시스턴트 볼륨 pvc - 퍼시스턴트 볼륨 클레임 sa - 서비스 어카운트 숏컷을 사용해서 시간을 줄여보자
[CKAD] rewrite-target 옵션
·
Devops/k8s
Different ingress controllers have different options that can be used to customise the way it works. NGINX Ingress controller has many options that can be seen here. I would like to explain one such option that we will use in our labs. The Rewrite target option. Our watch app displays the video streaming webpage at http://:/ Our wear app displays the apparel webpage at http://:/ We must configur..
[CKAD/Lab] Imperative commands
·
Devops/k8s
Imperative command 예제1) Deploy a redis pod using the redis:alpine image with the labels set to tier=db Either use imperative commands to create the pod with the labels. Or else use imperative commands to generate the pod definition file, then add the labels before creating the pod using the file. $ kubectl run redis --image=redis:alpine --labels tier=db => image 생성 및 label 생성 (kubectl run 명령어를 사..
[CKAD/Lab] - namespace
·
Devops/k8s
namespace 예제 1) Create a POD in the finance namespace. Use the spec given below. Name: redis Image name: redis $ kubectl get pods --namespace=finance $ kubectl get pods -n=finance => 네임스페이스 finance 내의 pod를 확인하는 커맨드 $ kubectl run redis --image=redis --namespace=finance => 네임스페이스 finance 내에 redis 라는 이름으로 redis를 생성하는 커맨드 예제 2) Access the Blue web application using the link above your terminal!! Fro..
python
·
Language/Python
c = """ 연관사이트 페이스북"> 블로그"> 유트브"> """ # 키워드 검색 print(c.find("list_sns")) # 키워드를 이용한 스키핑 c = c[167:] # 필요없는 데이터 날리기 print(c) # 태그를 기준으로 쪼개기 c = c.split("") print(c) print("-----------------------------------------------------------") # c[0] 데이터 출력 print(c[0]) # 각 태그에서 usrl만 출력 url = c[0].split('" target')[0] print(url) # 각 태그에서 usrl만 출력 2 url = url.split('href="')[1] print(url) print("------------..
[Python] decorator
·
Language/Python
# 데코레이터 def decorator_func(original_func): def wrapper_func(*args, **kwargs): # 가변 파라미터를 넣어준다. 파라미터의 갯수가 몇개인지 알 수 없을 때! 연속적인 파라미터를 받을 수 있다. print("{} 함수가 실행되기 전 실행되는 문구".format(original_func.__name__)) return original_func(*args, **kwargs) # 실행한 뒤의 결과값을 출력해야함 return wrapper_func # 실행되지 않은 function 그대로를 출력해야함. @decorator_func # annotation def display_1(): # 앞에 실행되는 로직 print("display_1 함수가 실행되었습니다..
env | grep 기록
'분류 전체보기' 카테고리의 글 목록 (5 Page)