Tagged articles
strace
39 articles · Page 1 of 1
A comprehensive guide to diagnosing Linux server CPU spikes using systematic evidence chains: verify alert scope, identify processes and threads, distinguish user/kernel/interrupt time, analyze memory and I/O pressure, leverage perf and language runtimes, check container quotas, correlate deployments and cron jobs, and validate fixes with repeatable measurements.
CPUJavaLinux
0 likes · 38 min read

A comprehensive guide to diagnosing CPU spikes on Linux servers, covering system-level analysis with top/vmstat, process/thread identification via ps/pidstat, stack tracing with jstack/perf/py-spy, container/Kubernetes resource limits, and real-world case studies including regex bottlenecks, cron job spikes, and CPU throttling.
Go pprofJava profilingKubernetes resource quotas
0 likes · 65 min read

This article presents a practical guide for system administrators and DevOps engineers, introducing ten high‑frequency Linux tools—htop, iotop, nethogs, ncdu, strace, lsof, tcpdump, netstat/ss, curl, and systemctl/journalctl—detailing their installation, core and advanced usage, real‑world case studies, and how to combine them to dramatically improve troubleshooting speed and overall operational efficiency.
LinuxToolshtop
0 likes · 54 min read

This article walks through a systematic, three‑stage method—starting with a 60‑second global scan using uptime, top, vmstat and mpstat, then pinpointing the offending process and thread with pidstat, perf and strace, and finally classifying the root cause to apply the appropriate fix—so you can diagnose and resolve Linux CPU spikes without resorting to blind restarts.
CPULinuxperf
0 likes · 16 min read

This guide explains when to use telnet, nc, curl, and nmap for TCP, HTTP, UDP, and batch port scanning, includes a ready-to-use shell script that classifies connectivity as open, refused, or timed out with actionable remediation advice, and demonstrates a real Redis firewall diagnosis using nc and strace.
HTTPTCPTelnet
0 likes · 14 min read

This guide walks through using strace together with lsof, vmstat, iostat, and pidstat in a four‑step workflow to pinpoint Linux filesystem bottlenecks, covering VFS core calls, system load checks, disk utilization, per‑process I/O analysis, and detailed file‑operation tracing.
FilesystemLinuxdiagnostics
0 likes · 12 min read

This article provides a comprehensive walkthrough of the Linux I/O stack architecture, explains key performance metrics, demonstrates how to use tools such as iostat, pidstat, strace and lsof, and presents a step‑by‑step case study for locating I/O bottlenecks on a high‑traffic web server.
I/OLinuxiostat
0 likes · 22 min read

This article explains the inner workings of the classic strace command by building a minimal tracer in C, detailing how ptrace attaches to a target process, sets up syscall tracing, waits for signals, reads the ORIG_RAX register, and prints system call names, while also exposing the relevant Linux kernel source.
C++ptracestrace
0 likes · 15 min read

This guide explains what strace is, how it leverages ptrace to intercept system calls, shows installation steps, demonstrates basic and advanced usage patterns, discusses real‑world scenarios, interprets output formats, highlights performance trade‑offs, and compares alternative tracing tools.
Performance Analysislinux debuggingptrace
0 likes · 9 min read

This article explains the inner workings of the classic strace command by walking through a hand‑crafted C program that uses ptrace to attach to a target process, set syscall tracing, wait for signals, read the ORIG_RAX register, and translate syscall numbers into readable names, while also discussing the performance impact of such tracing.
Linuxptracestrace
0 likes · 16 min read

This article walks through a real‑world incident where a PHP service consumed over 80% CPU, detailing how to identify the offending processes with htop, examine their status, trace system calls with strace, inspect file descriptors via lsof, and ultimately locate and correct a looping SQL query that caused the overload.
CPULinuxPHP
0 likes · 8 min read

This article explains the inner workings of the classic strace command by walking through a handcrafted implementation that uses ptrace to attach to a target process, capture its system calls, read the ORIG_RAX register, and print the syscall name, while also detailing the relevant kernel source code.
ptracestracesystem call tracing
0 likes · 15 min read

When initializing a MySQL 5.7.44 instance, the server aborts because the configuration file lacks a trailing newline, causing the parser to misinterpret the final '!includedir' line and report a missing '/etc/my.cnf.' directory, which can be resolved by adding a newline at the end of the file.
ConfigurationInitializationMySQL
0 likes · 12 min read

This article introduces a range of essential Linux performance analysis utilities—including vmstat, iostat, dstat, iotop, top/htop, mpstat, netstat, ps, strace, uptime, lsof, perf, and sar—explains their core options, shows example commands, and clarifies which metrics each tool reports to help engineers monitor and troubleshoot system behavior.
LinuxPerformance Monitoringdstat
0 likes · 15 min read

This article examines how changing the InnoDB parameters innodb_flush_method and innodb_use_fdatasync—especially using O_DIRECT—affects MySQL's interaction with Linux syscalls, demonstrates verification with strace and /proc, and shows performance implications of these low‑level I/O choices.
InnoDBLinuxMySQL
0 likes · 10 min read

After migrating a project to the MDP framework based on Spring Boot, the author observed swap overuse and physical memory far exceeding the 4 GB heap; using JVM native memory tracking, gperftools, strace, pmap, and a custom allocator, they traced a native‑memory leak to Spring Boot’s ZipInflaterInputStream during JAR scanning and resolved it by limiting scan paths.
JVMJavaMemory Leak
0 likes · 12 min read

This article demonstrates how to locate the source of abnormal MySQL connection traffic by identifying the offending socket, tracing its system‑call stack with strace, and correlating the activity to specific application logic such as create/drop database and workload tasks.
MySQLdebuggingmysqlslap
0 likes · 4 min read

After migrating a project to the MDP framework based on Spring Boot, the system repeatedly reported high swap usage despite a 4 GB heap configuration, leading to an investigation that uncovered native memory consumption caused by unchecked JAR scanning and allocator behavior, which was resolved by limiting scan paths and updating Spring Boot's inflater implementation.
JVMNative Memorygperftools
0 likes · 12 min read

The article details a step‑by‑step investigation of a SpringBoot application that repeatedly triggered high swap usage, describing how JVM parameters, native memory tracking, gperftools, strace, and custom memory allocators were used to pinpoint and resolve off‑heap memory leaks caused by the Inflater implementation and glibc memory pools.
JVMJavaNative Memory
0 likes · 12 min read

This article describes a step‑by‑step investigation of a MySQL 8.0.18 startup failure caused by a missing binlog index file after using Percona XtraBackup on CentOS 8, analyzes the root cause, and provides practical fixes and diagnostic techniques such as strace and source‑code inspection.
CentOS8XtraBackupbackup-restore
0 likes · 13 min read

This guide explains how to enable core dumps on Linux, examine the generated core file, and pinpoint the exact source line of a crash using dmesg, addr2line, gdb, and strace, with concrete command examples and code snippets.
Backendaddr2linecore-dump
0 likes · 8 min read

This guide explains how to enable core dumps on Linux, examine the generated core file, and pinpoint the exact source line that caused a crash using dmesg, addr2line, gdb, and strace, with step‑by‑step commands and example code.
Linuxaddr2linecore dump
0 likes · 7 min read

This guide explains what strace is, how to use it for filtering system calls, profiling execution time, diagnosing configuration issues, and tracing network activity, providing concrete command examples and interpretation of output to help troubleshoot Linux processes efficiently.
Linuxdebuggingperformance profiling
0 likes · 16 min read

This guide walks you through Linux process fundamentals and equips you with practical commands—ps, strace, pstack, pstree, gdb, and /proc file inspection—to diagnose, trace, and debug running programs step by step.
LinuxProcess Managementdebugging
0 likes · 10 min read

The article details a step‑by‑step forensic analysis of why a Spring Boot application migrated to the MDP framework consumed far more physical memory than its configured 4 GB heap, uncovering off‑heap allocations caused by native code, package‑scanning, and glibc memory‑pool behavior, and explains how limiting scan paths or upgrading Spring Boot resolves the issue.
JVMNative MemoryOff-heap Memory
0 likes · 12 min read

This article experimentally demonstrates how MySQL's table cache works, showing that it reduces file‑system reads of table definition files, operates per thread, and explains the recommended table_open_cache sizing formula based on concurrency and join complexity.
CacheMySQLdatabase tuning
0 likes · 4 min read

This guide introduces ten fundamental Linux commands—file, ldd, ltrace, strace, hexdump, strings, readelf, objdump, nm, and gdb—explaining how each tool reveals a binary's type, dependencies, function calls, raw bytes, symbols, and runtime behavior for effective reverse‑engineering and debugging.
binary analysisfile commandgdb
0 likes · 14 min read

This guide introduces a collection of classic Linux debugging utilities—including file, ldd, ltrace, hexdump, strings, readelf, objdump, strace, nm, and gdb—explaining their purpose, typical usage, and providing concrete command‑line examples to help developers troubleshoot binaries and libraries efficiently.
command-linedebugginggdb
0 likes · 19 min read

This guide explains how to improve network subsystem performance on Kunpeng processors by using tools such as ethtool and strace, adjusting PCIe payload size, binding NIC interrupts to NUMA‑local cores, tweaking interrupt coalescing, enabling TSO, and replacing select with epoll for high‑concurrency workloads.
EpollKunpengNUMA
0 likes · 12 min read

This article explains core dumps, their history, generation, impact on services, and provides a detailed Linux PHP case study with step‑by‑step debugging using strace, gdb, and ulimit, culminating in root‑cause analysis and remediation recommendations.
LinuxPHPcore dump
0 likes · 31 min read

This article explores practical Python debugging methods—from simple print statements and structured logging to powerful IDE debuggers, GDB, perf, strace, and the inject debugger pylane—providing code examples, best‑practice guidelines, and tips for improving observability and performance in production systems.
Loggingdebugginginject-debugger
0 likes · 20 min read

After moving to Spring Boot, the application consumed up to 7 GB of native memory because Meituan’s MCC package scanner invoked Spring’s ZipInflaterInputStream, which allocated large off‑heap buffers during JAR decompression that were only freed by the JVM finalizer and retained by glibc’s 64 MB arenas; restricting the scan scope or upgrading to Spring Boot 2.0.5 eliminated the excess usage.
JVMMemory LeakNative Memory
0 likes · 13 min read

A colleague noticed a 15‑second pause between the first two ping replies to pop3.sina.net, prompting a deep dive with tcpdump, strace, and DNS tests that revealed the delay was caused by slow local DNS resolution rather than network latency.
latencynetwork troubleshootingping
0 likes · 5 min read


ITPUBJan 17, 2018 · Operations
This guide walks through a systematic troubleshooting workflow for a Linux gateway that spikes to 891% CPU, using top to locate the offending process, inspecting thread usage, capturing stack traces with gstack, dumping core files, tracing system calls with strace, and analyzing the core dump in gdb to pinpoint the poll() call causing the load.
CPULinuxdebugging
0 likes · 5 min read


ITPUBNov 9, 2016 · Operations
This article walks through a real‑world remote debugging session where a high‑CPU issue in a gateway service was reproduced, analyzed with top, gstack, gcore, strace and gdb, and traced to a buffer overflow causing an infinite loop, then fixed.
CPUgdboperations
0 likes · 7 min read

This article explains what strace is, how it works via ptrace, and demonstrates its practical use in diagnosing service startup failures, process exits, shared‑memory errors, and performance bottlenecks through detailed examples and common command‑line options.
LinuxPerformance Analysisstrace
0 likes · 14 min read

This article explains what strace is, how it works, and provides step‑by‑step examples—including fixing a failed service start, tracing nginx, diagnosing process crashes, shared‑memory errors, and performance analysis—to help operations engineers quickly locate and resolve Linux system problems.
Linuxdebuggingoperations
0 likes · 18 min read

Using strace to trace the Linux ‘top’ command reveals that it reads a wealth of system information from the virtual /proc filesystem, where files like cpuinfo, meminfo, stat, and others provide real‑time metrics that power top’s monitoring display.
LinuxSystem Monitoringproc filesystem
0 likes · 4 min read

This article demonstrates how to use strace, including its -c, -T, and -e options, to identify kernel‑level system calls such as clone that cause high CPU consumption in PHP processes on a Linux server, providing step‑by‑step commands and interpretation of the results.
LinuxPHPperformance debugging
0 likes · 4 min read
