On this page:

33.0Smile CLI Tool (smileutil)

 

The smileutil tool is a standalone command-line tool distributed with Smile CDR that contains a number of utility functions for maintenance and operation of Smile CDR.

It is located in the bin/ directory of the Smile CDR installation.

Commands

The smileutil tool has a number of supported functions, called commands. Each command has a name and a set of supported arguments.

You can see a list of supported commands by simply issuing the command smileutil. For example:

$ bin/smileutil

Usage:
  smileutil {command} [options]

Commands:
  hl7v2-analyze-flatfile     - Test mapping a flat file of HL7 v2.x messages to
                               FHIR using Smile CDR's converter
  hl7v2-transmit-flatfile    - Transmit HL7 v2.x messages using a flat file as a
                               source
(...trimmed...)

You can also see the list of supported arguments for a given command by issuing the command smileutil help [commandname]. For example:

$ bin/smileutil help upload-csv-etl-import-file

Usage:
    smileutil upload-csv-etl-import-file [options]

  Options:
    -b,--basic-auth <arg>       If specified, this parameter supplies a username
                               and password (in the format "username:password") to
                               include in an HTTP Basic Auth header
    -f,--filename <arg>        The filename to include
(...trimmed...)

33.0.1Enabling Debug Logging

 

The --debug flag can be added to all smileutil commands in order to enable verbose debug logging. With this flag set, a file containing the output will also be created called output.log in the current directory.

33.0.2Memory Settings

 

Note that smileutil runs in its own JVM as a discrete process dinstinct from Smile CDR. Like all Java applications, smileutil relies on arguments passed to the Java process at startup to determine the memory characteristics it will have. Althought smileutil defaults to a sensible setting, this can be changed with command line arguments.

For example, to set a max memory of 4g, you would add the following to your command:

env JAVA_OPTS=-Xmx4g

Your command would look something like:

$ env JAVA_OPTS=-Xmx4g bin/smileutil upload-csv-bulk-import-file [options]

A value of -Xmx4g or -Xmx8g may be more appropriate depending on your needs.