<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">%=================================================================
\section{The alogscan Tool}
%=================================================================
\label{sec_alogscan}

The \app{alogscan} tool is a command-line application for providing
statistics relating to a given \var{.alog} file. It reports, for each
unique MOOS variable in the log file, (a) the number of lines in which
the variable appears, i.e., the number of times the variable was
posted by a MOOS application, (b) the total number of characters
comprising the variable value for all entries of a variable, (c) the
timestamp of the first recorded posting of the variable, (d) the
timestamp of the last recorded posting of the variable, (e) the list
of MOOS applications the posted the variable. 

%=================================================================
\subsection{Command Line Usage for the alogscan Tool}

The \app{alogscan} tool is run from the command line with a given
\var{.alog} file and a number of options.  The usage options are
listed when the tool is launched with the \var{-h} switch:

\begin{consoleverb}
 $ alogscan --help or -h
\end{consoleverb}

\begin{fileverb}
  1  Usage:                                             
  2    alogscan file.alog [OPTIONS]                     
  3                                                     
  4  Synopsis:                                          
  5    Generate a report on the contents of a given     
  6    MOOS .alog file.                                 
  7                                                     
  8  Options:
  9  --sort=type   Sort by one of SIX criteria:         
 10                start: sort by first post of a var   
 11                stop:  sort by last post of a var    
 12     (Default)  vars:  sort by variable name         
 13                proc:  sort by process/source name   
 14                chars: sort by total chars for a var 
 15                lines: sort by total lines for a var 
 16                                                     
 17  --appstat     Output application statistics        
 18  -r,--reverse  Reverse the sorting output           
 19  -n,--nocolors Turn off process/source color coding 
 20  -h,--help     Displays this help message           
 21  -v,--version  Displays the current release version 
 22  --rate_only   Only report the data rate            
 23  --noaux       Ignore auxilliary source info   
 24
 25  See also: aloggrp, alogrm, alogclip, alogview       
\end{fileverb}
\vspace{0.1in}


\noindent
The order of the arguments passed to \app{alogscan} do not matter.
The lines of output are sorted by grouping variables posted by the
same MOOS process or source. The sorting criteria can instead be done
by alphabetical order on the variable name (\var{--sort=vars}), the
total characters in the file due to a variable (\var{--sort=chars}),
the total lines in the file due to a variable (\var{--sort=lines}),
the time of the first posting of the variable (\var{--sort=start}), or
the time of the last posting of the variable (\var{--sort=stop}).  The
order of the output may be reversed (\var{-r, --reverse}). By default,
the entries are color-coded by the variable source, using the few
available terminal colors (there are not many). When unique colors are
exhausted, the color reverts back to the default terminal color in
effect at the time.

%=================================================================
\subsection{Example Output from the alogscan Tool}

The output shown below was generated from the \var{alpha.alog} file
generated by the Alpha example mission.

\begin{consoleverb}
 $ alogscan file.alog
\end{consoleverb}

\begin{fileverb}
  Variable Name           Lines   Chars   Start    Stop  Sources
  -------------           -----   -----  ------  ------  -------
  DB_CLIENTS                282   22252   -0.38  566.42  MOOSDB_alpha
  DB_TIME                   556    7132    1.21  566.18  MOOSDB_alpha
  DB_UPTIME                 556    7173    1.21  566.18  MOOSDB_alpha
  USIMMARINE_STATUS         276   92705    0.39  565.82  uSimMarine
  NAV_DEPTH                6011    6011    1.43  566.38  uSimMarine
  NAV_HEADING              6011   75312    1.43  566.38  uSimMarine
  NAV_LAT                  6011   74799    1.43  566.38  uSimMarine
  NAV_LONG                 6011   80377    1.43  566.38  uSimMarine
  NAV_SPEED                6011    8352    1.43  566.38  uSimMarine
  NAV_STATE                6011   18033    1.43  566.38  uSimMarine
  NAV_X                    6011   72244    1.43  566.38  uSimMarine
  NAV_Y                    6011   77568    1.43  566.38  uSimMarine
  NAV_YAW                  6011   80273    1.43  566.38  uSimMarine
  BHV_IPF                  2009  564165   46.26  542.85  pHelmIvP
  CREATE_CPU               2108    2348   46.26  566.33  pHelmIvP
  CYCLE_INDEX                 5       5   44.98  543.09  pHelmIvP
  DEPLOY                      3      14    3.84  543.09  pHelmIvP,pMarineViewer
  DESIRED_HEADING          2017    5445    3.85  543.09  pHelmIvP
  DESIRED_SPEED            2017    2017    3.85  543.09  pHelmIvP
  HELM_IPF_COUNT           2108    2108   46.26  566.32  pHelmIvP
  HSLINE                      1       3    3.84    3.84  pHelmIvP
  IVPHELM_DOMAIN              1      29    3.84    3.84  pHelmIvP
  IVPHELM_ENGAGED           462    3342    3.85  566.32  pHelmIvP
  IVPHELM_MODESET             1       0    3.84    3.84  pHelmIvP
  IVPHELM_POSTINGS         2014  236320   46.26  543.33  pHelmIvP
  IVPHELM_STATEVARS           1      20   44.98   44.98  pHelmIvP
  IVPHELM_SUMMARY          2113  612685   44.98  566.33  pHelmIvP
  LOOP_CPU                 2108    2348   46.26  566.33  pHelmIvP
  PC_hsline                   1       9   44.98   44.98  pHelmIvP
  PC_waypt_return             3      14   44.98  543.33  pHelmIvP
  PC_waypt_survey             3      14   44.98  543.33  pHelmIvP
  PHELMIVP_STATUS           255  198957    3.85  565.12  pHelmIvP
  PLOGGER_CMD                 1      17    3.84    3.84  pHelmIvP
  PWT_BHV_HSLINE              1       1   44.98   44.98  pHelmIvP
  PWT_BHV_WAYPT_RETURN        3       5   44.98  543.09  pHelmIvP
  PWT_BHV_WAYPT_SURVEY        2       4   44.98  462.90  pHelmIvP
  RETURN                      4      19    3.84  543.09  pHelmIvP,pMarineViewer
  STATE_BHV_HSLINE            1       1   44.98   44.98  pHelmIvP
  STATE_BHV_WAYPT_RETURN      4       4   44.98  543.33  pHelmIvP
  STATE_BHV_WAYPT_SURVEY      3       3   44.98  463.15  pHelmIvP
  SURVEY_INDEX               10      10   44.98  429.70  pHelmIvP
  SURVEY_STATUS            1116   77929   45.97  462.90  pHelmIvP
  VIEW_POINT               4034  101662   44.98  543.33  pHelmIvP
  VIEW_SEGLIST                4     273   44.98  543.33  pHelmIvP
  WPT_INDEX                   1       1  463.15  463.15  pHelmIvP
  WPT_STAT                  223   15626  463.15  543.09  pHelmIvP
  LOGGER_DIRECTORY           56    1792    1.07  559.19  pLogger
  PLOGGER_STATUS            263  331114    1.07  566.40  pLogger
  DESIRED_RUDDER          10185  150449   -9.28  545.18  pMarinePID
  DESIRED_THRUST          10637   20774   -9.28  566.52  pMarinePID
  MOOS_DEBUG                  5      39   -9.31  545.23  pMarinePID,pHelmIvP
  PMARINEPID_STATUS         279   81990    0.95  566.28  pMarinePID
  HELM_MAP_CLEAR              1       1   -1.56   -1.56  pMarineViewer
  MOOS_MANUAL_OVERIDE         1       5   44.65   44.65  pMarineViewer
  PMARINEVIEWER_STATUS      270   95560   -0.95  564.89  pMarineViewer
  NODE_REPORT_LOCAL        1159  207535    1.15  565.91  pNodeReporter
  PNODEREPORTER_STATUS      233   50534   -0.37  563.93  pNodeReporter
  -----------------------------------------------------------------
  Total variables: 57
  Start/Stop Time: -9.31 / 566.52
\end{fileverb}
\vspace{0.1in}

\noindent
When the \var{-appstat} command line option is included, a second
report is generated, after the above report, that provides statistics
keyed by application, rather than by variable. For each application
that has posted a variable recorded in the given \var{.alog} file, the
number of lines and characters are recorded, as well as the percentage
of total lines and characters. An example of this report:

\vspace{0.1in}
\begin{fileverb}
 MOOS Application     Total Lines  Total Chars  Lines/Total  Chars/Total
 ---------------      -----------  -----------  -----------  -----------
 MOOSDB_alpha                1394        36557         1.37         1.08
 uSimMarine                 54375       585674        53.57        17.29
 pHelmIvP                   22642      1825437        22.31        53.89
 pLogger                      319       332906         0.31         9.83
 pMarinePID                 21106       253252        20.80         7.48
 pMarineViewer                279        95599         0.27         2.82
 pNodeReporter               1392       258069         1.37         7.62
\end{fileverb}

%=================================================================
\subsection*{Further Tips}

\begin{itemize}
\item If a small number of variables are responsible for a relatively
  large portion of the file size, and are expendable in terms of how
  data is being analyzed, the variables may be removed to ease the
  handling, transmission, or storage of the data. To remove variables
  from existing files, the \app{alogrm} tool described in Section
  \ref{sec_alogrm} may be used.  To remove the variable from future
  files, the \app{pLogger} configuration may be edited by either
  removing the variable from the list of variables explicitly
  requested for logging, or if WildCardLogging is used, mask out the
  variable with the \var{WildCardOmitPattern} parameter setting. See
  the \app{pLogger} documentation.

\item The output of \app{alogscan} can be further distilled using common
  tools such as \var{grep}. For example, if one only wants a report on
  variables published by the \app{pHelmIvP} application, one could type:
\end{itemize}

\begin{consoleverb}
  $ alogscan alpha.alog | grep pHelmIvP
\end{consoleverb}

</pre></body></html>