00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
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 }