ascmd : standalone use

Overview

The "browsing" capability used in Aspera Desktop Client is implemented using the ascmd command (remotely invoked using ssh).

This command is also used by Aspera Orchestrator in the remote file watcher plugin.

For higher level application, the node API shall be used.

Standalone Use

Typically, one would install the IBM Aspera High Speed Transfer Endpoint to get ascmd.

Still, it is possible to do a simpler installation: ascmd requires aspera.conf (to figure out a user's docroot) but not aspera-license. So, it is possible to install the ascmd executable on a system that has an ssh server to benefit from it. Simply create the following aspera.conf file in the same folder as the executable:

<CONF version="2"/>

If you need to specify a docroot, simply provision aspera.conf accordingly.

Note that ascmd also supports the PVCL/PVDR interface provided by the trapd component, so it is able to list files in any object storage in addition to file system. In that case, a proper Aspera product installation is required (Server or Endpoint).

Usage

ascmd comes with a "help", just call with the unknown parameter : -h

# ascmd -h
Unknown command line argument
Aspera ascmd version 3.6.0.115633_linux-64
Aspera ascmd usage:
	Command line options
	-v  enable verbose logs
	-vv enable very verbose logs
	    -D and -DD are synonyms for -v and -vv
	-e  enable exit on error
	-A,--version print ascmd version, then exit
	-V<number>,--protocol=<number> protocol of communication. Max: 2, Default 1

	Command options
	Usage : as_info [client version]
	Usage : as_ls <file/directory>
	Usage : as_rm <file/directory>
	Usage : as_du <file/directory>
	Usage : as_mkdir <directory>
	Usage : as_cp <source file/directory> <destination file/directory>
	Usage : as_mv <source file/directory> <destination file/directory>
	Usage : as_df
	Usage : as_md5sum <file>
	Usage : as_session_init [--host=<hostname>] [--protocol=<number>]
                        [<additional parameters are ignored>]

It is possible to invoke the tool on command line with version 1 like this:

echo 'as_ls /'|ascmd

Or using version 2 (Note that the "-e" is to enable using "\n" in bash's echo):

echo -e 'as_session_init "--host=10.25.0.8" "--protocol=2"\nas_ls "/"\nas_exit'|ascmd -V2


?DLinux 2.6.32-504.8.1.el6.x86_64 #1 SMP Wed Jan 28 21:11:36 UTC 20152.8.0enUSUTF-8
/
??
  dr-xr-xr-xrooroot
2015-03-20 09:40
                2015-03-20 09:402016-01-12 17:41       U
                                                        ??
                                                         U
V?:?lib?                                                  ??
        dr-xr-xr-xrooroot
2016-01-04 10:15
                2016-01-04 10:152016-01-04 10:15       V?F%
V?F%proc?                                                 V?F%

Note also that the output is binary, which explains the garbling. Aspera SDK used to provide a library called: "Command Client" which allowed the decoding. Aspera Orchestrator is able to decode the output, as well as the "aslmcli" command provided in the "asperalm" Ruby Gem.

 

0 Comments

Please sign in to leave a comment.
Powered by Zendesk