From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC761C433E7 for ; Wed, 14 Oct 2020 02:10:42 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A551721775 for ; Wed, 14 Oct 2020 02:10:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A551721775 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4C9wqf5mLGzDqlZ for ; Wed, 14 Oct 2020 13:10:38 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.helo=mga12.intel.com (client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=yong.b.li@linux.intel.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4C9wng4m8gzDqgZ for ; Wed, 14 Oct 2020 13:08:50 +1100 (AEDT) IronPort-SDR: hTnKUBKBkm9RyWFUs1d+g6rv7QlOlhk5GMktQKiVcZe6ye+MUmKdmm0Wljnjibn5CW7V2Ld5wr 5/a8vSzT9dkQ== X-IronPort-AV: E=McAfee;i="6000,8403,9773"; a="145335408" X-IronPort-AV: E=Sophos;i="5.77,373,1596524400"; d="scan'208";a="145335408" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2020 19:08:45 -0700 IronPort-SDR: SwQOwYbvmFXUGsYy7xQl1g59y1JSIE1bAlLdpRKg9+fzOAV7YnlDHYb29KLlt8rJ8nWVTk/QlN fwa2G+28YfqA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,373,1596524400"; d="scan'208";a="357232966" Received: from linux.intel.com ([10.54.29.200]) by orsmga007.jf.intel.com with ESMTP; 13 Oct 2020 19:08:44 -0700 Received: from [10.239.85.204] (shwdecce01.ccr.corp.intel.com [10.239.85.204]) by linux.intel.com (Postfix) with ESMTP id 813D8580814; Tue, 13 Oct 2020 19:08:43 -0700 (PDT) Subject: Re: How to list all sensors through redfish? To: Gunnar Mills , Lei Yu , "Li, Yong B" , Ed Tanous References: From: "Li, Yong B" Message-ID: Date: Wed, 14 Oct 2020 10:08:42 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.3.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "openbmc@lists.ozlabs.org" , "feistjj@gmail.com" Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" On 10/14/2020 12:30 AM, Gunnar Mills wrote: > On 10/12/2020 8:17 PM, Lei Yu wrote: >> On Sat, Oct 10, 2020 at 9:06 PM Li, Yong B wrote: >>> >>> Hi All, >>> >>> Based on the current bmcweb implementation: >>> >>> https://github.com/openbmc/bmcweb/blob/master/redfish-core/lib/sensors.hpp#L61 >>> >>> >>> The below URL only list these power/current/utilization sensors: >>> >>> redfish/v1/Chassis/$chassis/Sensors >>> >>> Just want to know why not list all running sensors? Is it required >>> by redfish spec? > > We asked this question in the Redfish forum thread below and Redfish > said "for sensors that are not covered elsewhere in the model - > meaning don't duplicate Power and Thermal". Thanks a lot for your clarification! > >>> >>> >>> Is there any way to  list all sensors through redfish interface? >>> Like the “ipmitool sensor list” command? >>> > > Not in one command. You will have to call the Thermal, Power, and > Sensors schemas like the webui does: > https://github.com/openbmc/webui-vue/blob/e9a59c75670461a80156554a4dfa04bab5eaf42c/src/store/modules/Health/SensorsStore.js#L22 > > In 2020.4, this changes and all sensors will be in one location. :) YES! the #/health/sensors webpage will display all these sensors, but I found a minor issue and submitted a code review > >> >> I just saw some discussion in the IRC by GunnarM quoted as: >> >>> /sensors is sensors that aren't in Power/Thermal >>> https://redfishforum.com/thread/190/sensorcollection-contain-all-sensors-chassis >>> For 2020.4 this changes, all sensors will be under /sensors with >>> only a link to the Power/Thermal/Fan/Powersupply schemas >> >> But from the Redfish spec it does not say /sensors should exclude the >> ones in Power/Thermal, instead /sensors is "the link to the collection >> of sensors located in the equipment and sub-components" > Yeah the spec should have clarified. Probably isn't worth clarifying > in the spec now because this changes in 2020.4 and that would be the > release any updated spec is available. > >> So I am expecting that it should contain all the sensors in the system. >> In OpenBMC, this could be done by returning all the objects that >> implement the xyz.openbmc_project.Sensor.Value interface. >> > > We implemented this way because of that thread. Feel free to reply on > that thread. > > Thanks, > Gunnar