diff options
author | Benoit Foucher <benoit@zeroc.com> | 2005-09-27 13:22:05 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2005-09-27 13:22:05 +0000 |
commit | eff6a7af8e73573e8a1cbb6cd23249f0a9cd9e7f (patch) | |
tree | 2c18eccdb121e6f58b9e4e4a0f414e3983855804 /cpp/src/IceGrid/Parser.cpp | |
parent | Fixes (diff) | |
download | ice-eff6a7af8e73573e8a1cbb6cd23249f0a9cd9e7f.tar.bz2 ice-eff6a7af8e73573e8a1cbb6cd23249f0a9cd9e7f.tar.xz ice-eff6a7af8e73573e8a1cbb6cd23249f0a9cd9e7f.zip |
Fixes to support a little more information for nodes.
Diffstat (limited to 'cpp/src/IceGrid/Parser.cpp')
-rw-r--r-- | cpp/src/IceGrid/Parser.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/cpp/src/IceGrid/Parser.cpp b/cpp/src/IceGrid/Parser.cpp index bd5b6519bb2..5009b2205fb 100644 --- a/cpp/src/IceGrid/Parser.cpp +++ b/cpp/src/IceGrid/Parser.cpp @@ -82,6 +82,7 @@ Parser::usage() " Describe application service template TEMPLATE.\n" "\n" "node list List all registered nodes.\n" + "node describe NAME Show information about node NAME.\n" "node ping NAME Ping node NAME.\n" "node shutdown NAME Shutdown node NAME.\n" "\n" @@ -510,6 +511,35 @@ Parser::describeServiceTemplate(const list<string>& args) } void +Parser::describeNode(const list<string>& args) +{ + if(args.size() != 1) + { + error("`node describe' requires exactly one argument\n(`help' for more info)"); + return; + } + + try + { + NodeInfo info = _admin->getNodeInfo(args.front()); + Output out(cout); + out << "node `" << args.front() << "'"; + out << sb; + out << nl << "operating system = `" << info.os << "'"; + out << nl << "host name = `" << info.hostname << "'"; + out << nl << "release = `" << info.release << "'"; + out << nl << "version = `" << info.version << "'"; + out << nl << "machine type = `" << info.machine << "'"; + out << nl << "number of processors = `" << info.nProcessors << "'"; + out << eb; + } + catch(const Ice::Exception& ex) + { + exception(ex); + } +} + +void Parser::pingNode(const list<string>& args) { if(args.size() != 1) |