diff --git a/xCAT-server/share/xcat/tools/insptbls b/xCAT-server/share/xcat/tools/insptbls index 0239996e3..fa258d904 100755 --- a/xCAT-server/share/xcat/tools/insptbls +++ b/xCAT-server/share/xcat/tools/insptbls @@ -41,7 +41,6 @@ if ($help) { print "The script is run on the command line to inspect the xcatdb DB2 database tables.\n"; print "Output indicates whether compression should be set on the table.\n"; - print "These must be at least one row of data in the table.\n"; print "Output is put in /tmp/.output. For example /tmp/SITE.out.\n"; print "Usage:\n"; print "\t--V - Verbose mode\n"; @@ -103,6 +102,14 @@ foreach my $table (@tablist) { if ($::VERBOSE) { print "Inspect of table $table\n"; } + $cmd = " rm /tmp/$table.out"; # cleanup + xCAT::Utils->runcmd($cmd, 0); + if ($::RUNCMD_RC != 0) + { + `logger -txcat " insptbls:error $cmd"`; + } else { + `logger -txcat " insptbls: $cmd"`; + } $cmd="$::XCATROOT/sbin/runsqlcmd \"INSPECT ROWCOMPESTIMATE TABLE NAME $table results keep $table.res;\""; xCAT::Utils->runcmd($cmd, 0); if ($::RUNCMD_RC != 0)