|Working With Aspera Watch Service|
When used in conjunction with ascp commands, the Aspera Watch Service allows for fast detection and send of new and deleted items. By comparing snapshots of the file directory it is watching, asperawatchd generates file lists for ascp commands for transfers and delete requests.
To start asperawatchd, follow these steps:
Set the docroot for the user using the asconfigurator utility:
# asconfigurator -x "set_user_data;user_name,username;absolute,docroot"
# asconfigurator -x "set_user_data;user_name,root;absolute,/" success user_name: rootThe asconfigurator command adds the following configuration to the <aaa> section of aspera.conf:
<aaa> <realms> <realm> <users> <user> <name>root</name> <file_system> <access> <paths> <path> <absolute>/</absolute> </path> </paths> </access> </file_system> </user> </users> </realm> </realms> </aaa>
# /opt/aspera/sbin/asperawatchd --user username
Use the aswatchadmin utlity to retrieve a list of running daemons. Daemons are named with the username you passed in when starting the service. For example, if you used the root user to run your services, you should see the root daemon listed when you run the following commands:
# /opt/aspera/bin/aswatchadmin query-daemons [aswatchadmin query-daemons] Found a single daemon: root
A watch is a directory watched by the asperawatchd service. To create a watch, run the following command, where daemon is the username used to start the asperawatchd service and filepath is the directory to watch.:
# /opt/aspera/bin/aswatchadmin create-watch daemon filepath
You can configure asperawatchd to watch multiple directories by creating more than one watch, but Aspera recommends specifying a single watch at the top level directory. Though you can specify as many watches as needed, (for example, one for each directory), specifying a single watch is the most efficient use of memory. For example, to monitor both the /data and /data directories, specify /data as the path for the watch.