// =====================================================================
//  $Id: TShowNetworkStatusCommand.cc,v 1.1.1.1 2003/06/27 02:56:41 goiwai Exp $
//  $Name: CLDAQ-1-06-02 $
// =====================================================================
#include "TShowNetworkStatusCommand.hh"
#include "TRunManager.hh"
#include "TUserInterface.hh"

static const Tstring _name = "/system/network";
static const Tstring _desc = "show network information.";

TShowNetworkStatusCommand::TShowNetworkStatusCommand( TRunManager* manager )
  : TCommand( manager, _name, _desc )
{;}

TShowNetworkStatusCommand::~TShowNetworkStatusCommand()
{;}

Tvoid TShowNetworkStatusCommand::Execute( const TstringList& arguments )
{
  if ( setenv( "PATH", "/bin:/sbin:/usr/bin:/usr/sbin", 1 ) == 0 ) {
    system( "netstat" );
    Tcout << Tendl;
    system( "route" );
  }
  return;
}
