0

my cati is executing the following command but it is not updating the file

/usr/bin/rrdtool graph - --imgformat=PNG --start=1424095759 --end=14241101500 --title='License feature ECHOS (36)' --base=1000 --height=120 --width=500 --alt-autoscale-max --lower-limit='0' COMMENT:"From 2015/02/16 08\:09\:19 To 2015/02/16 12\:09\:19\c" COMMENT:"  \n" --vertical-label='' --slope-mode --font TITLE:12: --font AXIS:8: --font LEGEND:10: --font UNIT:8: DEF:a="/opt/cacti-0.8.8a/rra/paradigm_licenses_echosused_1418.rrd":'EchosTotal':AVERAGE DEF:b="/opt/cacti-0.8.8a/rra/paradigm_licenses_echosused_1418.rrd":'EchosUsed':AVERAGE LINE1:a#0D006AFF:""  AREA:b#FF0000FF:""  GPRINT:b:LAST:"Current licenses in use\:%8.2lf %s"  GPRINT:a:LAST:"Total Licenses\:%8.2lf %s"  HRULE:36#00FF00FF:""


-rwxrwxrwx 1 cacti users 881176 Feb 16 08:12 paradigm_licenses_echosused_1418.rrd
-rwxrwxrwx 1 cacti users 111400 Sep 26 08:27 paradox_hdd_used_1430.rrd
-rwxrwxrwx 1 cacti users 111400 Sep 26 08:27 paradox_traffic_in_1431.rrd
-rwxrwxrwx 1 cacti users  56416 Sep 26 08:27 paradox_ucd_memavailreal_1425.rrd
-rwxrwxrwx 1 cacti users  56416 Sep 26 08:27 paradox_ucd_membuffer_1426.rrd
-rwxrwxrwx 1 cacti users  56416 Sep 26 08:27 paradox_ucd_memcached_1427.rrd
-rwxrwxrwx 1 cacti users  56416 Sep 26 08:27 paradox_ucd_memshared_1428.rrd
-rwxrwxrwx 1 cacti users  56416 Sep 26 08:27 paradox_ucd_memtotalreal_1429.rrd
-rwxrwxrwx 1 cacti users  56416 Sep 26 08:27 paradox_ucd_sscpurawidle_1421.rrd
-rwxrwxrwx 1 cacti users  56416 Sep 26 08:27 paradox_ucd_sscpurawnice_1422.rrd
-rwxrwxrwx 1 cacti users  56416 Sep 26 08:27 paradox_ucd_sscpurawsystem_1423.rrd
-rwxrwxrwx 1 cacti users  56416 Sep 26 08:27 paradox_ucd_sscpurawuser_1424.rrd

UPDATE I have manged to solve it by deleting the extra parameters and rrd files related to it. enter image description here

It seems to me if i add extra output fields it breaks it. see above picture which is currently working. Below is the script

#!/usr/bin/perl

$OutStr = "";

open(PROCESS, "ssh denison /apps/paradigm_all_vers/flexlm/Linux_x64_2.5.0_i12/bin/lmutil lmstat -a -c /apps/paradigm_all_vers/flexlm/license/license.dat |") || die;
while ( <PROCESS> )
{

   # Check for feature to monitor
   if ( $_ =~ / ECHOS:/ ) 
   {
      $OutStr = $OutStr . printFeatureInfo("Echos",$_);
   }
   if ( $_ =~ / ECHOS_CT:/ ) 
   {
      $OutStr = $OutStr . printFeatureInfo("EchosCT",$_);
   }
   if ( $_ =~ / ECHOS_EPOS:/ ) 
   {
      $OutStr = $OutStr . printFeatureInfo("EchosEpos",$_);
   }
   if ( $_ =~ / Power2D:/ ) 
   {
      $OutStr = $OutStr . printFeatureInfo("Power2D",$_);
   }
   if ( $_ =~ / Power2D3D:/ ) 
   {
      $OutStr = $OutStr . printFeatureInfo("Power2D3D",$_);
   }
#   if ( $_ =~ / Power3D:/ ) 
#   {
#      $OutStr = $OutStr . printFeatureInfo("Power3D",$_);
#   }
   if ( $_ =~ / CPM:/ ) 
   {
      $OutStr = $OutStr . printFeatureInfo("CPM",$_);
   }
#   if ( $_ =~ / GeoStatVol:/ ) 
#   {
#      $OutStr = $OutStr . printFeatureInfo("GeoStatVol",$_);
#   }
#   if ( $_ =~ / VelNav_ECHOS:/ ) 
#   {
#      $OutStr = $OutStr . printFeatureInfo("VelNav",$_);
#   }
   if ( $_ =~ / ECHOS_RTM:/ ) 
   {
      $OutStr = $OutStr . printFeatureInfo("EchosRTM",$_);
   }
#   if ( $_ =~ / 3DKPSTM:/ ) 
#   {
#      $OutStr = $OutStr . printFeatureInfo("3DKPSTM",$_);
#   }
#   if ( $_ =~ / 3DMIG_CT:/ ) 
#   {
#      $OutStr = $OutStr . printFeatureInfo("3DMIG_CT",$_);
#   }
   if ( $_ =~ / VelNav_ECHOS:/ ) 
   {
      $OutStr = $OutStr . printFeatureInfo("VelNav",$_);
   }
#   if ( $_ =~ / 2DFWCSPSDM_256:/ ) 
#   {
#      $OutStr = $OutStr . printFeatureInfo("2DFWCSPSDM_256",$_);
#   }
#   if ( $_ =~ / 2DPreStackMig_256:/ ) 
#   {
#      $OutStr = $OutStr . printFeatureInfo("2DPreStackMig_256",$_);
#   }
#   if ( $_ =~ / DataServer_GF:/ ) 
#   {
#      $OutStr = $OutStr . printFeatureInfo("DataServer_GF",$_);
#   }
#   if ( $_ =~ / DataServer_OW:/ ) 
#   {
#      $OutStr = $OutStr . printFeatureInfo("DataServer_OW",$_);
#   }
#   if ( $_ =~ / 2DPreStackMig_16:/ ) 
#   {
#      $OutStr = $OutStr . printFeatureInfo("2DPreStackMig_16",$_);
#   }
#   if ( $_ =~ / 3DPostStackMig_prl:/ ) 
#   {
#      $OutStr = $OutStr . printFeatureInfo("3DPostStackMig_prl",$_);
#   }
#   if ( $_ =~ / TomoLayer_8:/ ) 
#   {
#      $OutStr = $OutStr . printFeatureInfo("TomoLayer_8",$_);
#   }
#   if ( $_ =~ / FastVEL:/ ) 
#   {
#      $OutStr = $OutStr . printFeatureInfo("FastVEL",$_);
#   }
#   if ( $_ =~ / Attributes_ALL:/ ) 
#   {
#      $OutStr = $OutStr . printFeatureInfo("Attributes_ALL",$_);
#   }
#   if ( $_ =~ / Attributes_DSE:/ ) 
#   {
#      $OutStr = $OutStr . printFeatureInfo("Attributes_DSE",$_);
#   }
}

print "$OutStr\n";
close(PROCESS);


sub printFeatureInfo {
   $tmpStr = "";

   @fields = split(/ /, $_[1]);
   $used = @fields[12];
   $total = @fields[6];

   $tmpStr = "$_[0]Used:$used  $_[0]Total:$total ";

   return $tmpStr;
}
shorif2000
  • 351
  • 1
  • 8
  • 28
  • Command looks OK. Have you tried running it by hand (you'll need to redirect output to a file since the output filename is '-')? How do you know the PNG file isn't being updated? By looking at the web interface or on the server directly? – Paul Haldane Feb 16 '15 at 23:13
  • on the server the time stamps do not update. if i run it by hand i see gibberish on the screen. it must be working. how do i output to file and check the contents? – shorif2000 Feb 18 '15 at 12:20
  • Either use the command you've got and redirect output into a file with > test.png Or replace the first - in the command with the name of an output file (rrdtool graph test.png --imgformat= PNG ...) – Paul Haldane Feb 18 '15 at 13:34
  • i have updated the question – shorif2000 Feb 19 '15 at 10:35

0 Answers0