리눅스 문제 해결사인 Htop 항목 소개하기Jay Park리눅스/맥에서 시스템(CPU/메모리)과 운영체제/프로세스 상황을 보여주는 top을 대신할 상호대화식 유틸리티인 Htop에 대한 항목을 소개합니다.
학습을 위해 유튜브에 설명 동영상도 올려놓았습니다. https://youtu.be/V6tOpvX-N2I
(프로그래밍 교육/소프트웨어 교육) 교수요목 분석Sangsu Song[메일 주소 변경되었습니다.]
송상수 sssong@swedunet.org / https://www.facebook.com/gi.sik.in / swedunet.org
프로그래밍 수업을 설계할때 제일 먼저 해야하는것은
어떤것을 가르칠 것인가, 교수요목을 뽑아내는 일입니다.
제가 예전에 외국 자료를 바탕으로 교수요목을 뽑아낸 자료입니다. 더 추가들이 필요하지만 다음에 수정하여 올리도록 하겠습니다^^
GDB와 strace로 Hang 걸린 Python Process 원격 디버깅Youngmin KooPython 프로그램을 디버깅하실 때 어떤 툴을 사용하시나요? 아무래도 가장 많이 사용하고 계신 툴은 PyCharm이 아닐까 싶습니다. PyCharm은 JetBrains에서 만든 GUI 환경에서 사용할 수 있는 Python IDE입니다.
PyCharm은:
로컬 컴퓨터에서 디버깅 모드로 (PyDev로) Python 프로세스를 실행할 수 있습니다.
로컬 컴퓨터에서 실행 중인 Python 프로세스에 Attach해 디버깅할 수 있습니다.
원격 서버에서 디버깅 모드로 (PyDev로) Python 프로세스를 실행할 수 있습니다.
하지만 원격에서 동작하고 있는 프로세스에 디버거를 Attach하는 기능은 제공하지 않고 있습니다. 또한 Python 디버깅 모듈인 pdb를 사용하여도 동작하고 있는 프로세스에 Attach하는 것은 지원하고 있지 않습니다.
로컬 환경에서는 문제 없이 돌아갔던 Python 프로그램이 원격 서버에서는 아무런 로그 없이 멈춰 버리는 경우 어디서부터 손을 대야 할지 정말 막막합니다. 이 때 GDB와 strace를 이용하면 어디에서 문제가 발생했는지 진단할 수 있습니다. 이 세션에서는 GDB와 strace를 이용해 디버깅하여 원격 리눅스 서버에서 Python Process가 Hang 되어 버리는 문제를 진단하고 해결했던 경험을 공유하려고 합니다.
NDC2017 언리얼엔진4 디버깅 101 - 게임 기획자, 프로그래머가 버그와 만났을 때 사용할 수 있는 지침들영욱 오게임 기획자, 프로그래머가 버그와 만났을 때 사용할 수 있는 지침들
http://ndcreplay.nexon.com/NDC2017/sessions/NDC2017_0079.html 이곳에서 영상과 슬라이드를 함께 보실 수 있습니다.
Debugging with visual studio. 비주얼 스튜디오를 활용한 디버깅Kiyoung MoonI wanted to share one of debugging skills with visual studio and tips. 비주얼 스튜디오를 활용한 디버깅 스킬과 팁에 관한 내용입니다.
pyOpenCL 입문Seongjun Kim파이썬과 OpenCL을 함께 쓰는 방법을 안내 합니다.
this slides introduce how to use python with OpenCL.
unfortunately, I made this for korean readers only. however, if anyone wants to know this procedure in english, please contact me.
C++ 미정의 행동(undefined behavior)은아 정Undefined behavior 미정의 행동에 대한 간단한 재밌는..?? PT번역
https://github.com/boostcon/cppn ow_presentations_2014/blob/mast er/files/Undefined-Behavior.pdf
파이썬 데이터과학 1일차 - 초보자를 위한 데이터분석, 데이터시각화 (이태영)Tae Young Lee파이썬 데이터과학 - 기초 과정(1일차)
- 데이터분석, 데이터시각화
- jupyter notebook, numpy, pandas, matplotlib, seaborn
2차 과정은 따로 올리겠습니다.
문의 및 제안 : se2n@naver.com
데이터 소스 : https://github.com/sh2orc/datascience
spring data jpa 간단한 튜토리얼라한사 아github : https://github.com/arahansa/learnspringdatajpa
스프링 데이터 Jpa 간단한 튜토리얼 입니다. 초보용^^;
스프링 부트, 메이븐..
내용은 간단한 매핑, CRUD, 페이징, 스프링 부트조금.
More than nexus, better than nexus.Young-Ho ChaThe document discusses building custom Android images based on AOSP (Android Open Source Project) to create a "more than Nexus, better than Nexus" experience. It explains how to download and build the AOSP source code, modify system properties and resources, replace apps, and build images. The goal is to unlock hidden features, improve performance, and add new capabilities without modifying the original source code. In conclusion, with AOSP it is possible to build your own "real Nexus" images and customize the experience beyond what is offered on stock Nexus devices.
NDC2017 언리얼엔진4 디버깅 101 - 게임 기획자, 프로그래머가 버그와 만났을 때 사용할 수 있는 지침들영욱 오게임 기획자, 프로그래머가 버그와 만났을 때 사용할 수 있는 지침들
http://ndcreplay.nexon.com/NDC2017/sessions/NDC2017_0079.html 이곳에서 영상과 슬라이드를 함께 보실 수 있습니다.
Debugging with visual studio. 비주얼 스튜디오를 활용한 디버깅Kiyoung MoonI wanted to share one of debugging skills with visual studio and tips. 비주얼 스튜디오를 활용한 디버깅 스킬과 팁에 관한 내용입니다.
pyOpenCL 입문Seongjun Kim파이썬과 OpenCL을 함께 쓰는 방법을 안내 합니다.
this slides introduce how to use python with OpenCL.
unfortunately, I made this for korean readers only. however, if anyone wants to know this procedure in english, please contact me.
C++ 미정의 행동(undefined behavior)은아 정Undefined behavior 미정의 행동에 대한 간단한 재밌는..?? PT번역
https://github.com/boostcon/cppn ow_presentations_2014/blob/mast er/files/Undefined-Behavior.pdf
파이썬 데이터과학 1일차 - 초보자를 위한 데이터분석, 데이터시각화 (이태영)Tae Young Lee파이썬 데이터과학 - 기초 과정(1일차)
- 데이터분석, 데이터시각화
- jupyter notebook, numpy, pandas, matplotlib, seaborn
2차 과정은 따로 올리겠습니다.
문의 및 제안 : se2n@naver.com
데이터 소스 : https://github.com/sh2orc/datascience
spring data jpa 간단한 튜토리얼라한사 아github : https://github.com/arahansa/learnspringdatajpa
스프링 데이터 Jpa 간단한 튜토리얼 입니다. 초보용^^;
스프링 부트, 메이븐..
내용은 간단한 매핑, CRUD, 페이징, 스프링 부트조금.
More than nexus, better than nexus.Young-Ho ChaThe document discusses building custom Android images based on AOSP (Android Open Source Project) to create a "more than Nexus, better than Nexus" experience. It explains how to download and build the AOSP source code, modify system properties and resources, replace apps, and build images. The goal is to unlock hidden features, improve performance, and add new capabilities without modifying the original source code. In conclusion, with AOSP it is possible to build your own "real Nexus" images and customize the experience beyond what is offered on stock Nexus devices.
웹표준과 자동화의 약속된 승리Young-Ho Chapython과 webkit을 이용해서 영화표를 자동으로 예매했던 경험을 공유한 발표자료입니다.
python korea 2013년 5월에 사용했었습니다.
현재 자동예매 스크립트는 각 영화관 사이트의 개편으로 인해 동작하지 않습니다. OTL
Introduce native clientYoung-Ho ChaNative Client (NaCl) allows web browsers to run compiled native code modules in a sandboxed environment for increased performance and functionality. NaCl code is portable across CPUs, OSes, and browsers. It offers benefits over plugins like Flash by being more secure, integrated, and higher performing while allowing access to capabilities like graphics, audio, and input. NaCl code is distributed as self-contained modules that browsers can verify and run in an isolated sandbox.
Introduce gobject introspectionYoung-Ho ChaGObject Introspection provides a way for language bindings to access GObject-based libraries without needing separate bindings libraries. It uses annotations in library source code to generate metadata about APIs. When an API changes, only the library needs to be recompiled rather than each language binding. This metadata allows languages to access the libraries directly through a common C-based introspection mechanism.
10. 문제점
● 느리다!
● 뭐라고 하는지 하나도 모르겠다.
● 뭐라고 나오긴 하는데, 너무 많이 나온다.
● 실제로 어디서 얼마만큼 걸렸는 지 짐작도 안
된다.
● python만 된다.
11. 필요한 것
● 문제점을 뒤집으면 필요한 것이 됨.
● 원하는 메소드의 시작 시간과 끝 시간을 알 수
있어야 한다.
● 쉽게 켜고 끌 수 있어야 한다.
12. 일반적인 측정 방식
def method1():
blahblah
return r
def method1():
start = time.time()
blahblah
end = time.time()
print 'method1()', start, end - start
return r
13. 일반적인 측정 방식
def method1():
blahblah
return r
@trace
def method1():
blahblah
return r
def trace(func):
def wrapper(*args, **kwds):
start = time.time()
r = func(*args, **kwds)
end = time.time()
print func.__name__ + ''()', start,
end - start
return r
return wrapper
15. 구현 노트
● 단순히 "MARK: xxx: some_method" 라는 파
일이름(?)으로 접근만 하면 된다.
16. 구현 및 싵ӗ
● 구현
○ https://github.com/ganadist/ptrace
17. 장점
● 구현이 간단
● 나름대로 portable
○ system call만 가로챌 수 있으면 됨.
○ 파싱하는 부분만 해당 OS의 형식에 따라 수정하면 완
료
18. 또 다른 문제점
● 여전히 느리다.
○ syscall hook 는 비용이 많이 든다.
● 많은 것을 표현하기 힘들다.
○ 이미지를 무한히 키울 수 없다.
● 호출 순서(call stack)를 확인하기 힘들다.
○ 1차원 적으로만 표현된다.
● 무엇때문에 거기서 시간을 쳐묵쳐묵 하는지
알 수가 없다.
○ 지정한 이벤트만 표시된다.
21. 구현 및 싵ӗ
● 구현
○ https://github.com/ganadist/systrace
22. 아직도 남은 문제점..
● 여전히 느리다.
○ 불확정성의 원리
○ 측정하려는 행위 자체가 측정을 부정확하게 만든다.
● 여전히 많은 것을 표현하기 힘들다.
○ 커널 메모리에 저장됨.
○ 무한히 데이터를 모을 수 없다.
○ 하지만 순간적인 상황에 대해서는 아주 유용하다.
● 특정 환경에서만 실행 가능
○ linux ftrace 기반
○ linux 2.6.33 이상에서 사용 가능
23. 그럼에도 불구하고.
● python profile api는 쓸만함.
○ 그리고 훨씬 빠른 cProfile
● profiler가 모든 것을 해결해주지 않음
○ 아무리 삽질하고 x랄을 떨어도 Fiat 500 이 Red
X1 가 될 수 없다.
■ 그대신 Fiat 500 을 Vettel 이 운전하는 효과는 누
릴 수 있음.
■ 해당 프로그램이 낼 수 있는 최대 속도를 짐작할
수 있게 해줌.
○ 필요할 때 적당한 도구를 써야.
○ 그리고 결국 분석 및 개선은 결국 사람이 해야 함.