TapeTrack Documentation

Because there is more to tape management than you ever realized

User Tools

Site Tools


technote:command_line_diagnosis

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
technote:command_line_diagnosis [2025/07/04 03:10] Scott Cunliffetechnote:command_line_diagnosis [2025/07/04 04:27] (current) – [Forwarding The Stdout And Stderr Files] Scott Cunliffe
Line 38: Line 38:
 ZBT005N-13:05:14 Running on GazillaByte ZBT005N-13:05:14 Running on GazillaByte
 </code> </code>
 +
 +===== Locating The Stdout And Stderr Files =====
 +
 +Command line programs, while they can be run directly in a command prompt, are usually executed via a batch file on Windows or bash script on Linux servers.
 +
 +==== Locate Batch File Via Windows Scheduler ====
 +
 +Open [[technote:windows_scheduler|Windows Scheduler]], on the left panel, select the directory required to display the scheduled events in the top panel. Locate the process in question and select it to display the process detail in the lower panel.  Selecting the ''Actions'' tab, the location of the batch file is described in the trigger start a program.
 +
 +{{event.png}}
 +
 +In this example you can see the batch file Daily.bat is located at ''C:Program Files\TapeTrack\TapeTrack Framework Server\scripts''
 +
 +==== Locate Stdout And Stderr ====
 +
 +navigate to the batch file using File Explorer, right click on the batch file and select ''Edit'' or ''Open in Notepad'' to view the code.
 +
 +The file may contain different variables at the top, setting various actions for the creation of the report or task.  Following this will be a line of code calling the command line program with various attributes followed by the redirections of the stdout and stderr streams.
 +
 +<code>
 +TMSS10Inventory -S user:-pass@serveraddress -V "US01.*.*" > ./reports/Inventory_Report.txt 2> ./reports/Inventory_Report_stderr.txt
 +</code>
 +
 +The redirect ''>'' redirects the stdout stream, Inventory_Report.txt, to the reports folder in the current directory.
 +
 +The redirect ''2>'' redirects the stderr stream, called Inventory_Report_stderr.txt to the reports folder in the current directory.
 +
 +If the file location uses variables in the path, you will need to find the value of the variable to decode the path.
 +
 +Standard variables set by TapeTrack upon installation include
 +
 +<code>
 +TMSS10BACK=C:\Program Files\TapeTrack\TapeTrack Framework Server\var\backup
 +TMSS10DB=C:\Program Files\TapeTrack\TapeTrack Framework Server\var\db
 +TMSS10REPORTS=C:\Program Files\TapeTrack\TapeTrack Framework Server\var\reports
 +TMSS10SCRIPTS=C:\Program Files\TapeTrack\TapeTrack Framework Server\scripts
 +TMSS10SYNCBASE=C:\Program Files\TapeTrack\TapeTrack Sync\
 +</code>
 +
 +For example
 +
 +<code>
 +TMSS10MoveList -S %TTSERVER% > "%TMSS10REPORTS%\movelist_report.txt" 2> "%TMSS10REPORTS%\movelist_error.txt" 
 +</code>
 +
 +The stderr stream is directed to ''C:\Program Files\TapeTrack\TapeTrack Framework Server\var\reports\movelist_error.txt''
 +==== Forwarding The Stdout And Stderr Files ====
 +
 +Using a file zipping program, such as winzip or 7zip, zip up the files (batch file, stdout and stderr files) and attach the file to the [[common:support_details|support ticket]] along with the best description of the problem you are experiencing.
 +
 +{{tag>technote cli}}
technote/command_line_diagnosis.1751598647.txt.gz · Last modified: 2025/07/04 03:10 by Scott Cunliffe