[성능] heap dump 분석 툴 / heap dump analyzer
·
DevOps/devops
설치 필요 X / 10mb 파일 사이즈 제한 있음 Heap Hero https://heaphero.io/ World-class heap Dump analysis - Java, Android memory dump analyzer How much memory your application wastes? Due to inefficient programming, modern applications waste 30% to 70% of memory. HeapHero is the industry's first tool to detect the amount of wasted memory. It reports what lines of source code originating the memor heaphero.io RE..
[Gradle] gradle 빌드 OOM 발생할땐?
·
devlog/TIL
CI/CD 단계중 빌드단계에서 OOM이 발생하는 경우가 얼마나 될까? 일단 지금까지 여러 어플리케이션의 빌드를 돌려봤지만 처음 경험해 봤다. 🤔 젠킨스 빌드 로그에는 아래와 같이 OutofMemoryError가 발생했다는 로그가 남아있다. 그리고 힙덤프 업로드 알림이 왔다. 힙덤프를 분석해보기 위해 MAT실행 > 분석! 이런 처음 보는 에러가 memory leak의 가장 의심되는 부분이라고 분석되었다. 원인을 위해 해당 검색을 해보았지만 딱히 도움되는 글을 발견하지는 못했다. (가장 관련있어 보이는 stackoverflow의 글 일단 링크) 빌드 oom이니까 gradle의 문제아닐까..? 일단 힙덤프를 봐도 모르겠으니, 다음 타겟인 gradle을 의심해봤다. 관련해서 자료를 찾아보니, gradle dae..
[Jenkins] java.lang.NoSuchMethodError: No such DSL method 'cleanWs' found among steps 에러 해결 방법
·
BE
새로운 Jenkins 인스턴스에서 기존 pipeline 코드 실행하다가 맞이한 에러 에러 코드를 살펴보면 아래와 같은 형태로 나오는데, java.lang.NoSuchMethodError: No such DSL method 'cleanWs' found among steps [...] or symbols [...] or globals [...] steps에도 없고, symbols에도 없고, 따로 지정한 globals에도 없으니 이건 플러그인 미설치때문에 발생한 에러이다. 필요한 플러그인을 설치하자! https://plugins.jenkins.io/ws-cleanup/ Workspace Cleanup This plugin deletes the project workspace when invoked. plugi..
Jenkins 버전 업데이트 & 롤백하는 방법
·
BE
새로운 버전의 Jenkins가 나올때 마다 업데이트 해주면 좋겠지만...다들 귀찮은거 압니다. docker로 운영하는 Jenkins 업데이트가 가~끔 필요할때 이렇게 하면 됩니다! LTS버전 기준으로 원하는 war파일 버전을 찾아주세요 -> https://www.jenkins.io/download/ Jenkins download and deployment Jenkins download and deployment The Jenkins project produces two release lines: Stable (LTS) and regular (Weekly). Depending on your organization's needs, one may be preferred over the other. See th..
Jenkins X 란?
·
BE
Kubernetes 환경에서 CI/CD 툴을 조사하던 중 Jenkins X 를 발견하게 되었다. 널리널리 사용되는 Jenkins! 그런데 좀 더 발전된 버전인가? 어떤 점이 다른지 살펴보자 🤔 Jenkins X? kubernetes 환경에서 CI(=continuous integration) 과 CD(continuous deployment) 를 제공하는 툴 오픈소스 프로젝트, 현재도 열심히 개발되고 있는 프로젝트! 아쉽게도 웹이나 serverless하게 확인해볼수있는 demo는 없지만, 아래 kubecon 영상에서 demo확인 가능 2018 kubecon Jenkins X demo (Jenkins x 뽕에 취해보세요) 특징 Automated CI/CD Github에서 commit, push, PR을 통해 ..
[Python] scp, paramiko 패키지 예제
·
devlog/TIL
파일 업로드에 사용할 python 패키지를 찾다가 scp, paramiko를 사용하여 아래와 같이 개발함! from paramiko import SSHClient from scp import SCPClient def upload_files(target, fileList): scp = connect_to_server() files = [] for file in fileList: filename = file.rstrip() file_full_path = "졀대/상대경로"+ filename scp.put(files=filename, remote_path=file_full_path, recursive=True) # fileList to # scp.put(files=files, remote_path=target_..
대학생때 만들었던 사진 객체로 스티커 (?) 만들기
·
devlog/etc
하드드라이브 정리하다가 발굴해낸 프로젝트. 여담을 하자면 이 프로젝트는 팀플젝이었는데, 4명중 2명이 중국으로 귀국(이라쓰고 도망)가버려서 나머지 2명이 울면서 개발한 프로젝트이다..빤쓰런을 하려면 저 정도 스케일은 되어야 인정을 받을 수 있을 것. 지금은 내용도 다 까먹고, MATLAB도 까먹고, 남은건 코드와 자료들 뿐이지만, 나름 재밌었다. Computational Photography 수업이었음. 문제의? 프로젝트 코드: https://github.com/yayyz/emojify-objects yayyz/emojify-objects Contribute to yayyz/emojify-objects development by creating an account on GitHub. github.com
[프로그래머스] 다리를 지나는 트럭 - 스택/큐
·
BE/algorithm
문제링크 https://programmers.co.kr/learn/courses/30/lessons/42583 코딩테스트 연습 - 다리를 지나는 트럭 트럭 여러 대가 강을 가로지르는 일차선 다리를 정해진 순으로 건너려 합니다. 모든 트럭이 다리를 건너려면 최소 몇 초가 걸리는지 알아내야 합니다. 다리에는 트럭이 최대 bridge_length대 올라갈 programmers.co.kr 문제풀이 import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Queue; class Solution { public int solution(int bridge_length, int weight, int[] ..
[프로그래머스] K번째수 - 정렬
·
BE/algorithm
문제링크 https://programmers.co.kr/learn/courses/30/lessons/42748 코딩테스트 연습 - K번째수 [1, 5, 2, 6, 3, 7, 4] [[2, 5, 3], [4, 4, 1], [1, 7, 3]] [5, 6, 3] programmers.co.kr 문제풀이 import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** * K번째수 * https://programmers.co.kr/learn/courses/30/lessons/42748 */ public class Solution { public int[] solution(int[] array, int[][] commands) { Lis..
[프로그래머스] 완주하지 못한 선수 - 해시
·
BE/algorithm
문제 링크 https://programmers.co.kr/learn/courses/30/lessons/42576 문제 풀이 import java.util.HashMap; import java.util.Map; /** * 완주하지 못한 선수 * https://programmers.co.kr/learn/courses/30/lessons/42576 */ class Solution1 { public String solution(String[] participant, String[] completion) { Map map = new HashMap(); // convert array to hashmap for completion for (String person : participant) { if (map.cont..
[프로그래머스] 모의고사 - 완전탐색
·
BE/algorithm
문제 링크 https://programmers.co.kr/learn/courses/30/lessons/42840 코딩테스트 연습 - 모의고사 수포자는 수학을 포기한 사람의 준말입니다. 수포자 삼인방은 모의고사에 수학 문제를 전부 찍으려 합니다. 수포자는 1번 문제부터 마지막 문제까지 다음과 같이 찍습니다. 1번 수포자가 찍는 programmers.co.kr 문제 풀이 import java.util.ArrayList; import java.util.List; /** * 프로그래머스:완전탐색:모의고사 * https://programmers.co.kr/learn/courses/30/lessons/42840 */ class Solution { public int[] solution(int[] answers) {..
[대충로그] grafana-loki query
·
DevOps/monitoring
loki로 수집된 로그중에 json body (string)에서 값을 쿼리해야한다. loki로 수집된 로그중에 json body (string)에서 값을 쿼리해야한다. {container_name="도커컨테이너명"} |= " orderNo" |= "123123123" { } 안의 값은 label |= 는 로그 파이프라인, 필터처럼 사용
[ubuntu] python을 찾을 수 없다고 할때
·
DevOps/devops
Command 'python' not found, but can be installed with: 라고 뜨는 경우가 있다. 하지만 python은 설치 되어있는데? 🤔고민하지 말고 아래와 같이 입력해주자. # 터미널 (bashrc or bash_aliases) vim ~/.bashrc # bashrc (python3나 원하는 python 버전) alias python=python3 # 터미널 source ~/.bashrc 다시 python을 입력하면, 원하는 버전에 맞게 잘 실행되는것을 확인할 수 있다.
[TIL] pip install 시 "Consider using the `--user` option or check the permissions" 에러
·
DevOps/etc
Consider using the `--user` option or check the permissions. pip로 패키지 설치시 이런 에러가 발생함. 권한이 없는 디렉토리에서 설치하려고 하기 때문에 발생하는 에러. --user 옵션을 넣어서 설치하면 된다. 뭐든 모를땐 man page 나 -h를 사용해서 설명을 읽어본다. --user 옵션은 권한없는 디렉토리 (내경우의 C드라이브)가 아닌 사용자의 디렉토리 (home directory)에 설치해준다. --user Install to the Python user install directory for your platform. Typically ~/.local/, or %APPDATA%\Python on Windows. (See the Python do..
crontab 을 사용해보자
·
DevOps/etc
서버에서 주기적으로 작업을 해야하는 일을 생성할때는 종종 crontab을 사용한다. cron으로 등록된 job list 확인 crontab -l cron에 새로운 job을 등록 crontab -e cron 스케줄 expression 주기적으로 cron을 실행시키기 위해서는 다음의 expression과 함께 등록해야한다. [분] [시간] [날짜/월] [월] [날짜/주] wildcard sign = any 예시 아래와 같이 세팅하면 매주 0시 0분 (자정) 목요일에 해당 file path에 있는 스크립트를 실행 으로 해석하면 된다. 0 0 * * THU [file path] 참고 cron schedule 유용한 링크: https://crontab.guru/