我的 cati 正在执行以下命令,但它没有更新文件
/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
更新 我已经设法通过删除与其相关的多余参数和 rrd 文件来解决这个问题。
我觉得如果我添加额外的输出字段,它就会破坏它。参见上图,它目前正在运行。以下是脚本
#!/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;
}