Missing SAN data from agent running on RHEL5 with QLogic HBAs

Hi,

REDHAT 5 does not populate tx_words or rx_words, so the collection for the san data is does not work.

[root@...... /]# cat /sys/class/fc_host/host1/statistics/tx_words
0xffffffffffffffff


https://bugzilla.redhat.com/show_bug.cgi?id=642424 (Mentions RHEL6 but..)


I've created a workaround to define it as 1, which allows me to get tx_frames / rx_frames.

####
--- lpar2rrd-agent.pl   2017-10-19 14:24:39.000000000 +0100
+++ lpar2rrd-agent.pl.orig      2017-10-19 14:25:08.000000000 +0100

         my $data = <FH>;
         chomp($data);
         close(FH);
-       $data = 1 if ($data eq '0xffffffffffffffff');
         if ( ishexa($data) == 1 ) {
           $tx_words = sprintf( "%d", hex($data) ) * 4;    # convert to Bytes
         }

         my $data = <FH>;
         chomp($data);
         close(FH);
-       $data = 1 if ($data eq '0xffffffffffffffff');
         if ( ishexa($data) == 1 ) {
           $rx_words = sprintf( "%d", hex($data) ) * 4;    # convert to Bytes
         }

#

Clunky, but so far seems OK :)

I only get IOPS and not throughput but better than nothing.

Thanks,

Comments

  • Hi,

    thanks!

    What about to try this code instead?
            if ( ! $data eq '0xffffffffffffffff' && ishexa($data) == 1 ) {

    with your change there will be alway presented traffic 4, this should skip it what is more correct. There should be no data == NaNQ
    Can you test it? It should work as that if it is correctly coded on the daemon side.



  • Thanks - will update that, I didnt check the daemon code - wasnt sure if it would graph with partial data
  • let me know when it works, I am also not sure :)
  • beeroclock
    edited October 2017
    The above fix breaks it

    I think because $tx_words is empty which then fails the test below (line 2067ish)

     if ( !$tx_frames eq '' && !$rx_frames eq '' && !$tx_words eq '' && !$rx_words eq '' ) {


  • what means brakes it, data is not imported at all, right?
  • Yeah, not recorded/not sent so not imported
  • sorry, did not read it via the web, just the first line in email notification I noted.
    Yes, it is obvious of course.
Sign In or Register to comment.