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
| Option | Argument | Description |
|---|---|---|
--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)
| Option | Argument | Description |
|---|---|---|
--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
| Format | Description | Example |
|---|---|---|
| Regular file | Standard file path | smfdata.dat |
| DD name | DD in JZOS JCL | //DD:SMFDATA |
| Dataset name | Dataset name in quotes | //'MY.SMF.DATASET' |
| z/OSMF REST API | z/OSMF REST API URL | https://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.DATASEThttps://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
| Option | Long Option | Description |
|---|---|---|
-h | --help | Print usage information and exit |
Output
| Option | Argument | Description |
|---|---|---|
--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.
| Option | Argument | Description |
|---|---|---|
--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
| Option | Description |
|---|---|
--insecure | Ignore 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,
--resourceor 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-auth) - Compression settings (
compress) - Timezone configurations (
timezones) - Processing options (
max-post,interval)
See the configuration file documentation for details.