( ** Go back to PARENTPAGE ../Script-for-Realtime-Monitoring-of-System-Directories.html)
( ** Go back to HOMESITE https://www.tcnd.com)
( ** Go back to SetSphere https://www.setsphere.com)
Calling ASPL from UNIX shell script to monitor a UNIX directory
The following UNIX shell script shows how to monitor directories on UNIX filesystems.
The script calls ASPL to save the directory content (subdirectories and files) as a group in ASPL set variable,
then interrogating the variable to monitor changes in the directory. Here we show the intermittent changes between
the instances of the directory. See also ASPL User Guide for the script monitordir.aspl, the simplest way to
monitor directories using ASPL differential group variable.
1 Cmd#1 on Machine mm01 User root
(ndxNo=1 Cmd# No=1 on Machine mm01 User root no_tm_u_h_cwd=0:6:8 root@mm01 /opt/ASPLv1.00/test~/MONITOR-CHANGES-IN-DIRECTORY u_h=root@mm01)
BASH 0:6:8 root@mm01 /opt/ASPLv1.00/test~/MONITOR-CHANGES-IN-DIRECTORY # dirchange-monitor-delta-alternate.sh /tmp/testdir1
run dirchange-monitor-delta-alternate.sh monitoring /tmp/testdir1
2 Cmd#2 on Machine mm01 User root
(ndxNo=2 Cmd# No=2 on Machine mm01 User root no_tm_u_h_cwd=0:7:33 root@mm01 /opt/ASPLv1.00/test~/MONITOR-CHANGES-IN-DIRECTORY u_h=root@mm01)
BASH 0:7:33 root@mm01 /opt/ASPLv1.00/test~/MONITOR-CHANGES-IN-DIRECTORY #