Friday, June 19, 2026

.::: Check progress restore and backup status MariaDB MarinaDB :::.

  

1. check folder size

watch du -s /var/lib/mysql/teguhth
 

 

.::: 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]#

Popular Posts