From 43f458dcf945b97380bbcf5ad48d5f72340f3805 Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 26 May 2011 13:00:49 +0000 Subject: [PATCH] rm old output git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9687 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/tools/insptbls | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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)