Skip to main content

Command Line Options

Command line options are used to specify the configuration file and to override configuration file options.

Usage​

java -jar easysmf-events.jar [options] [input-file1] [[input-file2] ...]

Configuration File​

OptionArgumentDescription
--config<config-file>Configuration file name, or DD name in the format //DD:DDNAME or dataset name in the format //'DATASET.NAME'

Data Source Options​

SMF in memory resource (real time processing)​

OptionArgumentDescription
--resource<name>Read data from a SMF In Memory Resource

Input Files​

Input files can be specified as positional arguments on the command line.

File Types​

FormatDescriptionExample
Regular fileStandard file pathsmfdata.dat
DD nameDD in JZOS JCL//DD:SMFDATA
Dataset nameDataset name in quotes//'MY.SMF.DATASET'
z/OSMF REST APIz/OSMF REST API URLhttps://zosmf.example.com:10443/zosmf/restfiles/ds/MY.SMF.DATASET

Notes​

The z/OSMF URL is somewhat flexible. It will also accept URLs of the form

  • https://zosmf.example.com:10443/MY.SMF.DATASET
  • https://zosmf.example.com:10443/zosmf/MY.SMF.DATASET

and they will be normalized to the form: https://zosmf.example.com:10443/zosmf/restfiles/ds/MY.SMF.DATASET

Input files override any resource specified in configuration files

Help​

OptionLong OptionDescription
-h--helpPrint usage information and exit

Output​

OptionArgumentDescription
--out<out-file>Write output to a file name, JZOS DD name in the format //DD:DDNAME or dataset name in the format //'DATASET.NAME'. Specify "-" to write to stdout

Time Filtering​

When reading from a dataset or file, start and end times can be specified. Times are local times as used in the SMF record header.

OptionArgumentDescription
--start<start-time>Ignore data from input file with the SMF record time before this time. Format: 2024-01-31T09:00:00
--end<end-time>Ignore data from input file with the SMF record time after this time. Format: 2024-01-31T17:00:00

Security​

OptionDescription
--insecureIgnore https certificate validation errors

Examples​

Process SMF data from a file​

java -jar easysmf-events.jar --config myconfig.txt smfdata.dat

Use DD names and time filter​

//EASYSMF EXEC PGM=JVMLDM17,
// PARM='/ -jar easysmf-events.jar'
//MAINARGS DD DATA,DLM=$$
--config //DD:CONFIG
--start 2024-01-31T09:00:00 --end 2024-01-31T17:00:00
//DD:INPUT
...
$$
//CONFIG DD *
...
//INPUT DD DISP=SHR,DSN=...

Use a dataset name (z/OS)​

java -jar easysmf-events.jar --config //'MY.CONFIG.DATASET' //'MY.SMF.DATASET'

Process SMF data and write to stdout​

java -jar easysmf-events.jar --config myconfig.txt --out - smfdata.dat

Process SMF data with time filtering​

java -jar easysmf-events.jar --config myconfig.txt --start 2024-01-31T09:00:00 --end 2024-01-31T17:00:00 smfdata.dat

Read from SMF In Memory Resource and write to stdout​

java -jar easysmf-events.jar --config myconfig.txt --resource MYRESOURCE --out -

Notes​

  • Command line options override settings in the configuration file
  • A data source must be specified: in the config file, --resource or input files
  • A destination must be specified: either Splunk URL in config file or --out
  • Start and end times cannot be specified when using --resource (SMF real time interface)

Configuration File Options​

Additional options are available through configuration files that are not available as command line options. These include:

  • Splunk connection settings (splunk-url, splunk-hec-token)
  • Compression settings (compress)
  • Timezone configurations (timezones)
  • Processing options (max-post, interval)

See the configuration file documentation for details.