|
From: KING, K. (ATTSI) <KK...@at...> - 2011-04-15 15:11:19
|
Ok made those changes and still get this error.
[11-04-15@09:50:32] SUBSTR transform uses only a single oid, a numeric
offset and an optional shift value at
/usr/local/devmon-0.3.1-beta1/templates/cisco-ITP/itp_msu/transforms,
line 7
I have this in transforms
BAYTEST : SUBSTR : {procIndex} -1
This should give me the last single digit of procIndex.
-Kevin
-----Original Message-----
From: W.J.M. Nelis [mailto:Wim...@nl...]
Sent: Friday, April 15, 2011 2:12 AM
To: dev...@li...
Subject: Re: [Devmon] SUBSTR
Hello,
> I am attempting to use the SUBSTR transform but it does not seem to
> allow a negative position. I am trying to grab the text at the end of
a
> string. The application does not seem to like this. Or am I using it
> wrong?
>
Devmon does not check for a negative value of the offset. You might try
the following patch, which is I did NOT test:
Index: dm_templates.pm
===================================================================
--- dm_templates.pm (revision 14)
+++ dm_templates.pm (working copy)
@@ -567,7 +567,7 @@
};
$func_type eq 'substr' and do {
- $temp =~ s/\s*\{\s*\S+?\s*\}\s+(\d+)\s*(\d*)\s*//;
+ $temp =~ s/\s*\{\s*\S+?\s*\}\s+(-?\d+)\s*(\d*)\s*//;
do_log("SUBSTR transform uses only a single oid, a numeric
offset " .
"and an optional shift value at $trans_file, line
$l_num", 0)
and next LINE if $temp ne '';
Index: dm_tests.pm
===================================================================
--- dm_tests.pm (revision 15)
+++ dm_tests.pm (working copy)
@@ -533,7 +533,7 @@
my $oid_h = \%{$oids->{$oid}};
my ($dep_oid, $offset, $length) = ($1, $2, $3)
- if $oid_h->{'trans_data'} =~ /\{(.+)\}\s+(\d+)\s*(\d*)/;
+ if $oid_h->{'trans_data'} =~ /\{(.+)\}\s+(-?\d+)\s*(\d*)/;
my $dep_oid_h = \%{$oids->{$dep_oid}};
$length = undef if $length eq '';
Kind regards,
Wim Nelis.
************************************************************************
*******************************
The NLR disclaimer (http://www.nlr.nl/emaildisclaimer) is valid for NLR
e-mail messages.
************************************************************************
*******************************
------------------------------------------------------------------------
------
Benefiting from Server Virtualization: Beyond Initial Workload
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and
improve
application availability and disaster protection. Learn more about
boosting
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Devmon-support mailing list
Dev...@li...
https://lists.sourceforge.net/lists/listinfo/devmon-support
|