Category: AWK programming
The apache server logs the access requests in /var/log/apache2 so we can analyse this log file to find out the last few requests. The following parses the apache2 server …
On Linux, we can cat the file “/proc/meminfo” to display memory related information: $ cat /proc/memoinfo MemTotal: 32939372 kB MemFree: 31155452 kB MemAvailable: 31269760 kB Buffers: 242964 kB Cached: …
The inbuilt BASH does not support floating point arithmetic calculations but we can easily declare a function to do so via AWK. #!/bin/bash # calc.sh function calc() { awk …
The following BASH script uses the ping command and computes the average PING to a domain via awk text processing. #!/bin/bash if ]; then echo Usage: $0 domain exit …
April 24, 2021
AWK, awk, AWK programming, BASH, bash script, BASH Shell, batch script, linux, Shell Scripts, ubuntu
Disk high usage are one of the common cause of server down. Some administrators would create a 8GB empty file, and once the disk usage is exceeding a threshold, …