LINUX

In most of the database environments which is maintained on LINUX/UNIX flavours, monitoring is must. Monitoring is one of the most essential DBA activity. The below activies will be monitored in any DBA environments.

  • File system / mount points space
  • Database and listener
  • Database alerts

FILE SYSTEM/ MOUNT POINT SPACE MONITORING

[oracle@linux scripts]$ df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_linux-lv_root 26G 16G 8.1G 67% / tmpfs 1002M 328K 1002M 1% /dev/shm /dev/sda1 485M 52M 409M 12% /boot /dev/sr0 57M 57M 0 100% /media/VBox_GAs_6.1.4 OR [oracle@linux scripts]$ df -P Filesystem 1024-blocks Used Available Capacity Mounted on /dev/mapper/vg_linux-lv_root 26391624 16655852 8395152 67% / tmpfs 1025392 328 1025064 1% /dev/shm /dev/sda1 495844 52419 417825 12% /boot /dev/sr0 58290 58290 0 100% /media/VBox_GAs_6.1.4 [oracle@linux scripts]$ cat checkFs.sh # script to monitor mountpoints #!/bin/bash >/tmp/checkFs.log for i in `df -P|grep "%"|awk {'print $5}'|cut -d"%" -f1` do if [ $i -gt $1 ] then for j in `df -P|grep "$i" |awk {'print $6"-->" $5'}` do echo $j >> /tmp/checkFs.log #mailx -s "ALERT: Mountpoint exceeds the given limit $1" "$gopinathan.d@dbapage.com" << /tmp/checkFs.log done fi done [oracle@linux scripts]$ ./checkFs.sh 70 [oracle@linux scripts]$ cat /tmp/checkFs.log /media/VBox_GAs_6.1.4-->100% [oracle@linux scripts]$

Related Video