Starting the Aspera Watch Service

The Aspera Watch Service (asperawatchd) is a file system change detection and snapshot service for speed, scale and distributed sources. It discovers changes (such as new files and directories, deleted items, and renames) in source file systems as they occur, eliminating the need to scan the file system. It can be used on any local or shares (CIFS, NFS) host.

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:

  1. Configure a docroot for the user who will run the service.
  2. Ensure the user has permissions to write to the default log directory if no directory is specified.
    For more information about configuring log directories, see asperawatchd Configuration.
  3. Configure the asperawatchd service to run under your user.
    The following command adds the asperawatchd service to the asperarund database; asperarund automatically starts and preserves services in its database. The asperarund service must be running.
    # /opt/aspera/sbin/asperawatchd --user username
  4. Verify that asperawatchd is running under the given user.

    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:
  5. Create a watch.

    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/D1 and /data/D2 directories, specify /data as the path for the watch.

With the Watch Service configured, you can now monitor watches and manage their files as they change. For more information on using watches, see Transferring and Deleting Files with the Aspera Watch Service. The Watch Service can also be used with Watchfolders and IBM Aspera Sync if those services are enabled by your product license.