linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: "Ulrich Windl" <Ulrich.Windl@rz.uni-regensburg.de>
Cc: <linux-scsi@vger.kernel.org>, James Smart <james.smart@broadcom.com>
Subject: Re: On FC host statistics ( /sys/class/fc_host/hostX/statistics) and monitoring plugins
Date: Tue, 26 May 2020 22:05:57 -0400	[thread overview]
Message-ID: <yq1h7w2kv96.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <5EC3CFAE020000A1000390D6@gwsmtp.uni-regensburg.de> (Ulrich Windl's message of "Tue, 19 May 2020 14:23:10 +0200")


Ulrich,

> 1) Some numbers (e.g. fcp_frame_alloc_failures) are not supported by
> some drivers (e.g. QLE2690) and the value read from the file is
> "0xffffffffffffffff". The source seems to set this to -1, but when
> reading it back it looks like unsigned. For a 64-bit counter it's
> quite unlikely to read this value, but it's still possible.

I agree that's messy.

> 2) While statistics counters seems to be 64 bits, I've experienced a
> "wrap around" at fewer bit positions (maybe like 40 bits) for the bfa
> driver. I have no idea whether it's a hardware restriction or a
> firmware/driver bug, however. I did my best to make sure it's not a
> problem of my plugin (assuming those counters are read atomically when
> using one read())

bfa has been dead for about 5 years so don't expect any fixes in that
department.

> My idea was (probably more universal than restricted to FC host
> statistics) to provide another file (maybe named "statistics") that
> lists the names of implemented statistics counters (i.e.: leaving out
> those set to -1) together with the significant bits (like 32 or 64),
> the type of the value (like "counter", "gauge", "boolean", "enum",
> "string", etc.)
> "string" would be free text (I doubt it will make sense for
> statistics, but anyhow), "enum" would be single word tokens
> (e.g. _not_ " NPort (fabric via point-to-point)"), "counter" would
> count bytes or events (maybe a type "event_count[er]" may make sense),
> and "gauge" would be a non-monotonic value like utilization...

I'm not a particularly big fan of -1 reporting. But it seems that the
path of least resistance is to fix the sysfs unsigned issue.

-- 
Martin K. Petersen	Oracle Linux Engineering

      reply	other threads:[~2020-05-27  2:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-19 12:23 On FC host statistics ( /sys/class/fc_host/hostX/statistics) and monitoring plugins Ulrich Windl
2020-05-27  2:05 ` Martin K. Petersen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yq1h7w2kv96.fsf@ca-mkp.ca.oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=Ulrich.Windl@rz.uni-regensburg.de \
    --cc=james.smart@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).