Linux: Guides and Practical Know-how | Page 15 | mironsoft Blog
Linux
-
Jun 4, 2025
A deployment made of five Bash scripts called one after another leaves behind five isolated log fragments without a shared identifier, fragments that are nearly impossible to reassemble into a coherent flow after the fact. A correlation ID, generated once at the start and consistently passed via an environment variable to every called script and process, turns those fragments into a searchable, connected trace.
-
Jun 4, 2025
A cron job that scans a directory for changes every minute wastes resources and still reacts with delay. The Linux kernel offers two event based mechanisms, inotify and the more powerful fanotify, that report filesystem changes instantly, with no polling involved at all.
-
May 30, 2025
Log files that are never rotated grow silently until a disk fills up and a production server crashes. logrotate keeps log files in check by size or time, compresses old files, and runs hooks such as service restarts after rotation. This article shows a practical configuration for a custom PHP application log and how to test it safely with debug mode before going live.
-
May 29, 2025
Every call to clock_gettime, every timestamp generated by MySQL, and every latency measurement in PHP-FPM depends on the Linux kernel's active clocksource. The Time Stamp Counter (TSC) is orders of magnitude faster than HPET on modern hardware, but was long known for synchronization problems across CPU cores that still produce false expectations and misconfigurations today.
-
May 28, 2025
Processing a 20 GB log file with a Bash loop that collects lines into an array is one of the most reliable ways to push a server into swapping. awk was built from the ground up as a streaming tool, processing each line individually and keeping memory usage nearly constant regardless of file size.
-
May 27, 2025
A new code path in a production Bash script is always a risk, no matter how carefully it was tested. A feature flag turns that all-or-nothing risk into a controllable decision: the new path exists in the script but is off by default, can be enabled for individual runs, and can be switched back off with a single value if something goes wrong.
-
May 27, 2025
The choice of network driver decides whether containers disappear behind NAT sharing one host IP, show up with their own MAC address directly on the physical network, or communicate transparently across multiple hosts. Anyone who does not cleanly separate these three models ends up with either unnecessary performance loss or unexpected security gaps in production.
-
May 24, 2025
A classic firewall filters network traffic by IP address and port, but never sees what's actually inside an HTTP request. A Web Application Firewall inspects exactly that content and detects attack patterns such as SQL injection or cross-site scripting. This article explains the difference, covers rule types, false-positive tuning, and practical configuration basics for ModSecurity and cloud WAFs like Cloudflare or AWS WAF.
-
May 16, 2025
A named pipe (FIFO) behaves like a file on the filesystem but works like a classic pipe: data flows directly from a writer to a reader and never lands on disk. Used correctly, FIFOs decouple independent processes, build logging multiplexers, and avoid the race conditions that intermediate files almost always introduce.
-
May 14, 2025
A zombie process has already terminated, yet its parent process never collected its exit status, leaving a blocked entry in the process table. This guide explains the difference between zombies and orphaned processes, shows why kill -9 is completely ineffective, and gives concrete commands to find the responsible parent process and fix the problem permanently in code.