All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Verma, Vishal L" <vishal.l.verma@intel.com>
To: "linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
	"qi.fuli@jp.fujitsu.com" <qi.fuli@jp.fujitsu.com>
Subject: Re: [PATCH] ndctl, list: add controller temperature threshold
Date: Mon, 25 Jun 2018 20:09:10 +0000	[thread overview]
Message-ID: <1529957348.27147.12.camel@intel.com> (raw)
In-Reply-To: <20180625084217.10608-1-qi.fuli@jp.fujitsu.com>

On Mon, 2018-06-25 at 17:42 +0900, QI Fuli wrote:
> This patch adds controller temperature threshold to list.
> When the dimm-controller-temperature event fires, users need to know
> the current controller temperature threshold value.
> 
> Signed-off-by: QI Fuli <qi.fuli@jp.fujitsu.com>
> ---
>  ndctl/util/json-smart.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/ndctl/util/json-smart.c b/ndctl/util/json-smart.c
> index 9482b35..d590b0c 100644
> --- a/ndctl/util/json-smart.c
> +++ b/ndctl/util/json-smart.c
> @@ -47,6 +47,18 @@ static void smart_threshold_to_json(struct ndctl_dimm
> *dimm,
>  					"temperature_threshold", jobj);
>  	}
>  
> +	if (alarm_control & ND_SMART_TEMP_TRIP) {

I think you want to use ND_SMART_CTEMP_TRIP here.

> +		unsigned int temp;
> +		double t;
> +
> +		temp =
> ndctl_cmd_smart_threshold_get_ctrl_temperature(cmd);
> +		t = ndctl_decode_smart_temperature(temp);
> +		jobj = json_object_new_double(t);
> +		if (jobj)
> +			json_object_object_add(jhealth,
> +				"controller_temperature_threshold",
> jobj);
> +	}
> +
>  	if (alarm_control & ND_SMART_SPARE_TRIP) {
>  		unsigned int spares;
 
We also seem to be missing from the listing, an
alarm_controller_temperature field to show whether or not the alarm is
enabled. Can you add that as well as part of this?


Thanks,
	-Vishal
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

  reply	other threads:[~2018-06-25 20:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-25  8:42 [PATCH] ndctl, list: add controller temperature threshold QI Fuli
2018-06-25 20:09 ` Verma, Vishal L [this message]
2018-06-25 23:55   ` Qi, Fuli

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=1529957348.27147.12.camel@intel.com \
    --to=vishal.l.verma@intel.com \
    --cc=linux-nvdimm@lists.01.org \
    --cc=qi.fuli@jp.fujitsu.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.