Friday, August 20, 2021

Disk space alert creation script

#!/bin/bash

###########################################################
# This script is to check the space on the Weblogic Mount

###########################################################


CURRENT=$(df /apps | grep / | awk '{ print $5}' | sed 's/%//g')

THRESHOLD=90

if [ "$CURRENT" -gt "$THRESHOLD" ] ; then

mail -s 'Disk Space Alert' XXXXXXXXXXXXX@YYYYYYYY.com << EOF

Your Servername disk remaining free space is critically low. Used: $CURRENT%

EOF

fi

Plan SQL's

SELECT sql_id, plan_hash_value, executions, inst_id FROM gv$sql WHERE sql_id='bhwamkg4y2pxb'; SELECT ...