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,
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
-
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.
-
Howdy, Stranger!
Categories
- 1.6K All Categories
- 41 XORMON NG
- 25 XORMON
- 149 LPAR2RRD
- 13 VMware
- 16 IBM i
- 2 oVirt / RHV
- 4 MS Windows and Hyper-V
- Solaris / OracleVM
- XenServer / Citrix
- Nutanix
- 6 Database
- 2 Cloud
- 10 Kubernetes / OpenShift / Docker
- 122 STOR2RRD
- 19 SAN
- 7 LAN
- 17 IBM
- 3 EMC
- 12 Hitachi
- 5 NetApp
- 15 HPE
- Lenovo
- 1 Huawei
- 1 Dell
- Fujitsu
- 2 DataCore
- INFINIDAT
- 3 Pure Storage
- Oracle