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.
    The docroot is a security feature that allows you to restrict the area of the file system that a user, and services run by that user such as the Aspera Watch Service, can access. If a user needs access to the entire file system, set the docroot path as C:\, but you cannot leave it empty.

    Set the user's docroot by running the following command:

    > asconfigurator -x "set_user_data;user_name,username;absolute,docroot"

    For example:

    > asconfigurator -x "set_user_data;user_name,svcAspera;absolute,C:\\"
    success
    user_name: svcAspera
    
    
  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 Watch Service 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.
    > asperawatchd --user username

    Windows requires a password when running services as other users. Enter the password when prompted.

  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 svcAspera user to run your services, you should see the svcaspera daemon listed when you run the following commands:

    > aswatchadmin query-daemons
    [aswatchadmin query-daemons] Found a single daemon:
    	svcaspera
  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.:

    > 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 C:\dataC:\D1 and C:\dataC:\D2 directories, specify C:\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.