Hi,
My name is Matt Mulhern and I have been recently working on an export .ph file 
to allow collectl to output in a format which in turn can be used with ITRS.

Everything has been going well, I have pulled out the –sC and –sN data that we 
need for now and can print this at will.
Basically, looking at the sexpr example, I have been able to populate variables 
with the data I need by cycling through each CPU for –sC and each network 
interface for –sN:
E.g.
    if ($subsys=~/C/)
    {
        my ($name, $userTot, $niceTot, $sysTot, $waitTot, $irqTot, $softTot, 
$stealTot, $idleTot, $intTot)=
           ('','','','','','','','','','');

        for (my $i=0; $i<$NumCpus; $i++)
……
}
And

    if ($subsys=~/N/)
    {
      my ($netname, $kbinT, $pktinT, $kboutT, $pktoutT)=('','','','','');
      for ($i=0; $i<@netOrder; $i++)
      {
        $netName=$netOrder[$i];
        next    if !defined($netSeen[$i]);
        next    if ($netFiltKeep eq '' && $netName=~/$netFiltIgnore/) || 
($netFiltKeep ne '' && $netName!~/$netFiltKeep/);
        next    if $netName=~/lo|sit/;

        $netname.=   "$netName ";
        $kbinT.=  "$netRxKBLast[$i] ";
        $pktinT.= "$netRxPktLast[$i] ";
        $kboutT.= "$netTxKBLast[$i] ";
        $pktoutT.="$netTxPktLast[$i] ";
.....
}


My only problem is figuring out how to cycle through every process with –sZ 
used.

E.g.
    if ($subsys=~/Z/)
    {
      my ($pid, $ppid, $vsz, $rss, $cp, $pct, $majF, $minF, $cmd 
)=('','','','','','','','','');
      for ($i=0; $i<$NumProcs; $i++)
      {
..…
}

Is there a variable I can refer to which is the total number of processes being 
monitored,  (replacing NumProcs highlighted above)?


Any help would be greatly appreciated.

With thanks,
Matt Mulhern



________________________________

Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient or have received this e-mail in error, please advise 
the sender immediately by reply e-mail and delete this message and any 
attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Collectl-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/collectl-interest

Reply via email to