9.8 Sample Monitor Scripts for iFolder Clusters

9.8.1 Linux POSIX File System

If your shared volume uses a Linux POSIX file system, use the following monitor script as a guide:

#!/bin/bash
. /opt/novell/ncs/lib/ncsfuncs
function check_ifolder { 
result=`ps -f -U wwwrun | awk '/mod_mono_server_(admin|ifolder|simias10)/{i++;}END{print i}'`; 
if [[ $result -ne '3' ]];then return 1; else return 0; fi; 
}
# define the IP address
RESOURCE_IP=a.b.c.d
# define the file system type
MOUNT_FS=reiserfs
#define the container name
container_name=name
# define the device
MOUNT_DEV=/dev/evms/$container_name/ifolder
# define the mount point
MOUNT_POINT=/mnt/ifolder
# check the file system
exit_on_error status_fs $MOUNT_DEV $MOUNT_POINT $MOUNT_FS
# check the IP address
exit_on_error status_secondary_ipaddress $RESOURCE_IP
# check iFolder
exit_on_error check_ifolder 
# return status
exit 0

9.8.2 NSS File System

If your shared volume uses the NSS file system, use the following monitor script as a guide:

# define the IP address
RESOURCE_IP=a.b.c.d
#check the file system
##MYPOOL is the name of your NSS pool
exit_on_error status_fs /dev/evms/MYPOOL /opt/novell/nss/mnt/.pools/MYPOOL nsspool
##MYVOL is the name of your NSS volume
exit_on_error ncpcon volume MYVOL
# check the IP address
exit_on_error status_secondary_ipaddress $RESOURCE_IP
# check iFolder
exit_on_error check_ifolder 
#return status
exit 0