Troubleshooting and Debugging Techniques-Coursera 课程 Troubleshooting and Debugging Techniques 搬运自Yout

AID:
CID:
视频图片:
作者头像:
弹幕地址:
视频描述:

热门回复:

  • zyksir:第二周课程笔记 01:13:36 Why is my computer slow? 01:18:32 How Computers Use Resources 01:23:46 Possible Causes of Slowness 01:28:56 Slow Web Server - ab -n 500 site.example.com/ 来测试网页的响应时间 - renice 19 $pid 改变最占用 CPU 的进程优先级 - ps ax | less : 在所有进程中找到特定的进程 - locate filename: 找到文件的绝对路径 - daemonize : 让一个程序在后台运行 - killall -STOP ffmpeg : 所有相关进程 STOP - for pid in $(pidof ffmpeg); do while kill -CONT $pid; do sleep 1; done; done :这里 sleep 1是等待对应 pid 执行完 01:39:21 Writing Efficient Code - gprof; cProfile 01:43:36 Using the Right Data Structures 01:47:31 Expensive Loops 01:52:07 Keeping Local Results 01:56:58 Slow Script with Expensive Loop - pprofile3 -f callgrind -o output.out ./zyk.py kcachegrind output.out 02:04:54 Parallelizing Operations 02:11:20 Slowly Growing in Complexity 02:15:33 Dealing with Complex Slow Systems 02:19:48 Using Threads to Make Things Go Faster - f(a, b) -> executor = futures.ThreadPoolExecutor();executor.submit(f, a, b);executor.shutdown(); 02:25:47 Module 2 Wrap Up: Slowness
  • zyksir:为什么搬运到 b 站:我的 coursera 特别卡,播放视频好慢搞得我心特别累 原课程网址:https://www.coursera.org/learn/troubleshooting-debugging-techniques for quiz and assignments: https://github.com/sambhipiyush/Troubleshooting-and-Debugging-Techniques-Google for notes: http://forlearningsake.com/learning-note-troubleshooting-and-debugging-techniques-week-3/
  • zyksir:第一周内容 0:00 Course Introduction & Intro to Module 1: Troubleshooting Concepts 6:20 What is debugging? - 介绍了一些概念 - 提到了几个 linux 命令:ps/top/free; strace/ltrace; tcpdump/wireshark。课程后期会详细介绍这个几个命令 11:10 Problem Solving Steps - 这里提到修复问题不仅要解决这个 bug(short-term remediation),还要在之后预防这类 bug(long-term remediation) 15:27 Silently Crashing Application - 这里使用了 strace 来解决了一个 bug 21:24 It Doesnt Work 28:37 Creating a Reproduction Case - /var/log/syslog in Linux, /Library/log in MacOS 存储了日志信息 32:57 Finding the Root Cause - IO 相关问题:iotop;iostat;vmstat;ionice - 网络相关问题:iftop; 39:00 Dealing with Intermittent Issues - 加日志 43:55 Intermittently Failing Script - 一个日志格式错误的 example;这里发现问题靠的是经验 - shell 里使用 forms-date-format 来格式化日期 52:57 What is binary search? 56:23 Applying Binary Search in Troubleshooting 1:01:22 Finding Invalid Data