<font size=2 face="sans-serif">Hello,</font>
<br>
<br><font size=2 face="Lucida Console">Is it possible to have multiple
data categories and data points in a "Generic Program with Data"
probe similar to the built in "Linux: TCP Connections by State"
?</font>
<br>
<br><font size=2 face="Lucida Console">For example:</font>
<br>
<br><font size=2 face="Lucida Console">I wrote the following perl script
to extract read IO/s from monitored hosts into data points:</font>
<br>
<br><font size=2 face="Lucida Console">--SNIP--</font>
<br>
<br><font size=2 face="Lucida Console">#!/usr/bin/perl</font>
<br>
<br><font size=2 face="Lucida Console">open(IOSTAT,"-|","/usr/bin/iostat
-xtd sda 15 2") or die;</font>
<br><font size=2 face="Lucida Console">@collect = <IOSTAT>;</font>
<br><font size=2 face="Lucida Console">close IOSTAT;</font>
<br>
<br><font size=2 face="Lucida Console">@collect = grep {!/^$/} @collect;</font>
<br><font size=2 face="Lucida Console">@data = split(/\s+/,$collect[-1]);</font>
<br><font size=2 face="Lucida Console">$read_ops = $data[3];</font>
<br>
<br><font size=2 face="Lucida Console">print "<perldata> <hash>
<item key=\"data\">$read_ops</item> <item key=\"Read
Ops\"> </item> </hash> </perldata>";</font>
<br>
<br><font size=2 face="Lucida Console">--SNIP--</font>
<br>
<br><font size=2 face="Lucida Console">Converted here into a "Generic
Program with Data" probe (1 liner)</font>
<br>
<br><font size=2 face="Lucida Console">--SNIP--</font>
<br>
<br><font size=2 face="Lucida Console">/usr/bin/perl -e 'open(IOSTAT,"-|","/usr/bin/iostat
-xtd sda 15 2") or die;@collect = <IOSTAT>;close IOSTAT;@colle</font>
<br><font size=2 face="Lucida Console">ct = grep {!/^$/} @collect;@data
= split(/\s+/,$collect[-1]);$read_ops = $data[3];print "<perldata>
<hash> <item k</font>
<br><font size=2 face="Lucida Console">ey=\"data\">$read_ops</item>
<item key=\"Read Ops\"> </item> </hash> </perldata>";'</font>
<br>
<br><font size=2 face="Lucida Console">--SNIP--</font>
<br>
<br>
<br><font size=2 face="Lucida Console">What I would like to do is create
more data points out of different streams of data from the -1- probe.</font>
<br>
<br><font size=2 face="Lucida Console">In my script the iostat output captured
in @data has read io/s as element [3], while write io/s are captured in
element [4] (etc).</font>
<br>
<br><font size=2 face="Lucida Console">Going back to my reference to the
Linux: TCP connections by State probe; in that you can specify multiple
data point sources: eg, ESTABLISHED, TIME_WAIT, SYN_RECV etc.  </font>
<br>
<br><font size=2 face="Lucida Console">This would be preferred as then
I could process all the data from the iostat probe and create very powerful
reports.  I just dont know if that is possible as my current experiments
have yielded no success.</font>
<br>
<br>
<br>
<br>