Posts
From CPU to Network: A Record of Troubleshooting Application Slowness
· β˜• 11 min read
1. Symptoms The business side reported that the API of application app-a was slow. Looking at the logs, one particular Pod was slow, and deleting that Pod so it moved to another node fixed it. From the monitoring metrics you can see that the Pod’s CPU usage did indeed spike sharply.

Source Code Analysis of Kubernetes Pod IP Management
· β˜• 7 min read
1. Subnet Management by kube-controller-manager kube-controller-manager has many controllers; the one related to Pod IP is NodeIpamController. The NodeIpamController mainly manages the podcidr of nodes: when a new node joins the cluster, it allocates a subnet to that node; when a node is deleted, it reclaims the subnet. The subnets

A Simple Tutorial on Using FFmpeg
· β˜• 2 min read
1. Installing FFmpeg Run this command on macOS: 1 brew install ffmpeg 2. Using FFmpeg 1 ffmpeg {1} {2} -i {3} {4} {5} The five parts of the arguments are, in order: Global arguments, such as -y, -loglevel, -preset, which control the overall behavior Input file arguments, such as -i, -ss, -t, -stream_loop, which control how the input file is read Input file, the path to the audio/video input file to process Output file arguments, such as -c:v, -c:a, -vf, -af, which control the encoding and filtering of the output Output file, the path to the processed output audio/video file Common output arguments:

Some Tips for Optimizing Program Builds
· β˜• 3 min read
Continuously updated… 1. Golang Use trimpath to remove the build path, avoiding exposure of build path information 1 go build -gcflags="all=-trimpath=${PWD}" -asmflags="all=-trimpath=${PWD}" -o ./bin/opscli ./cmd/cli/main.go Before adding it, a panic prints the path /Users/shaowenchen/Code/Github/ops/main.go; after adding it, a panic prints main.go. -ldflags “-w -s” removes debug information and reduces the binary size 1 go build -ldflags "-w -s" -o .

I'm Writing a Copilot for My Ops Tool
· β˜• 5 min read
1. What Is an Ops Tool https://www.chenshaowen.com/ops/ is one of the tools I use most often in day-to-day operations. To operate on machines, I can reuse my previous scripts and perform operations in bulk. To operate on clusters, I can reuse my previous scripts and operate machines without logging into the nodes.