From patchwork Fri Sep 1 01:47:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: QI Fuli X-Patchwork-Id: 9933257 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 46404602F0 for ; Fri, 1 Sep 2017 01:47:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 387E427CEA for ; Fri, 1 Sep 2017 01:47:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2D20627F10; Fri, 1 Sep 2017 01:47:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C3C1227CEA for ; Fri, 1 Sep 2017 01:47:56 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id A4EDB20958BF0; Thu, 31 Aug 2017 18:45:12 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mgwkm04.jp.fujitsu.com (mgwkm04.jp.fujitsu.com [202.219.69.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1DD5F21E70D2F for ; Thu, 31 Aug 2017 18:45:10 -0700 (PDT) Received: from kw-mxq.gw.nic.fujitsu.com (unknown [192.168.231.130]) by mgwkm04.jp.fujitsu.com with smtp id 3e6c_69cf_faf72735_0079_4149_9442_7bdd4cc38623; Fri, 01 Sep 2017 10:47:49 +0900 Received: from g01jpfmpwkw01.exch.g01.fujitsu.local (g01jpfmpwkw01.exch.g01.fujitsu.local [10.0.193.38]) by kw-mxq.gw.nic.fujitsu.com (Postfix) with ESMTP id 96714AC00DB for ; Fri, 1 Sep 2017 10:47:49 +0900 (JST) Received: from G01JPEXCHKW17.g01.fujitsu.local (G01JPEXCHKW17.g01.fujitsu.local [10.0.194.56]) by g01jpfmpwkw01.exch.g01.fujitsu.local (Postfix) with ESMTP id D34DB692767 for ; Fri, 1 Sep 2017 10:47:48 +0900 (JST) Received: from G01JPEXMBKW01.g01.fujitsu.local ([10.0.194.65]) by g01jpexchkw17 ([10.0.194.56]) with mapi id 14.03.0352.000; Fri, 1 Sep 2017 10:47:48 +0900 From: "Qi, Fuli" To: "linux-nvdimm@lists.01.org" Subject: [RFC patch 3/4]ndctl: nvdimmd: notify/monitor the feathers of over threshold event Thread-Topic: [RFC patch 3/4]ndctl: nvdimmd: notify/monitor the feathers of over threshold event Thread-Index: AdMixEidD1ctqCjYT9GUjFUxxmUhXg== Date: Fri, 1 Sep 2017 01:47:47 +0000 Message-ID: <0DEDF3B159719A448A49EF0E7B11E3222756C910@g01jpexmbkw01> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-securitypolicycheck: OK by SHieldMailChecker v2.5.2 x-shieldmailcheckerpolicyversion: FJ-ISEC-20170217-enc x-shieldmailcheckermailid: 25ac04e8c2f74d94ba17dc812148618d x-originating-ip: [10.17.204.163] MIME-Version: 1.0 X-SecurityPolicyCheck-GC: OK by FENCE-Mail X-TM-AS-MML: disable X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP Nvdimmd.service is the unit file of systemd for nvdimmd service. Sign-off-by: QI Fuli --- nvdimmd/Makefile | 4 ++++ nvdimmd/nvdimmd.service | 7 +++++++ 2 files changed, 11 insertions(+) -- QI Fuli diff --git a/nvdimmd/Makefile b/nvdimmd/Makefile index 3908e5d..df7eb46 100644 --- a/nvdimmd/Makefile +++ b/nvdimmd/Makefile @@ -1,5 +1,6 @@ CC = gcc LIBS = -ludev -luuid -lkmod +DEST = /usr/bin OBJS = ../ndctl/lib/.libs/libndctl.o ../daxctl/lib/.libs/libdaxctl.o ../util/.libs/sysfs.o ../util/.libs/log.o ../ndctl/lib/.libs/libndctl-smart.o IDIR = -I../ -I../ndctl PROGRAM = nvdimmd @@ -11,5 +12,8 @@ libnvdimmd.o: libnvdimmd.c $(CC) -o libnvdimmd.o $(IDIR) -c libnvdimmd.c nvdimmd.o: nvdimmd.c $(CC) -o nvdimmd.o $(IDIR) -c nvdimmd.c +install: nvdimmd nvdimmd.service + install -s nvdimmd $(DEST) + cp nvdimmd.service /usr/lib/systemd/system/ clean: rm -rf *.o $(PROGRAM) diff --git a/nvdimmd/nvdimmd.service b/nvdimmd/nvdimmd.service new file mode 100644 index 0000000..0b96aaa --- /dev/null +++ b/nvdimmd/nvdimmd.service @@ -0,0 +1,7 @@ +[Unit] +Description=Nvdimm Daemon + +[Service] +Type=forking +ExecStart=/usr/bin/nvdimmd +ExecStop=/usr/bin/kill ${MAINPID}