Friday, June 19, 2026
.::: Check dbsize MariaDB using ls -h OS, with & exclude table :::.
correlation https://teguhth.blogspot.com/2025/12/script-check-size-database-base-on-size.html
1. check dbsize full
sh cek_teguhth.sh
[root@teguhth-all ceksizemaria]# cat cek_teguhth.sh
#!/bin/bash
BASE_DIR="/var/lib/mysql/teguhth"
echo "Database Directory Size Report"
echo "=============================="
printf "%-25s %10s\n" "FOLDER" "SIZE"
echo "------------------------------"
du -sh ${BASE_DIR}/* 2>/dev/null | sort -h | while read size folder; do
printf "%-25s %10s\n" "$(basename "$folder")" "$size"
done
echo "------------------------------"
echo "TOTAL:"
du -sh "$BASE_DIR" | awk '{print $1}'
[root@teguhth-all ceksizemaria]#
Friday, June 12, 2026
.::: Script check IP NAS Mounting in fstab for trouble shooting :::.
1. check df -h
2. cek simple
[root@teguhth8 cekfstab]# more cek_mounting_simple.sh
for ip in $(grep -v '^#' /etc/fstab | awk '$3=="nfs"{print $1}' | cut -d: -f1 | sort -u)
do
ping -c 1 -W 1 $ip >/dev/null
if [ $? -ne 0 ]; then
echo "DOWN: $ip"
fi
done
[root@teguhth8 cekfstab]#
3. check all ip
[root@teguhth8 cekfstab]# cat cek_mounting_allip.sh
#!/bin/bash
for ip in $(grep -v '^#' /etc/fstab | awk '$3=="nfs"{print $1}' | cut -d: -f1 | sort -u)
do
if ping -c 1 -W 1 $ip >/dev/null 2>&1
then
echo "UP : $ip"
else
echo "DOWN : $ip"
fi
done
[root@teguhth8 cekfstab]#
Subscribe to:
Posts (Atom)
Popular Posts
-
Sertifikasi profesional, kadang hanya disebut dengan sertifikasi atau kualifikasi saja, adalah suatu penetapan yang diberikan oleh ...
-
SQL atau Structured Query Language) adalah sebuah bahasa yang digunakan untuk mengakses data dalam basis data relasional. Bahasa ini sec...
-
bagaimana cara mengubah hostid di Solaris The Hostid is a globally unique ID for a Sun Solaris Machine. Sometimes, you need to change t...
-
1. disable selinux 2. enable repo curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/$(rpm -E %{rhel})...
-
DNSPerf and ResPerf are free tools developed by Nominum that make it simple to gather accurate latency and throughput metrics for Domain ...






