TapeTrack Documentation

Because there is more to tape management than you ever realized

User Tools

Site Tools


technote:filtering_journal_output

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
technote:filtering_journal_output [2025/07/22 02:49] – created Scott Cunliffetechnote:filtering_journal_output [2025/07/23 01:44] (current) – [Filtering Text File using WSL/BASH] Scott Cunliffe
Line 4: Line 4:
   * Outputting to an EXCEL or CSV file and using the Data Filter function.   * 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.   * 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 ===== ===== Extracting Journal to Excel =====
Line 9: Line 17:
 Set variable ''TMSSREPORTFORMAT'' to Excel, run ''TMSS10LogStatsPrintDB'' with relevant date range set. Set variable ''TMSSREPORTFORMAT'' to Excel, run ''TMSS10LogStatsPrintDB'' with relevant date range set.
  
-```+<code>
 cd ""C:\Users\Current Directory" cd ""C:\Users\Current Directory"
 set TMSSREPORTFORMAT=EXCEL set TMSSREPORTFORMAT=EXCEL
 TMSS10LogStatsPrintDB -h "%TMSS10DB%" -R *:* 2> stderr.txt TMSS10LogStatsPrintDB -h "%TMSS10DB%" -R *:* 2> stderr.txt
-```+</code>
  
 ===== Extracting Journal to CSV ===== ===== Extracting Journal to CSV =====
Line 19: Line 27:
 Set variable ''TMSSREPORTFORMAT'' to CSV, run ''TMSS10LogStatsPrintDB'' with relevant date range set. Set variable ''TMSSREPORTFORMAT'' to CSV, run ''TMSS10LogStatsPrintDB'' with relevant date range set.
  
-```+<code>
 cd ""C:\Users\Current Directory" cd ""C:\Users\Current Directory"
 set TMSSREPORTFORMAT=CSV set TMSSREPORTFORMAT=CSV
 TMSS10LogStatsPrintDB -h "%TMSS10DB%" -R *:* > output.csv 2> stderr.txt TMSS10LogStatsPrintDB -h "%TMSS10DB%" -R *:* > output.csv 2> stderr.txt
-```+</code>
  
 ===== Extracting Journal to Text File ===== ===== Extracting Journal to Text File =====
Line 29: Line 37:
 Run ''TMSS10LogStatsPrintDB'' with relevant date range set. Redirect stdout stream to text file. Run ''TMSS10LogStatsPrintDB'' with relevant date range set. Redirect stdout stream to text file.
  
-```+<code>
 cd ""C:\Users\Current Directory" cd ""C:\Users\Current Directory"
  
 TMSS10LogStatsPrintDB -h "%TMSS10DB%" -R *:* > input.txt 2> stderr.txt TMSS10LogStatsPrintDB -h "%TMSS10DB%" -R *:* > input.txt 2> stderr.txt
-```+</code>
  
 ==== Filtering Text File using Powershell ==== ==== Filtering Text File using Powershell ====
  
-To filter out any line with the entries VOLADD or VOLMOV and write to file output+To filter out any line with the entries ''VOLADD'' or ''VOLMOV'' from the text file input.txt and write to file output
  
-```+<code>
 Select-String -Path input.txt -Pattern "VOLMOV", "VOLADD" | ForEach-Object { $_.Line } > output.txt Select-String -Path input.txt -Pattern "VOLMOV", "VOLADD" | ForEach-Object { $_.Line } > output.txt
  
-```+</code> 
 + 
 +==== Filtering Text File using Command Prompt As Administarator==== 
 + 
 +To filter out any line with the entries ''VOLADD'' or ''VOLMOV'' and write to file output 
 + 
 +<code> 
 +findstr "VOLMOV VOLADD" input.txt > output.txt 
 +</code> 
 + 
 +==== Filtering Text File using WSL/BASH ==== 
 + 
 +To filter out any line with the entries ''VOLADD'' or ''VOLMOV'' and write to file output 
 + 
 +<code> 
 +grep -E "VOLMOV|VOLADD" /mnt/c/path/to/input.txt > /mnt/c/path/to/output.txt 
 +</code>
  
 +{{tag> technote journal cli}}
technote/filtering_journal_output.1753152583.txt.gz · Last modified: 2025/07/22 02:49 by Scott Cunliffe