To zip the old log files and remove the old vIDM application logs, Download the attached
81220_checkFreeSpace.sh script. The script removes only old and unopened log files and is safe to execute this script.
The script does the following:
- Finds the old vIDM application log files present in /opt/vmware/horizon/workspace/logs folder and compress them and stores the compressed file in the same folder.
- If the compression is successful it removes the old log files and prints SUCCESS and exists with status code 0.
- If compression is not successful then it prints "Failed to compress logs" and exists with status code 1.
Steps on how to run the script.
- Download the attached script 81220_checkFreeSpace.sh to any folder in an vIDM appliance say /home/sshuser.
- Login to the appliance as "sshuser" or "root" user and change directory to /home/sshuser , using command cd /home/sshuser.
- Provide execute permission using command "chmod 755 81220_checkFreeSpace.sh"
- Run the script :
./81220_checkFreeSpace.sh