Operation System/Unix & Linux
-
리눅스 환경에서 운영 중인 프로세스의 메모리 사용량을 확인하고 싶을 때가 있습니다. pmap 기본 유틸리티를 활용하면 top이나 ps를 통해 확인하는 메모리 사용량 보다 더 자세한 정보를 확인할 수 있습니다. [root@3408784cf86c /]# pmap --help Usage: pmap [options] PID [PID ...] Options: -x, --extended show details -X show even more details WARNING: format changes according to /proc/PID/smaps -XX show everything the kernel provides -c, --read-rc read the default rc -C, --read-rc-from= ..
pmap을 통한 프로세스 메모리 덤프리눅스 환경에서 운영 중인 프로세스의 메모리 사용량을 확인하고 싶을 때가 있습니다. pmap 기본 유틸리티를 활용하면 top이나 ps를 통해 확인하는 메모리 사용량 보다 더 자세한 정보를 확인할 수 있습니다. [root@3408784cf86c /]# pmap --help Usage: pmap [options] PID [PID ...] Options: -x, --extended show details -X show even more details WARNING: format changes according to /proc/PID/smaps -XX show everything the kernel provides -c, --read-rc read the default rc -C, --read-rc-from= ..
2024.03.07 -
CentOS 8 버전에서 yum 수행 시 발생하는 오류 [root@localhost ~]# yum install -y lsof net-tools openssh-server Failed to set locale, defaulting to C.UTF-8 CentOS Linux 8 - AppStream 56 B/s | 38 B 00:00 Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist 문제 CentOS 8버전부터는 미러 사이트 변경 됨 yum 유틸리티에서 바라보는 mirrorlist 값에 해당하는 주소에 패키지가 없어짐 http://mirror.cento..
CentOS 8, yum 오류 Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlistCentOS 8 버전에서 yum 수행 시 발생하는 오류 [root@localhost ~]# yum install -y lsof net-tools openssh-server Failed to set locale, defaulting to C.UTF-8 CentOS Linux 8 - AppStream 56 B/s | 38 B 00:00 Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist 문제 CentOS 8버전부터는 미러 사이트 변경 됨 yum 유틸리티에서 바라보는 mirrorlist 값에 해당하는 주소에 패키지가 없어짐 http://mirror.cento..
2024.03.06 -
passwd 유틸리티 설치 passwd CentOS yum install -y passwd Ubuntu apt-get install -y passwd 패키지 매니저로 설치가 불가능한 경우 아래 링크를 통해 직접 파일로 다운 받아 설치 합니다. Linux package / utility / libarary 파일 다운로드 리눅스 환경에서 yum 또는 apt-get과 같은 패키지 관리자로 패키지를 다운 받지 못할 때 파일로 준비해야 합니다. package, utility, librarary Repository CentOS Index of /centos mirror.navercorp.com CentOS.. junsuyoun.tistory.com
passwd: command not foundpasswd 유틸리티 설치 passwd CentOS yum install -y passwd Ubuntu apt-get install -y passwd 패키지 매니저로 설치가 불가능한 경우 아래 링크를 통해 직접 파일로 다운 받아 설치 합니다. Linux package / utility / libarary 파일 다운로드 리눅스 환경에서 yum 또는 apt-get과 같은 패키지 관리자로 패키지를 다운 받지 못할 때 파일로 준비해야 합니다. package, utility, librarary Repository CentOS Index of /centos mirror.navercorp.com CentOS.. junsuyoun.tistory.com
2024.01.09 -
sshpass 유틸리티 설 sshpass CentOS yum install -y sshpass Ubuntu apt-get install -y sshpass 패키지 매니저로 설치가 불가능한 경우 아래 링크를 통해 직접 파일로 다운 받아 설치 합니다. Linux package / utility / libarary 파일 다운로드 리눅스 환경에서 yum 또는 apt-get과 같은 패키지 관리자로 패키지를 다운 받지 못할 때 파일로 준비해야 합니다. package, utility, librarary Repository CentOS Index of /centos mirror.navercorp.com CentOS.. junsuyoun.tistory.com
sshpass: command not foundsshpass 유틸리티 설 sshpass CentOS yum install -y sshpass Ubuntu apt-get install -y sshpass 패키지 매니저로 설치가 불가능한 경우 아래 링크를 통해 직접 파일로 다운 받아 설치 합니다. Linux package / utility / libarary 파일 다운로드 리눅스 환경에서 yum 또는 apt-get과 같은 패키지 관리자로 패키지를 다운 받지 못할 때 파일로 준비해야 합니다. package, utility, librarary Repository CentOS Index of /centos mirror.navercorp.com CentOS.. junsuyoun.tistory.com
2023.08.10 -
리눅스 환경에서 "top" 명령어를 통해 확인 결과 load average라는 수치가 확인됩니다. 이 수치는 CPU 사용량을 파악하는데 큰 도움을 주는 정보 입니다. CPU Core # cat /proc/cpuinfo |grep proc processor: 0 processor: 1 processor: 2 processor: 3 processor: 4 processor: 5 processor: 6 processor: 7 processor: 8 processor: 9 processor: 10 processor: 11 할당된 CPU의 코어수를 확인 합니다. CPU의 코어수는 총 12개를 사용할 수 있습니다. CPU Load Average Load Average 수치가 만약 10이라면 현재 일을 처리하고 있는..
리눅스(Linux)의 CPU loadaverage 분석리눅스 환경에서 "top" 명령어를 통해 확인 결과 load average라는 수치가 확인됩니다. 이 수치는 CPU 사용량을 파악하는데 큰 도움을 주는 정보 입니다. CPU Core # cat /proc/cpuinfo |grep proc processor: 0 processor: 1 processor: 2 processor: 3 processor: 4 processor: 5 processor: 6 processor: 7 processor: 8 processor: 9 processor: 10 processor: 11 할당된 CPU의 코어수를 확인 합니다. CPU의 코어수는 총 12개를 사용할 수 있습니다. CPU Load Average Load Average 수치가 만약 10이라면 현재 일을 처리하고 있는..
2023.08.09 -
리눅스 버전을 확인하는 방법 리눅스 버전은 크게 두 가지로 나뉩니다. 페도라 계열, 데비안 계열 페도라 (Fedora) 계열 $ cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) $ cat /etc/centos-release CentOS Linux release 7.9.2009 (Core) 데비안 (Debian) 계열 $ cat /etc/issue Ubuntu 22.04.2 LTS \n \l
리눅스 버전 확인리눅스 버전을 확인하는 방법 리눅스 버전은 크게 두 가지로 나뉩니다. 페도라 계열, 데비안 계열 페도라 (Fedora) 계열 $ cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) $ cat /etc/centos-release CentOS Linux release 7.9.2009 (Core) 데비안 (Debian) 계열 $ cat /etc/issue Ubuntu 22.04.2 LTS \n \l
2023.08.09 -
리눅스 환경에서 네트워크가 간헐적으로 연결이 끊기는 현상이 발생하는 경우 사용할 수 있습니다. 이러한 경우 정확한 지표가 있어야 간헐적 끊김을 증명할 수 있습니다. telnet #!/bin/bash # create by junsuyoun telnet_check_ip= telnet_check_port= telnet_check_log_path= telnet_check_runtime=`date +%s` telnet_check=`telnet $telnet_check_ip $telnet_check_port |exit` telnet_check_endtime=`date +%s` telnet_check_difftime=`expr "$telnet_check_endtime - telnet_check_runtime"` if..
telnet통한 네트워크 상태 체크리눅스 환경에서 네트워크가 간헐적으로 연결이 끊기는 현상이 발생하는 경우 사용할 수 있습니다. 이러한 경우 정확한 지표가 있어야 간헐적 끊김을 증명할 수 있습니다. telnet #!/bin/bash # create by junsuyoun telnet_check_ip= telnet_check_port= telnet_check_log_path= telnet_check_runtime=`date +%s` telnet_check=`telnet $telnet_check_ip $telnet_check_port |exit` telnet_check_endtime=`date +%s` telnet_check_difftime=`expr "$telnet_check_endtime - telnet_check_runtime"` if..
2023.08.08 -
리눅스에서 생각 보다 작은 디렉토리를 지우려고 하는데 속도가 상당히 느린 경우가 있습니다. 그러한 경우 rm -rf 수행 시 상당한 시간이 발생하는데요. 리눅스에서는 파일 관리를 위해 i-node 개념을 사용합니다. 파일 개당 i-node를 가지고 있으며 파일이 삭제되는 경우 해당 i-node를 해제해주어야 합니다. 이러한 이유로 속도 저하에 대해서 rm -rf와 find -delete 속도를 비교해보겠습니다. environ #!/bin/bash # 파일 크기 (바이트 단위) file_size=170 # 파일 개수 file_count=1000000 # 작업할 디렉토리 경로 find_remove_dir="./find_remove" rm_remove_dir="./rm_remove" # 디렉토리 생성 mkdi..
리눅스 100만개(개당170바이트) 파일 삭제 (rm or find) 성능 비교리눅스에서 생각 보다 작은 디렉토리를 지우려고 하는데 속도가 상당히 느린 경우가 있습니다. 그러한 경우 rm -rf 수행 시 상당한 시간이 발생하는데요. 리눅스에서는 파일 관리를 위해 i-node 개념을 사용합니다. 파일 개당 i-node를 가지고 있으며 파일이 삭제되는 경우 해당 i-node를 해제해주어야 합니다. 이러한 이유로 속도 저하에 대해서 rm -rf와 find -delete 속도를 비교해보겠습니다. environ #!/bin/bash # 파일 크기 (바이트 단위) file_size=170 # 파일 개수 file_count=1000000 # 작업할 디렉토리 경로 find_remove_dir="./find_remove" rm_remove_dir="./rm_remove" # 디렉토리 생성 mkdi..
2023.08.07