#!/usr/bin/perl

# Gregory D. Troxel <gtroxel@bbn.com>

if (@ARGV == 0)
  {
    die "usage: doxp host";
  }

$series = "ntp";

if ( index($ARGV[1],"raw") >= 0 )
  {
    $series = $ARGV[1];
  }

$command[0] = "xplot";
$command[1] = "-x";
$command[2] = "-tile";

if ( $series eq "ntp" )
  {
    foreach $type ( split(' ', "frequency rsadjresid_integrated poffset_integrated poffset_piecewise aoffset clock") )
    {
      $command[$#command+1] = "m/$ARGV[0]/xplot.$type-$series";
    }
  }
else
  {
    foreach $type ( split(' ', "frequency rsadjresid_integrated poffset_integrated poffset_piecewise aoffset delay") )
    {
      $command[$#command+1] = "m/$ARGV[0]/xplot.$type-$series";
    }
  }

print "@command\n";

system @command;


