20 #include <ndb_global.h> 
   24 #include <ConfigRetriever.hpp> 
   25 #include <Properties.hpp> 
   28 void usage(
const char * prg){
 
   29   ndbout << 
"Usage " << prg 
 
   30          << 
" host <mgm host> <mgm port> <node id> [<ver id>]" << endl;
 
   33   for(
unsigned i = 0; 
i<strlen(prg); 
i++)
 
   36   ndbout << 
"      " << buf << 
"  file <filename> <node id> [<ver id>]" 
   40 NDB_COMMAND(printConfig, 
 
   41             "printConfig", 
"printConfig", 
"Prints configuration", 16384){ 
 
   46   if(strcmp(
"file", argv[1]) != 0 && strcmp(
"host", argv[1]) != 0){
 
   51   if(strcmp(
"host", argv[1]) == 0 && argc < 5){
 
   59   if(strcmp(
"host", argv[1]) == 0){
 
   62       verId = atoi(argv[5]);
 
   64     ndbout << 
"Getting config from: " << argv[2] << 
":" << atoi(argv[3]) 
 
   65            << 
" NodeId =" << atoi(argv[4]) 
 
   66            << 
" VersionId = " << verId << endl;
 
   71   } 
else if (strcmp(
"file", argv[1]) == 0){
 
   74       verId = atoi(argv[4]);
 
   76     ndbout << 
"Getting config from: " << argv[2]
 
   77            << 
" NodeId =" << atoi(argv[3]) 
 
   78            << 
" VersionId = " << verId << endl;
 
   80     p = c.
getConfig(argv[2], atoi(argv[3]), verId);
 
   87     ndbout << 
"Configuration not found: " << c.getErrorString() << endl;