From patchwork Thu Aug 30 10:54:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hunt, David" X-Patchwork-Id: 44016 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2693058C6; Thu, 30 Aug 2018 12:55:12 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 3C8DD2BA3 for ; Thu, 30 Aug 2018 12:55:04 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Aug 2018 03:55:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,306,1531810800"; d="scan'208";a="84641527" Received: from silpixa00399952.ir.intel.com (HELO silpixa00399952.ger.corp.intel.com) ([10.237.223.64]) by fmsmga004.fm.intel.com with ESMTP; 30 Aug 2018 03:55:03 -0700 From: David Hunt To: dev@dpdk.org Cc: john.mcnamara@intel.com, david.hunt@intel.com Date: Thu, 30 Aug 2018 11:54:22 +0100 Message-Id: <20180830105422.1198-8-david.hunt@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180830105422.1198-1-david.hunt@intel.com> References: <20180830105422.1198-1-david.hunt@intel.com> Subject: [dpdk-dev] [PATCH v1 7/7] examples/power: add json example files X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch provides some example files in the json_examples sub-directory for sending to the fifo. Signed-off-by: David Hunt --- examples/vm_power_manager/json_examples/README | 6 ++++++ examples/vm_power_manager/json_examples/create.json | 8 ++++++++ examples/vm_power_manager/json_examples/destroy.json | 4 ++++ examples/vm_power_manager/json_examples/set_core_max.json | 6 ++++++ examples/vm_power_manager/json_examples/set_core_min.json | 6 ++++++ 5 files changed, 30 insertions(+) create mode 100644 examples/vm_power_manager/json_examples/README create mode 100644 examples/vm_power_manager/json_examples/create.json create mode 100644 examples/vm_power_manager/json_examples/destroy.json create mode 100644 examples/vm_power_manager/json_examples/set_core_max.json create mode 100644 examples/vm_power_manager/json_examples/set_core_min.json diff --git a/examples/vm_power_manager/json_examples/README b/examples/vm_power_manager/json_examples/README new file mode 100644 index 000000000..a94c6b14b --- /dev/null +++ b/examples/vm_power_manager/json_examples/README @@ -0,0 +1,6 @@ +Sample files for sending to the vm_power_manager through the fifo. + +Simply cat the file to /tmp/powermonitor/fifo.0 when the vm_power_manager +application is running. + +E.g. cat create.json >/tmp/powermonitor/fifo.0 diff --git a/examples/vm_power_manager/json_examples/create.json b/examples/vm_power_manager/json_examples/create.json new file mode 100644 index 000000000..a7133d9a1 --- /dev/null +++ b/examples/vm_power_manager/json_examples/create.json @@ -0,0 +1,8 @@ +{"policy": { + "name": "policy-1", + "command": "create", + "policy_type": "TIME", + "busy_hours":[ 17, 18, 19, 20, 21, 22, 23 ], + "quiet_hours":[ 2, 3, 4, 5, 6 ], + "core_list":[ 11, 12 ] +}} diff --git a/examples/vm_power_manager/json_examples/destroy.json b/examples/vm_power_manager/json_examples/destroy.json new file mode 100644 index 000000000..587c9e7e9 --- /dev/null +++ b/examples/vm_power_manager/json_examples/destroy.json @@ -0,0 +1,4 @@ +{"policy": { + "name": "policy-1", + "command": "destroy" +}} diff --git a/examples/vm_power_manager/json_examples/set_core_max.json b/examples/vm_power_manager/json_examples/set_core_max.json new file mode 100644 index 000000000..497030a44 --- /dev/null +++ b/examples/vm_power_manager/json_examples/set_core_max.json @@ -0,0 +1,6 @@ +{"instruction": { + "name": "set_power", + "command": "power", + "unit": "SCALE_MAX", + "resource_id": 10 +}} diff --git a/examples/vm_power_manager/json_examples/set_core_min.json b/examples/vm_power_manager/json_examples/set_core_min.json new file mode 100644 index 000000000..76d934fd8 --- /dev/null +++ b/examples/vm_power_manager/json_examples/set_core_min.json @@ -0,0 +1,6 @@ +{"instruction": { + "name": "set_power", + "command": "power", + "unit": "SCALE_MIN", + "resource_id": 10 +}}