บทเรียนที่ 1การวิเคราะห์หน่วยความจำ: free -m, /proc/meminfo, slabtop, smem—การตีความหน่วยความจำที่ใช้เทียบกับหน่วยความจำที่มีและพฤติกรรม swapที่นี่คุณจะวิเคราะห์พฤติกรรมหน่วยความจำโดยใช้ free, /proc/meminfo, slabtop และ smem ส่วนนี้解释การแคช บัฟเฟอร์ และการเรียกคืนของ Linux วิธีตีความการใช้ swap และตรวจจับการรั่วไหลของหน่วยความจำ การแยกส่วน และขีดจำกัดที่กำหนดผิด
Reading free -m and understanding cached memoryKey fields in /proc/meminfo for diagnosisUsing slabtop to inspect kernel slab usageUsing smem to attribute memory per processRecognizing swap thrashing and OOM risksบทเรียนที่ 2การใช้เครือข่ายและคอขวด: iftop, nload, ss, netstat, ip -s link, tc, tcpdump—การระบุความอิ่มตัวเครือข่ายและการเชื่อมต่อที่มีปัญหาส่วนนี้ครอบคลุมการวินิจฉัยการใช้เครือข่ายและคอขวดโดยใช้ iftop, nload, ss, ip, tc และ tcpdump คุณจะเรียนรู้การระบุความอิ่มตัว เพื่อนบ้านรบกวน สถานะการเชื่อมต่อ และปัญหาระดับแพ็กเก็ตที่ทำให้แอปพลิเคชันช้า
Monitoring live bandwidth with iftop and nloadInspecting sockets and states with ssUsing ip -s link to view interface errorsBasics of tc for shaping and rate limitingTargeted packet capture with tcpdumpบทเรียนที่ 3ความหน่วงที่เก็บข้อมูลและ I/O ลึก: blktrace, bpftrace (สคริปต์พื้นฐาน), fio สำหรับการทดสอบ—วิธีวัดและตีความความหน่วงและ throughputส่วนนี้ครอบคลุมความหน่วงของที่เก็บข้อมูลและการวิเคราะห์ I/O ลึกโดยใช้ blktrace, สคริปต์ bpftrace พื้นฐาน และ fio benchmarks คุณจะเรียนรู้การวัดความหน่วงและ throughput ตีความความลึกคิว และแยกแยะขีดจำกัดอุปกรณ์จากปัญหาการทำงาน
Understanding latency, IOPS, and throughputUsing blktrace to inspect block I/O patternsIntroductory bpftrace scripts for disk latencyDesigning fio workloads that mimic productionReading fio reports and spotting bottlenecksบทเรียนที่ 4การตรวจสอบกระบวนการ: ps, ตัวกรอง top/htop, pgrep, pidstat, nice/renice—วิธีค้นหากระบวนการหนัก CPU และหน่วยความจำคุณจะเรียนรู้การตรวจสอบกระบวนการด้วย ps, ตัวกรอง top หรือ htop, pgrep, pidstat และ nice หรือ renice ส่วนนี้แสดงวิธีระบุงานหนัก CPU และหน่วยความจำ ติดตาม I/O ต่อกระบวนการ และปรับความสำคัญเพื่อลดการแข่งขัน
Listing and filtering processes with psUsing pgrep and pkill safely and preciselyUsing pidstat for per process CPU and I/OFiltering top and htop by user or resourceAdjusting priorities with nice and reniceบทเรียนที่ 5ภาพรวมทรัพยากรระบบ: top, htop, vmstat, mpstat, dstat—แต่ละตัวแสดงอะไรและรูปแบบผลลัพธ์ที่คาดหวังที่นี่คุณจะเรียนรู้การอ่านภาพรวมทรัพยากรระบบโดยใช้เครื่องมือเช่น top, htop, vmstat, mpstat และ dstat ส่วนนี้มุ่งเน้นการเข้าใจเมตริก CPU, หน่วยความจำ และโหลด และการรับรู้รูปแบบการใช้ปกติเทียบกับพยาธิสภาพ
Key CPU, load, and memory fields in topUsing htop for interactive process analysisvmstat for run queue, swap, and I/O insightmpstat for per-CPU utilization and steal timedstat for combined multi-resource timelinesบทเรียนที่ 6I/O ดิสก์และการตรวจสอบระบบไฟล์: iostat, iotop, sar -d, lsblk, df -h, du -sh, tune2fs, xfs_info—การตรวจจับคอขวด I/O และพื้นที่ต่ำส่วนนี้มุ่งเน้น I/O ดิสก์และสุขภาพระบบไฟล์โดยใช้ iostat, iotop, sar -d, lsblk, df, du, tune2fs และ xfs_info คุณจะเรียนรู้การตรวจจับความอิ่มตัว การสะสมคิว ข้อผิดพลาดระบบไฟล์ และสภาวะพื้นที่ต่ำที่ทำให้ประสิทธิภาพลดลง
Using iostat to spot busy and slow devicesUsing iotop to find I/O heavy processessar -d for historical disk utilization trendsChecking layout and types with lsblk and dfFinding space hogs with du and inode checksบทเรียนที่ 7ล็อกระบบและ journaling: journalctl (systemd), /var/log/messages, /var/log/syslog, ล็อกการรับรอง—สิ่งที่ต้องค้นหาและเหตุผลส่วนนี้อธิบายวิธีใช้ systemd journalctl และไฟล์ล็อกคลาสสิกเช่น /var/log/messages, /var/log/syslog และล็อกการรับรองตัวตน คุณจะเรียนรู้รูปแบบที่ต้องค้นหา วิธีกรอง噪音 และล็อกช่วยการวิเคราะห์สาเหตุรากฐานอย่างไร
journalctl basics and useful filtering optionsReading /var/log/messages and /var/log/syslogFinding errors, warnings, and rate-limited eventsAnalyzing authentication and sudo related logsCorrelating log timestamps with incidentsบทเรียนที่ 8การตรวจสอบตามเวลาและย้อนหลัง: sar, sysstat, collectl—การรวบรวมและอ่านเมตริกย้อนหลังเพื่อเชื่อมโยงเหตุการณ์คุณจะเรียนรู้การรวบรวมและตีความเมตริกย้อนหลังโดยใช้ sar, sysstat และ collectl ส่วนนี้อธิบายการกำหนดเวลารวบรวมข้อมูล อ่านรายงานชุดเวลา และเชื่อมโยงความผิดปกติประสิทธิภาพกับการเปลี่ยนแปลงการกำหนดค่า หรือการปรับใช้
Enabling and configuring sysstat collectionUsing sar for CPU, memory, and I/O historyReading sar network and load average trendsUsing collectl for multi-resource timelinesCorrelating metrics with change windowsบทเรียนที่ 9ข้อมูลเชิงลึกเคอร์เนลและตัววางตาราง: dmesg, sysctl -a, พารามิเตอร์ /proc/sys/vm—ข้อความเคอร์เนลและค่าที่ปรับได้เผยอะไรที่นี่คุณจะสำรวจข้อมูลเชิงลึกเคอร์เนลและตัววางตารางโดยใช้ dmesg, sysctl และพารามิเตอร์ /proc/sys/vm ส่วนนี้อธิบายข้อความเคอร์เนล พารามิเตอร์ที่ปรับได้ และพฤติกรรมตัววางตารางเผยปัญหาฮาร์ดแวร์ การกำหนดค่าผิด และตัวเลือกการปรับแต่ง
Reading dmesg for hardware and driver issuesListing and querying sysctl tunable valuesKey /proc/sys/vm parameters for memoryScheduler related kernel parameters overviewSafely persisting kernel tuning changesบทเรียนที่ 10แนวทางการกำหนดสาเหตุรากฐาน: ต้นไม้การตัดสินใจทีละขั้นตอนเพื่อจำแนกปัญหาเป็น CPU, RAM, I/O ดิสก์ หรือเครือข่ายส่วนนี้นำเสนอต้นไม้การตัดสินใจเชิงปฏิบัติสำหรับการวิเคราะห์สาเหตุรากฐาน คุณจะเรียนรู้การจำแนกเหตุการณ์เป็น CPU, หน่วยความจำ, I/O ดิสก์ หรือเครือข่าย เครื่องมือที่รันในแต่ละสาขา และการปรับปรุงสมมติฐานแบบวนซ้ำโดยใช้หลักฐานที่รวบรวม
Initial triage and problem statementClassifying CPU versus I/O bound symptomsDistinguishing memory pressure from leaksIdentifying network versus local bottlenecksIterative hypothesis testing with metrics