// =====================================================================
//  $Id: TShowNetworkStatusCommand.cc,v 1.3 2003/10/06 17:02:37 goiwai Exp $
//  $Name: CLDAQ-1-11-00 $
//  $Log: TShowNetworkStatusCommand.cc,v $
//  Revision 1.3  2003/10/06 17:02:37  goiwai
//  *** empty log message ***
//
//  Revision 1.2  2003/07/30 16:17:33  goiwai
//  ファイルにコミットログをつけることにしました.
//
// =====================================================================
#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;
}
