Skip to content
This repository
Browse code

Add additional debuggin output to the zpool status parser as well.

  • Loading branch information...
commit b2b0c62270a300fa622cb92d6b45d96b19fc1568 1 parent 54f447a
Ken Moore authored
7  src-qt4/life-preserver/lp-gui/LPGUtils.cpp
@@ -2,9 +2,10 @@
2 2
 
3 3
 LPDataset LPGUtils::loadPoolData(QString zpool){
4 4
   //Load the current information for the given zpool
5  
-  qDebug() << "New Dataset: " << zpool;
  5
+  qDebug() << "[DEBUG] New Dataset: " << zpool;
6 6
   LPDataset DSC;
7 7
   //List all the mountpoints in this dataset
  8
+  qDebug() << "[DEBUG] list snapshots";
8 9
   QStringList subsets = LPBackend::listDatasetSubsets(zpool);
9 10
   QStringList lpsnaps = LPBackend::listLPSnapshots(zpool);
10 11
   //populate the list of snapshots available for each mountpoint
@@ -32,7 +33,9 @@ LPDataset LPGUtils::loadPoolData(QString zpool){
32 33
     }
33 34
   }
34 35
   //Parse "zpool status <pool>"
  36
+  qDebug() << "[DEBUG] get zpool status";
35 37
   QStringList zstat = LPBackend::getCmdOutput("zpool status "+zpool);
  38
+  qDebug() << zstat.join("\n");
36 39
   //qDebug() << "zpool status "+zpool+":\n" << zstat.join("\n");
37 40
   bool atheader=false;
38 41
   QStringList disks, diskstates, running, errors, finished;
@@ -78,6 +81,7 @@ LPDataset LPGUtils::loadPoolData(QString zpool){
78 81
       }
79 82
     }
80 83
   }
  84
+  qDebug() << "[DEBUG] Get latest snapshot/replication info";
81 85
   //Now get the latest Snapshot/Replication information
82 86
   QStringList lpstat = LPBackend::listCurrentStatus();
83 87
   for(int i=0; i<lpstat.length(); i++){
@@ -93,6 +97,7 @@ LPDataset LPGUtils::loadPoolData(QString zpool){
93 97
       }
94 98
     }
95 99
   }
  100
+  qDebug() << "[DEBUG] save info to the structure and finish";
96 101
   //Now save the info to the dataset
97 102
   DSC.harddisks = disks;
98 103
   DSC.harddiskStatus = diskstates;

0 notes on commit b2b0c62

Please sign in to comment.
Something went wrong with that request. Please try again.