On-Demand Scanning
On-Demand scanning is the process of explicitly scanning a file or directory for viruses. Typically, an on-demand scan is initiated at a scheduled time to scan all or part of the system. When you initiate an on-demand scan, Powertech Antivirus for IBM i processes all of the files in the specified directories for viruses and provides a report of scanning activities.
Powertech Antivirus for IBM i can only track scan status for files in the Root, QOpenSys, and UDFS file systems. Files in other file systems, such as QDLS do not contain this information and consequently will be scanned every time.
On-Demand scanning is usually a long-running process. To minimize the time required to complete a scan, Powertech Antivirus for IBM i does not have to scan files that have already been scanned at the current virus definition level, unless the file has changed. Then as each file is scanned, Powertech Antivirus for IBM i records the scan information with the file. This information can be seen using the WRKLNK command and then option 8 next to the file. For a brief discussion about this, see the About IBM i file scanning attributes section in Powertech Antivirus for IBM i Features.
As Powertech Antivirus for IBM i scans files, the scan status is updated with either *SUCCESS or *FAILURE. Files with *SUCCESS status will not be scanned again until either the file data has changed or the virus definitions have been updated. Finally, the operating system will not allow files marked as *FAILURE to be opened (thus preventing the virus from spreading).
This applies to:
The Powertech Antivirus Scan (AVSCAN) command: Run, or submit to run under a user profile that has *ALLOBJ and *JOBCTL if you want to ensure that all objects in the specified directory tree are scanned
The Run Scan Task (AVRUNTSK) command: Run, or submit to run under a user profile that has *ALLOBJ and *JOBCTL if you want to ensure that all objects in the specified directory tree are scanned.
When Configure Scan Task (AVCFGTSK) is used to configure recurring scans, the scans are configured as scheduled jobs in the IBM i job scheduler. The scheduled job will be initially configured to run under the user profile that executed the AVCFGTSK command.
Configuring, Scheduling, and Initiating an On-Demand scan
- From the Main Menu, choose option 50, Setup Menu (or type AVCHGA at the command line and press F4).
- Choose option 6, Virus Scan Tasks.
-
Here, you can use the available fields to create a scan configuration and schedule scans. See Configure Scan Task (AVCFGTSK) Command for complete details. Press F10 to see all parameters. Powertech Antivirus for IBM i is also pre-configured with the *SYS task, which scans the entire system with recommended settings. To use the pre-configured task, press F4 to see the list of tasks. Type *SYS and press Enter.
- Press Enter to confirm changes and return to the Powertech Antivirus Setup Menu.
- Press F3 to return to the Main Menu.
-
Choose option 1. The Submit Job panel appears.
-
In the 'Command to run' field, the Run AV Scan Task (AVRUNTSK) Command has already been entered (by default) and set to use the included *SYS configuration. Replace this parameter as needed if you have created your own configuration. Add additional parameters as required if you would like to override certain values of the selected configuration.
EXAMPLE:
The following command configures the system task to scan the entire IFS for viruses, clean infected files, quarantine files that cannot be cleaned, and excludes scanning of the CD-ROM drive. The task will start every Saturday at 1am:AVCFGTSK TASK(*SYS) OBJ(('/' *ALL)) OMIT('/QOPT') CLEAN(*YES) CLEANFAIL(*QRN) RUNPTY(99) SCHEDULE (*WEEKLY) SCHEDDAY(*SAT) SCHEDTIME(010000)
- Review the additional job parameters and make adjustments as necessary, then press Enter to submit the scan job.