-
Notifications
You must be signed in to change notification settings - Fork 4
Modes
csmig edited this page Apr 27, 2021
·
3 revisions
STIG Manager Watcher implements two strategies, or modes, for discovering files under the watched path. The desired mode is set by the --mode
option or the WATCHER_MODE
environment variable.
This mode depends on the underlying operating system providing a way to be notified of filesystem changes under --path
. This varies by OS:
OS | Technique |
---|---|
Linux | inotify |
OS X | kqueue |
Solaris | event ports |
Windows | ReadDirectoryChangesW |
- Very fast detection of added files (if well resourced, see Disadvantages)
- Will process the same filename across delete/add cycles
- Resource limits.
- In Windows, ReadDirectryChangesW is hard-coded by Microsoft to monitor a maximum of 64 directories per thread. Node.js is single-threaded.
- In Linux/OS X, larger tress can be monitored but OS resources need to be allocated.
- System utilization low-water mark is higher than
--mode scan
- Will not process files added between executions
This mode scans the --path
every--scan-interval
milliseconds for files with extension .ckl
or .xml
. Each discovered file is passed to the parsing component, where it is processed asynchronously and potentially passed into the cargo queue.
- System utilization low-water mark is very low. Processor load is negligible between scans.
- Can scan very large trees
- Can process files added between executions while ignoring previously processed files, via
--history-file <file>
.
- Slower detection of added files