WebLogic Linux Disk Usage and Delete Action
-
WLSDM disk usage dashbord displays linux server mount point disks ”/appdata”, “/ROOT”, “/data” etc. WLSDM custom action triggers when disk usage exceeds the threshold. Below custom Devops MBean and custom action explains how to display disk usage control by WLSDM DevOps MBean.
WLSDM DevOps MBean Script:
“WLSDM-LinuxDiskUsage” script for display mount disks and “WLSDM-LinuxFindandDelete” custom action for decrease linux server disk usage.
echo DISK_APPDATA=$(df /appdata | grep /appdata | awk '{print $5}' | tr '%' ' ') ; \ echo DISK_ROOT=$(df / | grep / | awk '{print $5}' | tr '%' ' ') ; \ echo DISK_DATA=$(df /data | grep /data | awk '{print $5}' | tr '%' ' ')
WLSDM Custom Action:
Find and Delete x Days Before in server logs and sploutput batch logs.
find /appdata/domains/ccb_domain/servers/. -type f -mtime +1 | grep -E 'log0|out0|err0' | awk '$1' | xargs rm -rf find /appdata/ouaf/sploutput/CCBPROD/ -type f -mtime +3 | grep -E '*' | awk '$1' | xargs rm -rf
WLSDM Chart Output: