[Spacewalk-list] Generic Program with "multiple data" points

GProcunier at symcor.com GProcunier at symcor.com
Wed Jul 27 20:19:58 UTC 2011


Hello,

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" ?

For example:

I wrote the following perl script to extract read IO/s from monitored 
hosts into data points:

--SNIP--

#!/usr/bin/perl

open(IOSTAT,"-|","/usr/bin/iostat -xtd sda 15 2") or die;
@collect = <IOSTAT>;
close IOSTAT;

@collect = grep {!/^$/} @collect;
@data = split(/\s+/,$collect[-1]);
$read_ops = $data[3];

print "<perldata> <hash> <item key=\"data\">$read_ops</item> <item 
key=\"Read Ops\"> </item> </hash> </perldata>";

--SNIP--

Converted here into a "Generic Program with Data" probe (1 liner)

--SNIP--

/usr/bin/perl -e 'open(IOSTAT,"-|","/usr/bin/iostat -xtd sda 15 2") or 
die;@collect = <IOSTAT>;close IOSTAT;@colle
ct = grep {!/^$/} @collect;@data = split(/\s+/,$collect[-1]);$read_ops = 
$data[3];print "<perldata> <hash> <item k
ey=\"data\">$read_ops</item> <item key=\"Read Ops\"> </item> </hash> 
</perldata>";'

--SNIP--


What I would like to do is create more data points out of different 
streams of data from the -1- probe.

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).

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. 

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.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20110727/7bff7e74/attachment.htm>
-------------- next part --------------


CONFIDENTIALITY WARNING 
This communication, including any attachments, is for the exclusive use of addressee and may contain proprietary and/or confidential information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.

AVERTISSEMENT RELATIF ? LA CONFIDENTIALIT? 
Ce message, ainsi que les pi?ces qui y sont jointes, est destin? ? l?usage exclusif de la personne ? laquelle il s?adresse et peut contenir de l?information personnelle ou confidentielle. Si le lecteur de ce message n?en est pas le destinataire, nous l?avisons par la pr?sente que toute diffusion, distribution, reproduction ou utilisation de son contenu est strictement interdite. Veuillez avertir sur-le-champ l?exp?diteur par retour de courrier ?lectronique et supprimez ce message ainsi que toutes les pi?ces jointes.


More information about the Spacewalk-list mailing list