Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

RunToolProbe.C

Go to the documentation of this file.
00001 // Copyright (C) 2001, Compaq Computer Corporation
00002 // 
00003 // This file is part of Vesta.
00004 // 
00005 // Vesta is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public
00007 // License as published by the Free Software Foundation; either
00008 // version 2.1 of the License, or (at your option) any later version.
00009 // 
00010 // Vesta is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 // Lesser General Public License for more details.
00014 // 
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with Vesta; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 
00019 // Last modified on Wed Apr 20 02:54:41 EDT 2005 by ken@xorian.net  
00020 //      modified on Wed Apr  5 11:48:10 PDT 2000 by mann  
00021 //      modified on Fri Feb  5 17:18:10 PST 1999 by heydon
00022 //      modified on Tue Apr  9 11:54:22 PDT 1996 by levin
00023 
00024 #include "Basics.H"
00025 #include "RunToolClient.H"
00026 #include <stdlib.h>
00027 
00028 using std::cout;
00029 using std::cerr;
00030 using std::endl;
00031 
00032 int main(int argc, char *argv[])
00033 {
00034   RunTool::Host_info h;
00035   if (argc < 2) {
00036     cerr << "Usage: RunToolProbe host" << endl;
00037     return 2;
00038   }
00039   try {
00040     RunTool::get_info(argv[1], h);
00041     cout << "sysname     '" << h.sysname << "'" << endl
00042          << "release     '" << h.release << "'" << endl
00043          << "version     '" << h.version << "'" << endl
00044          << "machine     '" << h.machine << "'" << endl
00045          << "cpus        " << h.cpus << endl
00046          << "cpuMHz      " << h.cpuMHz << endl
00047          << "memKB       " << h.memKB << endl
00048          << "max_tools   " << h.max_tools << endl
00049          << "cur_tools   " << h.cur_tools << endl
00050          << "load        " << h.load << endl
00051          << "cur_pending " << h.cur_pending << endl
00052          << "max_pending " << h.max_pending << endl;
00053   } catch (SRPC::failure f) {
00054     cout << "SRPC failure: "; cout << f.msg; cout << "\n";
00055     return 1;
00056   }
00057   return 0;
00058 }

Generated on Mon May 8 00:48:56 2006 for Vesta by  doxygen 1.4.2