Name

logView

Synopsis

logView [-utc] [-type type][-start startTime][-stop stopTime][-age][-skip n][-bin][-hex][-parse class] [-noheader][-stream][-e][-u][-r separator][-h separator][-notype][-stats][-stats][-sheader] deviceID directory

Description

The logView utility displays device log packet contents on the console. By default, the results includes a header with packet metadata (timestamp, deviceID, packet sequence number, etc.) along with the packet contents.

There are options to filter the results based on time and packet type, and also to reformat the results. The reformatting options enable the user to select or remove packet metadata so that they may:

Occasionally, log file contain corrupt data entries that can prevent logView from searching past the corrupt entries because the index entries do not match the data entries. There are additional options that may be used to check the log integrity and repair a log index for a file that contains corrupt data entries.

Note: The -start and -stop "time window" options only work correctly if all packets in the log are sorted in ascending timestamp order; utilities such as getPackets may generate logs that are not ordered in this way.

The file names use the format

<deviceID>_0.dat, <deviceID>_0.idx

For example, the log for device 1473 consists of files 1473_0.dat and 1473_0.idx. If the log files for the specified device already exist, getPackets will append to the log.

Options

Option Description Values
nodeURL IP address or host name of SIAM node e.g. 134.89.88.1, mooring.moos.mbari.org
logDirectory Path to log files $SIAM_HOME/logs
deviceID

long (64-bit) integer uniquely identifying the instrument service

filter utilities use deviceIDs instead of instrument ports to specify an instrument
14533,997,1003, etc.
-age display age (seconds) of latest packet in log -
Filter Options

-start <startTime>

-stop <stopTime>

Publish packets from within the specified time window. startTime and stopTime are date/time strings using the format:
mm/dd/yyyy[Thh:mm[:ss]]
The time should be specified in UTC(?)
04/01/2010, 03/15/2009T11:34
-type <packetType>

Indicates what types of packets to apply the filter to. Multiple values should be separated by spaces

Valid values are 'data', 'message', 'summary','metadata' or 'all'

-skip

Set skip interval (sub-sampling modulus) filter value.

valid values are integers greater than or equal to -1.

A value of -1 means skip all packets (don't return any packets of the specified type).

A value of 0 (zero) means skip no packets (return all packets of the specified type).

Formatting Options
-bin show data in raw binary form -
-hex show data in ASCII hex format -
-utc display human readable UTC timestamps -
-parse <class> parse data using <class> (must implement PacketParser); <class> is a fully qualified package name. org.mbari.siam.devices.seabird.SBEPacketParser
-noheader suppress headers -
-stream native bytes only; no headers or separators -
-e timestamp header (UTC ms since epoch) -
-u timestamp header (UTC human readable) -
-r <separator> record separator (between packets) -
-h <separator> header separator (between header and data) -
-notype suppress packet type text -
-stats include packet statistics -
-statsOnly show packet statistics only -
-sheader include stats header -
Repair Options
-check check logs and summarize -
-repair attempt to repair corrupt log -

Example output:

logView 1151 logs

MetadataPacket
parentID=999, recordType=0
devid=1151, t=1285819054600, seqNo=0, mdref=0
 cause=Service Init
<SRVC_MD<uuuuquudud
commPowerPolicy=ALWAYS
summaryTriggerCount=0
rbnbCacheFrames=1024
advertiseService=false
frameworkVersion=$Name:  $
svalue=2
dataShelfLifeHours=-1.0
serviceStatus=2
diagnosticSampleInterval=1
powerOnDelaySec=0
locationName=
peakCurrentMa=5000
maxSummarySamples=0
bvalue=1
powerPolicy=ALWAYS
sampleTimeoutMsec=1000
dvalue=5.0
parentID=999
...[lots more stuff]
MetadataPacket
parentID=999, recordType=0
devid=1151, t=1285819078692, seqNo=1, mdref=0
 cause=Service Init
<SRVC_MD>
commPowerPolicy=ALWAYS
summaryTriggerCount=0
rbnbCacheFrames=1024
advertiseService=false
frameworkVersion=$Name:  $
svalue=2
dataShelfLifeHours=-1.0
...[lots more stuff]
SummaryPacket
parentID=999, recordType=0
devid=1151, t=1285819108703, seqNo=2, mdref=1
This is a SUMMARY
SensorDataPacket
parentID=999, recordType=0
devid=1151, t=1285819108703, seqNo=3, mdref=1
nBytes=42
This is dummy instrument data - VERSION 2!
SensorDataPacket
parentID=999, recordType=0
devid=1151, t=1285819138725, seqNo=4, mdref=1
nBytes=42
This is dummy instrument data - VERSION 2!
...[many more packets of various types]
					

Environment

The following environment variables must be set:

Variable Description Example
JAVA_HOME location of Java installation
/j9, /opt/java/jdk1.3.1, etc.
JAVA Path to JVM command For MMC
$JAVA_HOME/bin/j9

For Sun JVM (e.g. linux, win32, mac OS)
$JAVA_HOME/bin/java
SIAM_HOME top of the SIAM directory tree -
SIAM_CLASSPATH Path including all SIAM and supporting classes For MMC
$JAVA_HOME/lib/jclMax/classes.zip:$JAVA_HOME/lib/prsnlmot.jar:$JAVA_HOME/lib/RXTXcomm.jar:$SIAM_HOME/classes

For linux/win32
$SIAM_HOME/classes

See Also