Return-Path: Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=mspinler@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (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 45b0wQ65zKzDqsy for ; Sat, 29 Jun 2019 01:26:13 +1000 (AEST) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5SFNFlv102457 for ; Fri, 28 Jun 2019 11:26:10 -0400 Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0b-001b2d01.pphosted.com with ESMTP id 2tdndgg83q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 28 Jun 2019 11:26:10 -0400 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x5SFOPSR025138 for ; Fri, 28 Jun 2019 15:26:09 GMT Received: from b01cxnp22035.gho.pok.ibm.com (b01cxnp22035.gho.pok.ibm.com [9.57.198.25]) by ppma04dal.us.ibm.com with ESMTP id 2t9by7eb20-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 28 Jun 2019 15:26:09 +0000 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5SFQ9c646858668 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 28 Jun 2019 15:26:09 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 10F35124053 for ; Fri, 28 Jun 2019 15:26:09 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E7ABA124052 for ; Fri, 28 Jun 2019 15:26:08 +0000 (GMT) Received: from [9.10.99.36] (unknown [9.10.99.36]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP for ; Fri, 28 Jun 2019 15:26:08 +0000 (GMT) To: OpenBMC Maillist From: Matt Spinler Subject: Creating event logs for blackout power losses Message-ID: <77618bc2-0725-c104-1744-7ceca51e2d09@linux.ibm.com> Date: Fri, 28 Jun 2019 10:26:09 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-28_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906280177 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: , X-List-Received-Date: Fri, 28 Jun 2019 15:26:15 -0000 Hi, We've been asked by field support to create an OpenBMC event log when we detect that we suffered a power blackout, by which I mean the system is up and running, and then the BMC suddenly reboots and when it comes back up main power is off. The issue for it is https://github.com/ibm-openbmc/dev/issues/677. I have a proposal in there for how to detect it in the chassis state manager code, which basically just consists of persisting the chassis power state and then checking it against the actual value on startup, and an error proposed at https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/22791. Does anyone have any other ideas or thoughts?  Is it OK if we make this the default behavior, or would it be preferred we enable it with a compile flag? Thanks, Matt