Situation
How do I use Vulnerability Manager to automate the command Clear Agent File Cache File that I can run manually through Unix Manager?
How do I automatically clean out the cache file on the Unix agent?
How do I automatically clean out the cache file on the Unix agent?
Resolution
To create and schedule a script to flush the cache file:
- Create the flush cache script in the Unix environment with the following contents:
#!/bin/sh
cd ../../bin
./wcConfig clear-fcache - Name the script, for example
flush_cache
, then place it on the Unix agent in the./vsaunix/{OS}/vsau/bin
directory. - Change the permission to 500 by entering the following command:
chmod 500 flush_cache
- Copy the script to the
./vsaunix/{OS}/vsau/bin
directory on each agent where you want to run the script. - In Vulnerability Manager, expand Security Knowledge > Security Checks.
- Right-click Custom Tasks > New Custom Task.
- Select Show Reports.
- Click UNIX.
- Expand System and select VSAU General Report.
- Click Next.
- Name the report, for example
Flush Agent Cache Files
. - Enter a description for the report.
- In the VSAUCOMMAND area, enter the name you gave the script, for example
flush_cache
. - Click Finish.
- Expand IT Assets > Manage Groups.
- Right-click a host or group.
- Click Run Tasks > Unix.
- Select Custom Task.
- Expand System.
- Select the report previously created, for example Flush Agent Cache Files.
- Click Schedule.
- Set the times you want the task to run.
Additional Information
Formerly known as NETIQKB46506