Tracking Products

« Back to User Guide

$Id: tracking.html 17879 2012-12-12 19:49:10Z jmfee $
$URL: https://ghttrac.cr.usgs.gov/websvn/ProductDistribution/trunk/etc/documentation/userguide/tracking.html $

Components throughout the Product Distribution System send status messages to a Tracker. Senders can use this information to confirm their products were received, and identifty potential distribution problems.

Navigation

Using a Web Browser

Visit http://ehppdl1.cr.usgs.gov/tracker/

Using the Command Line to Track Products

java -jar ProductClient.jar --track [track arguments]

Track Arguments

--search
Search the tracker. At least one additional argument is required. XML containing all the matching updates is written to STDOUT.
[--source=<SOURCE>]
The product source to search.
[--type=<TYPE>]
The product type to search.
[--code=<CODE>]
The product code to search
[--updateTime=<TIME>]
The product updateTime to search. Examples include 2010-01-14T14:11:28.691-07:00 and 2010-01-14T21:11:28.691Z.
[--startid=<SEQ>]
Search for updates with ID >= SEQ.
[--class=<MODULE>]
A module name that sent the message.
--update
Send an update to a tracker. The message sent to the tracker is read from STDIN.
--productid=<URN>
The product id of the product to find, or being updated.
--class=<MODULE>
A module name that is sending this message.
--trackerURL=<URL>
URL of the tracker. By default this is http://ehppdl1.cr.usgs.gov/tracker/

Track Examples

Searching the tracker using the command line

Command
java -jar ProductClient.jar --track --search --source=us --type=losspager --code=usa00043nx
Output

XML containing search results.

Newlines added for readability, use an XML parser.

<?xml version="1.0"?>
<updates>
<update 
	sequenceNumber="41882" 
	created="2010-10-25T15:10:24+00:00" 
	host="136.177.24.95" 
	source="us" 
	type="losspager" 
	code="usa00043nx" 
	updateTime="2010-10-25T15:15:02+00:00" 
	className="gov.usgs.earthquake.distribution.SocketProductSender"
><![CDATA[Product Created]]></update>
<update 
	sequenceNumber="41884" 
	created="2010-10-25T15:10:27+00:00" 
	host="137.227.227.215" 
	source="us" 
	type="losspager" 
	code="usa00043nx" 
	updateTime="2010-10-25T15:15:02+00:00" 
	className="gov.usgs.earthquake.distribution.SocketProductReceiver"
><![CDATA[Product Received]]></update>
<update 
	sequenceNumber="41885" 
	created="2010-10-25T15:10:27+00:00" 
	host="137.227.227.215" 
	source="us" 
	type="losspager" 
	code="usa00043nx" 
	updateTime="2010-10-25T15:15:02+00:00" 
	className="gov.usgs.earthquake.distribution.EIDSNotificationSender"
><![CDATA[Notification Sent]]></update>
</updates>

Updating the tracker using the command line

Command

The arguments --trackerURL, --source, --type, --code, and --updateTime are all based on the product being tracked. The echo command is used to send the message to STDIN.

Line continuation characters (\) added for readability, all arguments would appear on one line.

echo "My custom message" | java -jar ProductClient.jar --track \
	--update \
	--trackerURL=http://ehppdl1.cr.usgs.gov/tracker/ \
	--source=us \
	--type=losspager \
	--code=usa00043nx \
	--updateTime=2010-10-25T15:15:02+00:00 \
	"--class=My Process Name"
Output

XML containing the update that was sent, including the assigned sequence number.

Newlines added for readability, use an XML parser.

<?xml version="1.0"?>
<updates>
<update 
	sequenceNumber="44186" 
	created="2010-10-26T17:22:17+00:00" 
	host="XXX.XXX.XXX.XXX" 
	source="us" 
	type="losspager" 
	code="usa00043nx" 
	updateTime="2010-10-25T15:15:02+00:00" 
	className="My Process Name"
><![CDATA[My custom message]]></update>
</updates>