|
From: Craig t. <crt...@gm...> - 2017-02-28 20:49:38
|
Hello,
I am trying to run collectl on a multi-HCA system. When I run with -sX,
the output returned is:
# INFINIBAND STATISTICS (/sec)
#Date Time HCA KBIn PktIn SizeIn KBOut PktOut SizeOut
Errors
20170228 12:46:35 mlx5 0 0 0 0 0 0
0
20170228 12:46:35 mlx5 0 0 0 0 0 0
0
20170228 12:46:35 mlx5 0 0 0 0 0 0
0
20170228 12:46:35 mlx5 0 0 0 0 0 0
0
20170228 12:46:36 mlx5 0 3 63 0 2 90
0
20170228 12:46:36 mlx5 0 0 0 0 0 0
0
20170228 12:46:36 mlx5 0 0 0 0 0 0
0
20170228 12:46:36 mlx5 0 0 0 0 0 0
0
I cannot identify which HCA is being used. With the patch below, I get
something that makes sense (to me).
# INFINIBAND STATISTICS (/sec)
#Date Time HCA KBIn PktIn SizeIn KBOut PktOut SizeOut
Errors
20170228 12:47:32 mlx5_0 0 3 77 0 3 64
0
20170228 12:47:32 mlx5_1 0 0 0 0 0 0
0
20170228 12:47:32 mlx5_2 0 0 0 0 0 0
0
20170228 12:47:32 mlx5_3 0 0 0 0 0 0
0
20170228 12:47:33 mlx5_0 0 0 0 0 0 0
0
20170228 12:47:33 mlx5_1 0 0 0 0 0 0
0
20170228 12:47:33 mlx5_2 0 0 0 0 0 0
0
20170228 12:47:33 mlx5_3 0 0 0 0 0 0
0
Is there a reason for stripping of the _ and not adding the device number?
Thanks,
Craig
--- collectl/usr/share/collectl/formatit.ph 2017-02-28 09:29:53.859849557
-0800
+++ debug/collectl/usr/share/collectl/formatit.ph 2017-02-28
12:43:09.431284802 -0800
@@ -7208,9 +7208,11 @@
# this is messy. some HCSa end with _ which we don't want to
print BUT we
# need to preserve the full name in the array so do a non-greedy
match so
# we see everything except the optional _ at the end.
- $HCAName[$i]=~/(\S+?)_*$/;
+
+ $name=$HCAName[$i].$i;
+
$line=sprintf("$datetime %-6s %7s %7s %7s %7s %7s %7s %7s\n",
- $1,
+ $name,
cvt($ibRxKB[$i]/$intSecs,7,0,1), cvt($ibRx[$i]/$intSecs,6),
$ibRx[$i] ? cvt($ibRxKB[$i]*1024/$ibRx[$i],4,0,1) : 0,
cvt($ibTxKB[$i]/$intSecs,7,0,1), cvt($ibTx[$i]/$intSecs,6),
|