====== Filtering Journal Output ======
As the journal output file is fairly large, filtering the data to only the required entries can be achieved by:
* Outputting to an EXCEL or CSV file and using the Data Filter function.
* Output to a text file and use Windows ''findstr'' or Linux's grep function to write relevant data to file.
Journal Entry Categories
* LOGIN
* SNAP
* VOLMOVE
* VOLADD
* PWRESET
* LOGOUT
===== Extracting Journal to Excel =====
Set variable ''TMSSREPORTFORMAT'' to Excel, run ''TMSS10LogStatsPrintDB'' with relevant date range set.
cd ""C:\Users\Current Directory"
set TMSSREPORTFORMAT=EXCEL
TMSS10LogStatsPrintDB -h "%TMSS10DB%" -R *:* 2> stderr.txt
===== Extracting Journal to CSV =====
Set variable ''TMSSREPORTFORMAT'' to CSV, run ''TMSS10LogStatsPrintDB'' with relevant date range set.
cd ""C:\Users\Current Directory"
set TMSSREPORTFORMAT=CSV
TMSS10LogStatsPrintDB -h "%TMSS10DB%" -R *:* > output.csv 2> stderr.txt
===== Extracting Journal to Text File =====
Run ''TMSS10LogStatsPrintDB'' with relevant date range set. Redirect stdout stream to text file.
cd ""C:\Users\Current Directory"
TMSS10LogStatsPrintDB -h "%TMSS10DB%" -R *:* > input.txt 2> stderr.txt
==== Filtering Text File using Powershell ====
To filter out any line with the entries ''VOLADD'' or ''VOLMOV'' from the text file input.txt and write to file output
Select-String -Path input.txt -Pattern "VOLMOV", "VOLADD" | ForEach-Object { $_.Line } > output.txt
==== Filtering Text File using Command Prompt As Administarator====
To filter out any line with the entries ''VOLADD'' or ''VOLMOV'' and write to file output
findstr "VOLMOV VOLADD" input.txt > output.txt
==== Filtering Text File using WSL/BASH ====
To filter out any line with the entries ''VOLADD'' or ''VOLMOV'' and write to file output
grep -E "VOLMOV|VOLADD" /mnt/c/path/to/input.txt > /mnt/c/path/to/output.txt
{{tag> technote journal cli}}