---
updatedAt: 2026-07-16T20:43:52.000Z
---

# pblog | EPM-UL

The **pblog** program selectively displays entries from an event log. Each time a job is accepted, rejected, or completed, or a keystroke action event occurs, an entry is appended to the event log file. The event log file is specified by the “authevt=” label in **eventdestinations** setting or the **eventlog** setting in the settings file, or by the **eventlog** variable in the EPM-UL policy file. By default, the **eventlog** variable is set to **/var/log/pb.eventlog**, **/usr/log/pb.eventlog**, **/var/adm/pb.eventlog**, or **/usr/adm/pb.eventlog**, depending on the operating system.

With no command line arguments, **pblog** reads and displays all entries in the default event log file. You can specify a different event log with the **-f** or **--eventlog** argument. You can specify a decryption key file with the **-k** or **--keyfile** argument.

**Syntax**

* **Version 3.5 and earlier:** long command options not supported.
* **Version 4.0 and later:** long command options supported.

```
pblog [options]
    -a, --accept_format=expression
    -c, --constraint=expression
    -d, --dump
    -e, --finish_format=expression
    -f, --eventlog=file name
       --db
       --ff
       --odbc
    -i, --keystroke_format=expression
    -k, --keyfilefile_name
    -l, --verbose
    -m, --migratedb
    -o, --dbout=<file name>
    -O, --odbcout=<dsn>
       -D, --diff
    -p, --all_formats=expression
    -q, --quiet
    -r, --reject_format=expression
    -t, --tail
pblog –X|--xml [options]
    -c, --constraint=<expression>
    -F, --field_list=field_names
    -f, --eventlog=file_name
    -k, --keyfile=file_name
pblog –C|--csv[options]
    -c, --constraint=expression
    -F, --field_list=field_names
    -f, --eventlog=file_name
    -H, --csv_header
    -k, --keyfile=file_name
    -S, --csv_separator
pblog  -J, --json  
-P, --pretty
pblog –v|--version
pblog --help
```

**Arguments**

[block:parameters]
{
  "data": {
    "h-0": "",
    "h-1": "",
    "0-0": "**\\-a, --accept_format=expression**",
    "0-1": "Optional. Format expression for Accept events.",
    "1-0": "**\\-c, --constraint=expression**",
    "1-1": "Optional if the expression is the last argument on the command line. Constrains entries according to the expression.",
    "2-0": "**\\-C, --CSV**",
    "2-1": "Optional. Produces comma-separated value (CSV) output.",
    "3-0": "**\\-d, --dump**",
    "3-1": "Optional. Dumps entries as they are read.",
    "4-0": "**\\-e, --finish_format=expression**",
    "4-1": "Optional. Format expression for finish events.",
    "5-0": "**\\-f, --eventlog=file_name  \n--db  \n--ff  \n--odbc**",
    "5-1": "Optional. Alternate event log to report.  \nOptional. Alternate event log is a database.  \nOptional. Alternate event log is a flat file..  \nOptional. Alternate event log is a ODBC DSN.",
    "6-0": "**\\-F, --field_list=field_names**",
    "6-1": "Optional field list to be displayed for CSV and XML output. When specifying multiple field names, enter them as comma-separated values (no spaces).",
    "7-0": "**\\-H, --csv_header**",
    "7-1": "Optional. Produces a field-name header in CSV mode.",
    "8-0": "**\\-i, --keystroke_format =expression**",
    "8-1": "Optional. Format expression for keystroke action events.",
    "9-0": "**\\-k, --keyfile=file_name**",
    "9-1": "Optional. Name of the encryption key file.<br />The **file_name** specified needs to be listed as one of the **keyfile** in **eventlogencryption** keyword.",
    "10-0": "**\\-l, --verbose**",
    "10-1": "Optional. Turns on verbose mode. Prints all variables, one per line.",
    "11-0": "**\\-m, --migratedb**",
    "11-1": "Optional. Use to migrate an eventlog database created prior to 25.1.6 to the updated schema.  \n--migratedb \\<old-eventlog-db> -o \\<new-eventlog-db>",
    "12-0": "**\\-o, --dbout=file name>**",
    "12-1": "Optional. Copy missing records to database.",
    "13-0": "**\\-O, --odbcout=\\<dsn>  \n-D, --diff**",
    "13-1": "Optional. Copy missing records to ODBC.  \nOptional. Report differences instead of copying.",
    "14-0": "**\\-p, --all_formats=expression**",
    "14-1": "Optional. Print format expression for all events.",
    "15-0": "**\\-q, --quiet**",
    "15-1": "Optional. Turns on quiet mode. Do not report expression errors (for example, undefined variables).",
    "16-0": "**\\-r, --reject_format=expression**",
    "16-1": "Optional. Format expression for Reject events.",
    "17-0": "**\\-S, --csv_separator**",
    "17-1": "Optional. Field separator for CSV mode (default is comma).",
    "18-0": "**\\-t, --tail**",
    "18-1": "Optional. Tail mode. Loop and report new entries as they occur (forces dump mode).",
    "19-0": "**\\-J --json  \n-P --pretty**",
    "19-1": "Optional. Produces output in JSON format.  \nOptional. Pretty print.",
    "20-0": "**\\-v, --version**",
    "20-1": "Optional. Displays the **pblog** version and exits.",
    "21-0": "**\\-X, --xml**",
    "21-1": "Optional. Produces XML-formatted output.",
    "22-0": "**\\--help**",
    "22-1": "Optional. Displays the program help message and exit."
  },
  "cols": 2,
  "rows": 23,
  "align": [
    null,
    null
  ]
}
[/block]

> ℹ️
>
> For more information about syntax to specify multiple encryption algorithms and files, see [eventlogencryption](network-traffic-file-encryption#eventlogencryption).

**Default output expressions**

Accept Dump:

```
sprintf('%s %s %s %s %s@%s -> %s@%s\\n\\t%s', uniqueid, event, date, time, user, submithost, runuser, runhost, join(runargv))
```

Reject Dump:

```
sprintf('%s %s %s %s %s@%s\\n\\t%s', uniqueid, event, date, time, user, submithost, join(argv))
```

End/Finish Dump:

```
sprintf('%s %s %s', uniqueid, event, exitstatus)
```

Accept:

```
sprintf('%s %s %s %s@%s -> %s@%s\\n\\t%s\\n\\t%s', event, date, time, user, submithost, runuser, runhost, join(runargv), exitstatus)
```

Reject:

```
sprintf('%s %s %s %s@%s\\n\\t%s', event, date, time, user, submithost, join(argv))
```

End/Finish:

```
sprintf('%s %s %s', uniqueid, event, exitstatus)
```

Keystroke:

```
sprintf('%s %s %s %s %s', event, keystrokestatus, keystrokedate, keystroketime, keystroke)
```

## Read an event log

**Example**

If **pb.settings** file has:

```
eventdestinations
eventlog /var/log/pb.eventlog
```

**pblog** with no arguments reads the flat file event log specified in the **eventlog** setting:

```
 pblog
```

**Example**

If **pb.settings** file has:

```
eventdestinations    authevt=db
eventlog    /var/log/pb.eventlog.db
```

**pblog** with no arguments reads the SQLite DB event log specified in the eventlog setting:

```
 pblog
```

**Example**

Read a SQLite DB event log whose path is specified in the event log setting:

```
 pblog

```

**Example**

Read a specific SQLite DB event log:

```
 pblog -f /path/to/mypb.eventlog.db --db

```

**Example**

Read a specific flat file event log

```
 pblog -f /path/to/mypb.eventlog.flat --ff

```

**Example**

Read an ODBC type event log:

```
 pblog -f  MyDSN --odbc

```

In this case, **odbc.ini** and **odbcinidir** files located in the directory specified in **odbcinidir** setting (default **/etc/pbul/etc**) will be read to get the connection information to the MySQL or Oracle database.

> ℹ️
>
> For more information, see the default values listed in [eventlog](settings-auditing-logging#eventlog).

## Copy event log records

If multiple targets for authorized events are defined in **eventdestinations**, or if you want to copy event log records from one event log file to another, the options **-o** (output to SQLite database) or **-O** (output to ODBC database) can be used. This only copies the event log records with a uniqueid that does not exist in the destination.

**Example**

Copy from a flat file to a SQLite database:

```
 pblog --ff -f /var/log/pb.eventlog.flat -o /var/log/pb.eventlog.db
```

**Example**

Copy records from a flat file to the ODBC database:

```
 pblog --ff -f /var/log/pb.eventlog.flat -O MyDSN
```

Where **MyDSN** is the ODBC Data Source Name whose connection information to the MySQL or Oracle database is configured in the **odbc.ini**/**odbcinst.ini** files (see odbcinidir setting).

**Example**

Copy records from a SQLite database to the ODBC database:

```
 pblog --db -f /var/log/pb.eventlog.db -O MyDSN
```

Where **MyDSN** is the ODBC Data Source Name whose connection information to the MySQL or Oracle database is configured in the **odbc.ini/odbcinst.ini** files.

> ℹ️
>
> For more information, see [odbcinidir](settings-auditing-logging#odbcinidir).

## Report difference between event log destinations:

If multiple event destinations were used, and you want to report on records that might be in one destination but not another, you can use **-o**, **-O** with **-D** option:

**Example**

Report differences between event log records in a flat file versus a SQLite database:

```
 pblog --ff -f /var/log/pb.eventlog.flat -o /var/log/pb.eventlog.db -D
uniqueid,etype,epoch
ac1420215df2ac3604C5,Reject,2020/02/20 13:08:06
ac1420215df2ac3604C7,Accept,2020/02/20 13:08:06
ac1420215df2ac3604C7,Finish,2020/02/20 13:08:54
ac1420215df2ac3704C9,Accept,2020/02/20 13:08:07
ac1420215df2ac3704C9,Finish,2020/02/20 13:08:55
```

**Example**

Report differences between event log records in a flat file versus a MySQL database:

```
 pblog --ff -f /var/log/pb.eventlog.flat -O MyDSN -D
uniqueid,etype,epoch
ac1420215df2ac3604C5,Reject,2020/02/20 13:08:06
ac1420215df2ac3604C7,Accept,2020/02/20 13:08:06
ac1420215df2ac3604C7,Finish,2020/02/20 13:08:54
ac1420215df2ac3704C9,Accept,2020/02/20 13:08:07
ac1420215df2ac3704C9,Finish,2020/02/20 13:08:55
```

**Example**

Report differences between event log records in a SQLite database versus an Oracle database:

```
 pblog --db -f /var/log/pb.eventlog.db -O oracle -D
uniqueid,etype,epoch
ac1420215df2ac6d04EC,Reject,2020/02/20 13:09:01
ac1420215df2ac6d04EE,Accept,2020/02/20 13:09:01
ac1420215df2ac6d04EE,Finish,2020/02/20 13:09:49
ac1420215df2ac6d04F1,Accept,2020/02/20 13:09:01
ac1420215df2ac6d04F1,Finish,2020/02/20 13:09:49
```

### Dumping records in JSON format

Starting with v10.3.0, the option **-J** has been added to display the event log records in JSON format. Combine with **-P** to enhance readability.

**Example**

```
 pblog --db -f /var/log/pb.eventlog.db -J -P
```

> ℹ️
>
> For more information, see [pbmasterd](pbmasterd).