Exawatcher VMStat logs contain dense numeric system metrics mixed with headers, sample markers, and repeated column labels. This structure makes the raw logs difficult to analyze directly in Oracle Log Analytics.

This walkthrough shows how to use parser functions and source-level data filters to transform the numeric Exawatcher VMStat rows into timestamped, structured log records for search, analysis, and visualization.

Log Explorer: Records with Histogram
Log Explorer: Records with Histogram

Although the example focuses on Exawatcher VMStat, the same approach can be applied to other log formats where useful data is embedded within repeated sections, headers, or mixed content.

Example Exawatcher VMStat Log

The following sample uses May 2026 timestamps:

############################################################
# Starting Time:        05/11/2026 02:07:55
# Sample Interval(s):   5
# Archive Count:        720
# Collection Module:    VmstatExaWatcher
# Collection Command:   /usr/bin/vmstat  5  2
############################################################
zzz <05/11/2026 02:07:55> Count:0
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 1  0      0 28826708 792788 12473196    0    0     2    15    0    0  3  1 96  0  0
 0  0      0 28883436 792788 12473444    0    0     4   212 8103 12800  3  0 97  0  0
zzz <05/11/2026 02:08:00> Count:1
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  0      0 28883436 792788 12473444    0    0     2    15    0    0  3  1 96  0  0
 0  0      0 28883436 792788 12473628    0    0     6    99 6970 12419  1  0 99  0  0
zzz <05/11/2026 02:08:05> Count:2
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  0      0 28883932 792788 12473628    0    0     2    15    0    0  3  1 96  0  0
 0  0      0 28890564 792788 12473808    0    0     2    59 6652 12126  0  0 99  0  0

The objective is to extract only the six numeric metric rows as log entries. The header rows, sample marker rows, and repeated column headings are useful during parsing, but they should not become final log records.

Create the Parser

In the OCI Console, open the navigation menu. Select Observability & Management. Under Log Analytics, select Administration. In the Administration navigation pane, select Parsers, and then select Create.

Select Regex Type. The Create Parser page opens in Guided mode by default. Switch to Advanced mode so that you can enter the regular expression directly.

FieldValue
NameExawatcher VMStat Format
TypeRegex Type
ModeAdvanced mode
Log Record SpanOne line per entry
Example Log ContentPaste the May 2026 VMStat sample log
Parse ExpressionUse the regular expression shown below

The regular expression used for parsing:

{TIMEDATE}\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+\d+\s*\[Sample:(\d+)\]\s\[mod:([^\]]+)\]\s\[cmd:\s*([^\]]+)\]
Create Parser
Create Parser

Map the captured groups to these fields in order:

GroupVMStat valueOracle Log Analytics field
1rProcesses Waiting Run
2bProcesses Sleeping
3swpdSwap Space Used
4freeMemory Available
5buffBuffer Memory Used
6cacheCache Memory Used
7siSwap In/Second
8soSwap Out/Second
9biBlocks In/Second
10boBlocks Out/Second
11inInterrupts/Second
12csContext Switches/Second
13usCPU User Time (%)
14syCPU System Time (%)
15idCPU Idle Time (%)
16waCPU IO Wait Time (%)
17Sample valueSequence
18Header valueModule
19Header valueCommand
Map fields
Map fields

At this point, the parser test will not yet succeed for the metric rows. The original VMStat rows do not contain all the information expected by the parse expression. The next step adds parser functions that enrich each numeric row before parsing.

Add Parser Functions

Parser functions copy important context from the timestamp and header rows onto each numeric metric row. This lets each metric row become a complete standalone log record.

Create the following functions from the parser’s Functions tab.

Function namePurposeValue to enter
copy interval numberCaptures the Count value from the zzz sample marker row and appends it to each numeric metric row as the sample sequence. This preserves the sample interval number after the original sample marker row is filtered out.Function: find replace
Catch Expression: zzz\s\<\d+/\d+/\d+\s\d+:\d+:\d+\>\sCount:(?<cnt>\d+)
Find Expression: ^\s+\d+.*($)\n
Replace String:  [Sample:(cnt)]
copy moduleCaptures the collection module from the file header and appends it to each numeric metric row. This keeps the module value available on every parsed record instead of leaving it only in the header.Function: find replace
Catch Expression: \#\sCollection\sModule:\s+(?<module>VmstatExaWatcher)
Find Expression: ^\s+\d+.*($)\n
Replace String:  [mod:(module)]
copy commandCaptures the collection command from the file header and appends it to each numeric metric row. This preserves the command used to collect the VMStat data after the header rows are removed.Function: find replace
Catch Expression: \#\sCollection\sCommand:\s(?<cmd>.*)\n
Find Expression: ^\s+\d+.*($)\n
Replace String:  [cmd:(cmd)]
copy timestampCaptures the timestamp from each zzz sample marker row and inserts it at the beginning of the numeric metric rows that belong to that sample. This makes each metric row independently parseable as a timestamped log entry.Function: find replace
Catch Expression: zzz\s+\<(?<timestr>\d+/\d+/\d+\s\d+:\d+:\d+)\>\s+\S+
Find Expression: (^)\s+\d+\s+\d+.*
Replace String: (timestr)

Note: The replace strings for the functions copy interval numbercopy command, and copy module have a space character at the beginning.

Add function in parser
Add function in parser

After creating the functions, arrange them in this order:

OrderFunction nameReason
1copy interval numberAdds the sample sequence before other metadata is appended.
2copy moduleAdds the collection module metadata to each metric row.
3copy commandAdds the collection command metadata to each metric row.
4copy timestampAdds the timestamp at the beginning of the enriched row.
Order of functions
Order of functions

After the functions run, each metric row is transformed into a parseable record like this:

05/11/2026 02:07:55 1  0      0 28826708 792788 12473196    0    0     2    15    0    0  3  1 96  0  0  [Sample:0] [mod:VmstatExaWatcher] [cmd:  /usr/bin/vmstat  5  2]

Open the Parser Test tab and run the test. The numeric VMStat rows should parse successfully into the selected fields. Some non-metric rows may still fail parsing, which is expected. Those rows are removed later by source data filters.

Run parser test
Run parser test

Save the parser.

Create the Log Source

In the OCI Console, open the navigation menu. Select Observability & Management. Under Log Analytics, select Administration. In the Administration navigation pane, select Sources, and then select Create Source.

Enter the following source details:

FieldValue
NameExawatcher VMStat Logs
Source TypeFile
Entity TypeHost (Linux)
Parser selectionSelect Specific Parsers
ParserExawatcher VMStat Format

The file path pattern depends on where Exawatcher VMStat files are stored in your environment and where the OCI Management Agent can read them.

Create source
Create source

Add Source Data Filters

The parser functions copied the useful timestamp and header context onto each metric row. The remaining header and marker rows can now be dropped before ingestion.

Open the source’s Data Filters tab and add these filters:

Filter nameFind expressionWhat it does
drop header pieces^#.*Drops the file header rows that begin with #. These rows contain useful metadata, but the parser functions have already copied the needed values into each metric row.
drop sample top row^zzz.*Drops the sample marker rows that begin with zzz. These rows provide the timestamp and count for each sample block, but those values have already been copied to the metric rows.
drop sample header 1^procs\s-.*Drops the repeated VMStat section header row that starts with procs. This row describes the column groups, but it does not contain metric values.
drop sample header 2^r\s+b\sswpd.*Drops the repeated VMStat column name row that starts with r b swpd. This row identifies the VMStat columns, but it should not become a log record.

For each data filter, set Type to Drop Log Entry.

Data filters in source
Data filters in source

Save the source.

Collect or Upload the Logs

After the source is saved, associate it with the appropriate Linux host entity to collect logs continuously through the OCI Management Agent.

You can also use on-demand upload to test a sample file before enabling continuous collection. When using the sample log shown in this blog, the final result should be six parsed records, one for each numeric VMStat row.

On-demand upload of files
On-demand upload of files

Click View in Log Explorer:

On-demand upload complete
On-demand upload complete

Analyze the Parsed VMStat Metrics

After ingestion, the VMStat values are available as structured fields. You can use them in searches, visualizations, and dashboards.

The Blocks In/Second and Blocks Out/Second line chart shows the maximum block input and output activity across the sample intervals, making it easy to compare read and write volume over time.

Blocks In/Second and Blocks Out/Second line chart
Blocks In/Second and Blocks Out/Second line chart

The CPU line chart shows median CPU user, idle, and system time across the same sample period, helping you quickly confirm whether the host was mostly idle or spending time on user or system activity.

CPU line chart shows median CPU user, idle, and system time
CPU line chart shows median CPU user, idle, and system time

Conclusion

Exawatcher VMStat logs contain valuable performance data, but the raw format includes headers, repeated column labels, sample markers, and metric rows mixed together. A basic parser alone is not enough to turn this file into clean analytical records.

By using Oracle Log Analytics parser functions, you can copy timestamp and header context onto each metric row. By using source data filters, you can drop rows that are no longer needed after enrichment. The result is a clean set of structured VMStat log records that can be searched, graphed, and correlated with other operational data in Oracle Log Analytics.

Additional Resources