HEX
Server: Apache/2.4.34 (Red Hat) OpenSSL/1.0.2k-fips
System: Linux WORDPRESS 3.10.0-1160.118.1.el7.x86_64 #1 SMP Thu Apr 4 03:33:23 EDT 2024 x86_64
User: digital (1020)
PHP: 7.2.24
Disabled: NONE
Upload Files
File: //var/opt/OV/bin/instrumentation/readonly-lx-check.sh
#!/bin/bash
# This script send to OM Agent the fs that is mounted readonly 
# Parameters: $1 Monitor Name
# 
# Test only Linux Red Hat
monname=$1

if [ $# -ne 1 ]
then
        echo "Requeired paramenter monitor name"
        exit 1
fi
 
mounts=(`df -Pkhl -x tmpfs -x devtmpfs -x tmpfs -x iso9660 |sed '1d' | awk {'print $6'}`)
for disk in "${mounts[@]}"
do
	diskstatus=(`cat /proc/mounts | grep  $disk | awk {'print $4'}| cut -c1-2`)
	if [ $diskstatus == "ro" ];
	then
          /opt/OV/bin/opcmon $monname=1 -object $disk 
	else
          /opt/OV/bin/opcmon $monname=0 -object $disk 
	fi
done
exit 0