diff mbox series

[v5,7/7] ndctl: cxl: add man page documentation for monitor

Message ID 166803888924.145141.2305759221442551251.stgit@djiang5-desk3.ch.intel.com (mailing list archive)
State Accepted
Commit 0195810530565a45bf87f5d110f17e2fffb06285
Headers show
Series ndctl: cxl: add monitor support for trace events | expand

Commit Message

Dave Jiang Nov. 10, 2022, 12:08 a.m. UTC
Add man page documentation to explain the usage of cxl monitor.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---
 Documentation/cxl/cxl-monitor.txt |   62 +++++++++++++++++++++++++++++++++++++
 Documentation/cxl/meson.build     |    1 +
 2 files changed, 63 insertions(+)
 create mode 100644 Documentation/cxl/cxl-monitor.txt
diff mbox series

Patch

diff --git a/Documentation/cxl/cxl-monitor.txt b/Documentation/cxl/cxl-monitor.txt
new file mode 100644
index 000000000000..3fc992e4d4d9
--- /dev/null
+++ b/Documentation/cxl/cxl-monitor.txt
@@ -0,0 +1,62 @@ 
+// SPDX-License-Identifier: GPL-2.0
+
+cxl-monitor(1)
+==============
+
+NAME
+----
+cxl-monitor - Monitor the CXL trace events
+
+SYNOPSIS
+--------
+[verse]
+'cxl monitor' [<options>]
+
+DESCRIPTION
+-----------
+cxl-monitor is used for monitoring the CXL trace events emitted by
+the kernel and convert them to json objects and dumping the json format
+notifications to standard output or a logfile.
+
+EXAMPLES
+--------
+
+Run a monitor as a daemon to monitor events and output to a log file.
+[verse]
+cxl monitor --daemon --log=/var/log/cxl-monitor.log
+
+Run a monitor as a one-shot command and output the notifications to stdio.
+[verse]
+cxl monitor
+
+Run a monitor daemon as a system service
+[verse]
+systemctl start cxl-monitor.service
+
+OPTIONS
+-------
+-l::
+--log=::
+	Send log messages to the specified destination.
+	- "<file>":
+	  Send log messages to specified <file>. When fopen() is not able
+	  to open <file>, log messages will be forwarded to syslog.
+	- "standard":
+	  Send messages to standard output.
+
+The default log destination is '/var/log/cxl-monitor.log' if "--daemon" is specified,
+otherwise 'standard'. Note that standard and relative path for <file>
+will not work if "--daemon" is specified.
+
+--daemon::
+	Run a monitor as a daemon.
+
+include::verbose-option.txt[]
+
+include::human-option.txt[]
+
+include::../copyright.txt[]
+
+SEE ALSO
+--------
+linkcxl:cxl-list[1]
diff --git a/Documentation/cxl/meson.build b/Documentation/cxl/meson.build
index 147ea7130211..a6d77ab8cbc2 100644
--- a/Documentation/cxl/meson.build
+++ b/Documentation/cxl/meson.build
@@ -45,6 +45,7 @@  cxl_manpages = [
   'cxl-disable-region.txt',
   'cxl-enable-region.txt',
   'cxl-destroy-region.txt',
+  'cxl-monitor.txt',
 ]
 
 foreach man : cxl_manpages