From 5d21bc4858c7d0d67adb1e0cdec9880d97b83567 Mon Sep 17 00:00:00 2001 From: thanhbnq <49302843+thanhbnq@users.noreply.github.com> Date: Tue, 16 Apr 2019 14:52:52 +0700 Subject: doc: Update doc/CMakeList.txt after cleanup documentation (#111) (#117) * doc: Update after cleanup documentation - Add ascii_doc check - Spaces instead of tabs in doc/CMakeList.txt - Change style in markdown files to avoid error while converting from md to html - Since manpages are generated by pandoc, "doc-man" part is removed from doc/CMakeList.txt Signed-off-by: thanhbnq --- README.md | 16 +-- doc/CMakeLists.txt | 278 ++++++++++++++++++-------------------- doc/dlt_book.txt | 28 ++-- doc/dlt_cdh.md | 24 ++-- doc/dlt_extended_network_trace.md | 14 +- doc/dlt_filetransfer.md | 12 +- doc/dlt_for_developers.md | 1 - doc/dlt_kpi.md | 20 +-- doc/dlt_user_manual.txt | 4 +- 9 files changed, 190 insertions(+), 207 deletions(-) diff --git a/README.md b/README.md index d3c0991..9d9ee30 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ The following packages need to be installed in order to be able to build and ins On Ubuntu those dependencies can be installed with the following command: -> sudo apt-get install cmake zlib1g-dev libdbus-glib-1-dev +`sudo apt-get install cmake zlib1g-dev libdbus-glib-1-dev` To build and install the DLT daemon, follow these steps: @@ -129,9 +129,9 @@ All text based documentation will be replaced with by Markdown-based documentati Old documentation (not maintained - will be removed in future releases): -- DLT User Manual: doc/dlt_user_manual.txt +- DLT User Manual: doc/dlt\_user\_manual.txt - DLT Cheatsheet: doc/dlt_cheatsheet.txt -- DLT Design Specification: doc/dlt_design_specification.txt +- DLT Design Specification: doc/dlt\_design\_specification.txt - DLT Compilation of all documentation: doc/dlt_book.txt ### API Documentation @@ -164,8 +164,8 @@ If the man pages are changed the following command must be executed. ```bash mkdir build cd build -cmake -DWITH_DOC=ON .. -make doc-man +cmake -DWITH_MAN=ON .. +make generate_man ``` The generated man pages overwrite the existing ones. @@ -187,8 +187,8 @@ uncrustify version: 0.68_f List of open issues can be found on [Github](https://github.com/GENIVI/dlt-daemon/issues) -- DLT library: Usage of dlt_user_log_write_float64() and DLT_FLOAT64() leads to "Illegal instruction (core dumped)" on ARM target. -- DLT library: Nested calls to DLT_LOG_ ... are not supported, and will lead to a deadlock. +- DLT library: Usage of dlt\_user\_log\_write\_float64() and DLT_FLOAT64() leads to "Illegal instruction (core dumped)" on ARM target. +- DLT library: Nested calls to DLT\_LOG\_ ... are not supported, and will lead to a deadlock. - For Non linux platforms [eg: QNX] IPC supported is UNIX_SOCKET. For Linux Platforms both IPC FIFO and UNIX_SOCKET are supported ## Software/Hardware @@ -198,7 +198,7 @@ Developed and tested with Ubuntu Linux 16 64-bit / Intel PC ## License Full information on the license for this software is available in the "LICENSE" file. -Full information on the license for the cityhash code is available in "COPYING" file in src/core_dump_handler/cityhash_c. +Full information on the license for the cityhash code is available in "COPYING" file in src/core\_dump\_handler/cityhash_c. ## Mailinglist diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 0703570..1751e9c 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -20,159 +20,143 @@ if(WITH_DOC) configure_file(${CMAKE_SOURCE_DIR}/doc/doxygen.cfg.cmake ${CMAKE_BINARY_DIR}/doc/doxygen.cfg @ONLY) - add_custom_target (doc ALL - COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/doc/doxygen.cfg - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/doc - ) - - add_custom_target (doc-manuals ALL - COMMAND mkdir -p ${CMAKE_BINARY_DIR}/doc/manuals - COMMAND mkdir -p ${CMAKE_BINARY_DIR}/doc/manuals/images - COMMAND cp ${CMAKE_SOURCE_DIR}/doc/images/* ${CMAKE_BINARY_DIR}/doc/manuals/images - COMMAND asciidoc -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/INSTALL.html ${CMAKE_SOURCE_DIR}/INSTALL - COMMAND asciidoc -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/README.html ${CMAKE_SOURCE_DIR}/README.md - COMMAND asciidoc -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/ReleaseNotes.html ${CMAKE_SOURCE_DIR}/ReleaseNotes.txt - COMMAND asciidoc -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/dlt_user_manual.html ${CMAKE_SOURCE_DIR}/doc/dlt_user_manual.txt - COMMAND asciidoc -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/dlt_cheatsheet.html ${CMAKE_SOURCE_DIR}/doc/dlt_cheatsheet.txt - COMMAND asciidoc -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/dlt_design_specification.html ${CMAKE_SOURCE_DIR}/doc/dlt_design_specification.txt - COMMAND asciidoc -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/dlt_filetransfer.html ${CMAKE_SOURCE_DIR}/doc/dlt_filetransfer.txt - COMMAND asciidoc -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/dlt-daemon.1.html ${CMAKE_SOURCE_DIR}/doc/dlt-daemon.1.txt - COMMAND asciidoc -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/dlt-system.1.html ${CMAKE_SOURCE_DIR}/doc/dlt-system.1.txt - COMMAND asciidoc -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/dlt-receive.1.html ${CMAKE_SOURCE_DIR}/doc/dlt-receive.1.txt - COMMAND asciidoc -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/dlt-convert.1.html ${CMAKE_SOURCE_DIR}/doc/dlt-convert.1.txt - COMMAND asciidoc -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/dlt-sortbytimestamp.1.html ${CMAKE_SOURCE_DIR}/doc/dlt-sortbytimestamp.1.txt - COMMAND asciidoc -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/dlt.conf.5.html ${CMAKE_SOURCE_DIR}/doc/dlt.conf.5.txt - COMMAND asciidoc -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/dlt-system.conf.5.html ${CMAKE_SOURCE_DIR}/doc/dlt-system.conf.5.txt - COMMAND asciidoc -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/dlt_book.html ${CMAKE_SOURCE_DIR}/doc/dlt_book.txt - COMMAND asciidoc -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/dlt_extended_network_trace.html ${CMAKE_SOURCE_DIR}/doc/dlt_extended_network_trace.txt - COMMAND asciidoc -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/dlt_howto_debug.html ${CMAKE_SOURCE_DIR}/doc/dlt_howto_debug.txt - COMMAND asciidoc -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/dlt_offline_logstorage.html ${CMAKE_SOURCE_DIR}/doc/dlt_offline_logstorage.txt - COMMAND asciidoc -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/dlt_multinode.html ${CMAKE_SOURCE_DIR}/doc/dlt_multinode.txt - COMMAND asciidoc -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/dlt-kpi.html ${CMAKE_SOURCE_DIR}/doc/dlt_kpi.txt - COMMAND asciidoc -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/dlt-cdh.html ${CMAKE_SOURCE_DIR}/doc/dlt_cdh.txt - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/doc - ) - - add_custom_target (doc-man - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/doc - COMMAND a2x --doctype manpage --format manpage ${CMAKE_SOURCE_DIR}/doc/dlt-daemon.1.txt - COMMAND a2x --doctype manpage --format manpage ${CMAKE_SOURCE_DIR}/doc/dlt-system.1.txt - COMMAND a2x --doctype manpage --format manpage ${CMAKE_SOURCE_DIR}/doc/dlt-receive.1.txt - COMMAND a2x --doctype manpage --format manpage ${CMAKE_SOURCE_DIR}/doc/dlt-convert.1.txt - COMMAND a2x --doctype manpage --format manpage ${CMAKE_SOURCE_DIR}/doc/dlt-sortbytimestamp.1.txt - COMMAND a2x --doctype manpage --format manpage ${CMAKE_SOURCE_DIR}/doc/dlt.conf.5.txt - COMMAND a2x --doctype manpage --format manpage ${CMAKE_SOURCE_DIR}/doc/dlt-system.conf.5.txt - COMMAND a2x --doctype manpage --format manpage ${CMAKE_SOURCE_DIR}/doc/dlt-logstorage-ctrl.1.txt - COMMAND a2x --doctype manpage --format manpage ${CMAKE_SOURCE_DIR}/doc/dlt-passive-node-ctrl.1.txt - ) + add_custom_target (doc ALL + COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/doc/doxygen.cfg + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/doc + ) + + FIND_PROGRAM(ASCIIDOC_TOOL + NAMES asciidoc + PATHS /bin + /usr/bin + /usr/local/bin) + + if(NOT ASCIIDOC_TOOL) + MESSAGE(FATAL_ERROR "Could not find asciidoc for doc-manuals generation.") + endif(NOT ASCIIDOC_TOOL) + + add_custom_target (doc-manuals ALL + COMMAND mkdir -p ${CMAKE_BINARY_DIR}/doc/manuals + COMMAND mkdir -p ${CMAKE_BINARY_DIR}/doc/manuals/images + COMMAND cp ${CMAKE_SOURCE_DIR}/doc/images/* ${CMAKE_BINARY_DIR}/doc/manuals/images + COMMAND ${ASCIIDOC_TOOL} -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/README.html ${CMAKE_SOURCE_DIR}/README.md + COMMAND ${ASCIIDOC_TOOL} -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/dlt_user_manual.html ${CMAKE_SOURCE_DIR}/doc/dlt_user_manual.txt + COMMAND ${ASCIIDOC_TOOL} -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/dlt_cheatsheet.html ${CMAKE_SOURCE_DIR}/doc/dlt_cheatsheet.txt + COMMAND ${ASCIIDOC_TOOL} -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/dlt_design_specification.html ${CMAKE_SOURCE_DIR}/doc/dlt_design_specification.txt + COMMAND ${ASCIIDOC_TOOL} -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/dlt_book.html ${CMAKE_SOURCE_DIR}/doc/dlt_book.txt + COMMAND ${ASCIIDOC_TOOL} -a TOC1 -o ${CMAKE_BINARY_DIR}/doc/manuals/dlt_howto_debug.html ${CMAKE_SOURCE_DIR}/doc/dlt_howto_debug.txt + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/doc + ) endif(WITH_DOC) if(WITH_MAN) - # Compress the man pages and install to proper place - FIND_PROGRAM(GZIP_TOOL - NAMES gzip - PATHS /bin - /usr/bin - /usr/local/bin) - - if(NOT GZIP_TOOL) - MESSAGE(FATAL_ERROR "Could not find gzip for man page compression.") - endif(NOT GZIP_TOOL) - - FIND_PROGRAM(PANDOC_TOOL - NAMES pandoc - PATHS /bin - /usr/bin - /usr/local/bin) - + # Compress the man pages and install to proper place + FIND_PROGRAM(GZIP_TOOL + NAMES gzip + PATHS /bin + /usr/bin + /usr/local/bin) + + if(NOT GZIP_TOOL) + MESSAGE(FATAL_ERROR "Could not find gzip for man page compression.") + endif(NOT GZIP_TOOL) + + FIND_PROGRAM(PANDOC_TOOL + NAMES pandoc + PATHS /bin + /usr/bin + /usr/local/bin) if(NOT PANDOC_TOOL) - MESSAGE(FATAL_ERROR "Could not find pandoc for man page generation.") + MESSAGE(FATAL_ERROR "Could not find pandoc for man page generation.") endif(NOT PANDOC_TOOL) - set(MAN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}) - set(MAN_BUILD_DIR ${CMAKE_BINARY_DIR}/doc) - - set(MD_SRC - ${MAN_SRC_DIR}/dlt.conf.5.md - ${MAN_SRC_DIR}/dlt-system.conf.5.md - ${MAN_SRC_DIR}/dlt-convert.1.md - ${MAN_SRC_DIR}/dlt-sortbytimestamp.1.md - ${MAN_SRC_DIR}/dlt-daemon.1.md - ${MAN_SRC_DIR}/dlt-receive.1.md - ${MAN_SRC_DIR}/dlt-system.1.md - ${MAN_SRC_DIR}/dlt-logstorage-ctrl.1.md - ${MAN_SRC_DIR}/dlt-passive-node-ctrl.1.md) - set(MAN_SRC - ${MAN_SRC_DIR}/dlt.conf.5 - ${MAN_SRC_DIR}/dlt-system.conf.5 - ${MAN_SRC_DIR}/dlt-convert.1 - ${MAN_SRC_DIR}/dlt-sortbytimestamp.1 - ${MAN_SRC_DIR}/dlt-daemon.1 - ${MAN_SRC_DIR}/dlt-receive.1 - ${MAN_SRC_DIR}/dlt-system.1 - ${MAN_SRC_DIR}/dlt-logstorage-ctrl.1 - ${MAN_SRC_DIR}/dlt-passive-node-ctrl.1) - set(MAN_BUILD_SRC - ${MAN_BUILD_DIR}/dlt.conf.5 - ${MAN_BUILD_DIR}/dlt-system.conf.5 - ${MAN_BUILD_DIR}/dlt-convert.1 - ${MAN_BUILD_DIR}/dlt-sortbytimestamp.1 - ${MAN_BUILD_DIR}/dlt-daemon.1 - ${MAN_BUILD_DIR}/dlt-receive.1 - ${MAN_BUILD_DIR}/dlt-system.1 - ${MAN_BUILD_DIR}/dlt-logstorage-ctrl.1 - ${MAN_BUILD_DIR}/dlt-passive-node-ctrl.1) - set(MAN_BUILD_GZ - ${MAN_BUILD_DIR}/dlt.conf.5.gz - ${MAN_BUILD_DIR}/dlt-system.conf.5.gz - ${MAN_BUILD_DIR}/dlt-convert.1.gz - ${MAN_BUILD_DIR}/dlt-sortbytimestamp.1.gz - ${MAN_BUILD_DIR}/dlt-daemon.1.gz - ${MAN_BUILD_DIR}/dlt-receive.1.gz - ${MAN_BUILD_DIR}/dlt-system.1.gz - ${MAN_BUILD_DIR}/dlt-logstorage-ctrl.1.gz - ${MAN_BUILD_DIR}/dlt-passive-node-ctrl.1.gz) - - add_custom_target(generate_man ALL - COMMAND ${PANDOC_TOOL} -s -t man ${MAN_SRC_DIR}/dlt.conf.5.md -o ${MAN_BUILD_DIR}/dlt.conf.5 - COMMAND ${PANDOC_TOOL} -s -t man ${MAN_SRC_DIR}/dlt-system.conf.5.md -o ${MAN_BUILD_DIR}/dlt-system.conf.5 - COMMAND ${PANDOC_TOOL} -s -t man ${MAN_SRC_DIR}/dlt-convert.1.md -o ${MAN_BUILD_DIR}/dlt-convert.1 - COMMAND ${PANDOC_TOOL} -s -t man ${MAN_SRC_DIR}/dlt-sortbytimestamp.1.md -o ${MAN_BUILD_DIR}/dlt-sortbytimestamp.1 - COMMAND ${PANDOC_TOOL} -s -t man ${MAN_SRC_DIR}/dlt-daemon.1.md -o ${MAN_BUILD_DIR}/dlt-daemon.1 - COMMAND ${PANDOC_TOOL} -s -t man ${MAN_SRC_DIR}/dlt-receive.1.md -o ${MAN_BUILD_DIR}/dlt-receive.1 - COMMAND ${PANDOC_TOOL} -s -t man ${MAN_SRC_DIR}/dlt-system.1.md -o ${MAN_BUILD_DIR}/dlt-system.1 - COMMAND ${PANDOC_TOOL} -s -t man ${MAN_SRC_DIR}/dlt-logstorage-ctrl.1.md -o ${MAN_BUILD_DIR}/dlt-logstorage-ctrl.1 - COMMAND ${PANDOC_TOOL} -s -t man ${MAN_SRC_DIR}/dlt-passive-node-ctrl.1.md -o ${MAN_BUILD_DIR}/dlt-passive-node-ctrl.1 - - COMMAND ${GZIP_TOOL} -c ${MAN_BUILD_DIR}/dlt.conf.5 > ${MAN_BUILD_DIR}/dlt.conf.5.gz - COMMAND ${GZIP_TOOL} -c ${MAN_BUILD_DIR}/dlt-system.conf.5 > ${MAN_BUILD_DIR}/dlt-system.conf.5.gz - COMMAND ${GZIP_TOOL} -c ${MAN_BUILD_DIR}/dlt-convert.1 > ${MAN_BUILD_DIR}/dlt-convert.1.gz - COMMAND ${GZIP_TOOL} -c ${MAN_BUILD_DIR}/dlt-sortbytimestamp.1 > ${MAN_BUILD_DIR}/dlt-sortbytimestamp.1.gz - COMMAND ${GZIP_TOOL} -c ${MAN_BUILD_DIR}/dlt-daemon.1 > ${MAN_BUILD_DIR}/dlt-daemon.1.gz - COMMAND ${GZIP_TOOL} -c ${MAN_BUILD_DIR}/dlt-receive.1 > ${MAN_BUILD_DIR}/dlt-receive.1.gz - COMMAND ${GZIP_TOOL} -c ${MAN_BUILD_DIR}/dlt-system.1 > ${MAN_BUILD_DIR}/dlt-system.1.gz - COMMAND ${GZIP_TOOL} -c ${MAN_BUILD_DIR}/dlt-logstorage-ctrl.1 > ${MAN_BUILD_DIR}/dlt-logstorage-ctrl.1.gz - COMMAND ${GZIP_TOOL} -c ${MAN_BUILD_DIR}/dlt-passive-node-ctrl.1 > ${MAN_BUILD_DIR}/dlt-passive-node-ctrl.1.gz) - - # If user has not set the base dir for man pages, use a default location - set(MAN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/man) - - install(FILES - ${MAN_BUILD_DIR}/dlt.conf.5.gz - ${MAN_BUILD_DIR}/dlt-system.conf.5.gz - DESTINATION ${MAN_INSTALL_DIR}/man5 - ) - - install(FILES - ${MAN_BUILD_DIR}/dlt-convert.1.gz - ${MAN_BUILD_DIR}/dlt-sortbytimestamp.1.gz - ${MAN_BUILD_DIR}/dlt-daemon.1.gz - ${MAN_BUILD_DIR}/dlt-receive.1.gz - ${MAN_BUILD_DIR}/dlt-system.1.gz - ${MAN_BUILD_DIR}/dlt-logstorage-ctrl.1.gz - ${MAN_BUILD_DIR}/dlt-passive-node-ctrl.1.gz - DESTINATION ${MAN_INSTALL_DIR}/man1 - ) + set(MAN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + set(MAN_BUILD_DIR ${CMAKE_BINARY_DIR}/doc) + + set(MD_SRC + ${MAN_SRC_DIR}/dlt.conf.5.md + ${MAN_SRC_DIR}/dlt-system.conf.5.md + ${MAN_SRC_DIR}/dlt-convert.1.md + ${MAN_SRC_DIR}/dlt-sortbytimestamp.1.md + ${MAN_SRC_DIR}/dlt-daemon.1.md + ${MAN_SRC_DIR}/dlt-receive.1.md + ${MAN_SRC_DIR}/dlt-system.1.md + ${MAN_SRC_DIR}/dlt-logstorage-ctrl.1.md + ${MAN_SRC_DIR}/dlt-passive-node-ctrl.1.md) + + set(MAN_SRC + ${MAN_SRC_DIR}/dlt.conf.5 + ${MAN_SRC_DIR}/dlt-system.conf.5 + ${MAN_SRC_DIR}/dlt-convert.1 + ${MAN_SRC_DIR}/dlt-sortbytimestamp.1 + ${MAN_SRC_DIR}/dlt-daemon.1 + ${MAN_SRC_DIR}/dlt-receive.1 + ${MAN_SRC_DIR}/dlt-system.1 + ${MAN_SRC_DIR}/dlt-logstorage-ctrl.1 + ${MAN_SRC_DIR}/dlt-passive-node-ctrl.1) + + set(MAN_BUILD_SRC + ${MAN_BUILD_DIR}/dlt.conf.5 + ${MAN_BUILD_DIR}/dlt-system.conf.5 + ${MAN_BUILD_DIR}/dlt-convert.1 + ${MAN_BUILD_DIR}/dlt-sortbytimestamp.1 + ${MAN_BUILD_DIR}/dlt-daemon.1 + ${MAN_BUILD_DIR}/dlt-receive.1 + ${MAN_BUILD_DIR}/dlt-system.1 + ${MAN_BUILD_DIR}/dlt-logstorage-ctrl.1 + ${MAN_BUILD_DIR}/dlt-passive-node-ctrl.1) + + set(MAN_BUILD_GZ + ${MAN_BUILD_DIR}/dlt.conf.5.gz + ${MAN_BUILD_DIR}/dlt-system.conf.5.gz + ${MAN_BUILD_DIR}/dlt-convert.1.gz + ${MAN_BUILD_DIR}/dlt-sortbytimestamp.1.gz + ${MAN_BUILD_DIR}/dlt-daemon.1.gz + ${MAN_BUILD_DIR}/dlt-receive.1.gz + ${MAN_BUILD_DIR}/dlt-system.1.gz + ${MAN_BUILD_DIR}/dlt-logstorage-ctrl.1.gz + ${MAN_BUILD_DIR}/dlt-passive-node-ctrl.1.gz) + + add_custom_target(generate_man ALL + COMMAND ${PANDOC_TOOL} -s -t man ${MAN_SRC_DIR}/dlt.conf.5.md -o ${MAN_BUILD_DIR}/dlt.conf.5 + COMMAND ${PANDOC_TOOL} -s -t man ${MAN_SRC_DIR}/dlt-system.conf.5.md -o ${MAN_BUILD_DIR}/dlt-system.conf.5 + COMMAND ${PANDOC_TOOL} -s -t man ${MAN_SRC_DIR}/dlt-convert.1.md -o ${MAN_BUILD_DIR}/dlt-convert.1 + COMMAND ${PANDOC_TOOL} -s -t man ${MAN_SRC_DIR}/dlt-sortbytimestamp.1.md -o ${MAN_BUILD_DIR}/dlt-sortbytimestamp.1 + COMMAND ${PANDOC_TOOL} -s -t man ${MAN_SRC_DIR}/dlt-daemon.1.md -o ${MAN_BUILD_DIR}/dlt-daemon.1 + COMMAND ${PANDOC_TOOL} -s -t man ${MAN_SRC_DIR}/dlt-receive.1.md -o ${MAN_BUILD_DIR}/dlt-receive.1 + COMMAND ${PANDOC_TOOL} -s -t man ${MAN_SRC_DIR}/dlt-system.1.md -o ${MAN_BUILD_DIR}/dlt-system.1 + COMMAND ${PANDOC_TOOL} -s -t man ${MAN_SRC_DIR}/dlt-logstorage-ctrl.1.md -o ${MAN_BUILD_DIR}/dlt-logstorage-ctrl.1 + COMMAND ${PANDOC_TOOL} -s -t man ${MAN_SRC_DIR}/dlt-passive-node-ctrl.1.md -o ${MAN_BUILD_DIR}/dlt-passive-node-ctrl.1 + + COMMAND ${GZIP_TOOL} -c ${MAN_BUILD_DIR}/dlt.conf.5 > ${MAN_BUILD_DIR}/dlt.conf.5.gz + COMMAND ${GZIP_TOOL} -c ${MAN_BUILD_DIR}/dlt-system.conf.5 > ${MAN_BUILD_DIR}/dlt-system.conf.5.gz + COMMAND ${GZIP_TOOL} -c ${MAN_BUILD_DIR}/dlt-convert.1 > ${MAN_BUILD_DIR}/dlt-convert.1.gz + COMMAND ${GZIP_TOOL} -c ${MAN_BUILD_DIR}/dlt-sortbytimestamp.1 > ${MAN_BUILD_DIR}/dlt-sortbytimestamp.1.gz + COMMAND ${GZIP_TOOL} -c ${MAN_BUILD_DIR}/dlt-daemon.1 > ${MAN_BUILD_DIR}/dlt-daemon.1.gz + COMMAND ${GZIP_TOOL} -c ${MAN_BUILD_DIR}/dlt-receive.1 > ${MAN_BUILD_DIR}/dlt-receive.1.gz + COMMAND ${GZIP_TOOL} -c ${MAN_BUILD_DIR}/dlt-system.1 > ${MAN_BUILD_DIR}/dlt-system.1.gz + COMMAND ${GZIP_TOOL} -c ${MAN_BUILD_DIR}/dlt-logstorage-ctrl.1 > ${MAN_BUILD_DIR}/dlt-logstorage-ctrl.1.gz + COMMAND ${GZIP_TOOL} -c ${MAN_BUILD_DIR}/dlt-passive-node-ctrl.1 > ${MAN_BUILD_DIR}/dlt-passive-node-ctrl.1.gz) + + # If user has not set the base dir for man pages, use a default location + set(MAN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/man) + + install(FILES + ${MAN_BUILD_DIR}/dlt.conf.5.gz + ${MAN_BUILD_DIR}/dlt-system.conf.5.gz + DESTINATION ${MAN_INSTALL_DIR}/man5 + ) + + install(FILES + ${MAN_BUILD_DIR}/dlt-convert.1.gz + ${MAN_BUILD_DIR}/dlt-sortbytimestamp.1.gz + ${MAN_BUILD_DIR}/dlt-daemon.1.gz + ${MAN_BUILD_DIR}/dlt-receive.1.gz + ${MAN_BUILD_DIR}/dlt-system.1.gz + ${MAN_BUILD_DIR}/dlt-logstorage-ctrl.1.gz + ${MAN_BUILD_DIR}/dlt-passive-node-ctrl.1.gz + DESTINATION ${MAN_INSTALL_DIR}/man1 + ) endif(WITH_MAN) diff --git a/doc/dlt_book.txt b/doc/dlt_book.txt index 009bc74..a1260d2 100644 --- a/doc/dlt_book.txt +++ b/doc/dlt_book.txt @@ -30,9 +30,7 @@ Information :leveloffset: 2 -include::../README[] - -include::../INSTALL[] +include::../README.md[] :leveloffset: 0 @@ -49,13 +47,13 @@ include::dlt_loglevel_explained.txt[] include::dlt_design_specification.txt[] -include::dlt_filetransfer.txt[] +include::dlt_filetransfer.md[] -include::dlt_extended_network_trace.txt[] +include::dlt_extended_network_trace.md[] -include::dlt_kpi.txt[] +include::dlt_kpi.md[] -include::dlt_cdh.txt[] +include::dlt_cdh.md[] :leveloffset: 0 @@ -64,20 +62,20 @@ Manpages :leveloffset: 2 -include::dlt-daemon.1.txt[] +include::dlt-daemon.1.md[] -include::dlt.conf.5.txt[] +include::dlt.conf.5.md[] -include::dlt-system.1.txt[] +include::dlt-system.1.md[] -include::dlt-system.conf.5.txt[] +include::dlt-system.conf.5.md[] -include::dlt-convert.1.txt[] +include::dlt-convert.1.md[] -include::dlt-sortbytimestamp.1.txt[] +include::dlt-sortbytimestamp.1.md[] -include::dlt-receive.1.txt[] +include::dlt-receive.1.md[] -include::dlt-logstorage-ctrl.1.txt[] +include::dlt-logstorage-ctrl.1.md[] :leveloffset: 0 diff --git a/doc/dlt_cdh.md b/doc/dlt_cdh.md index 20857cd..4433829 100644 --- a/doc/dlt_cdh.md +++ b/doc/dlt_cdh.md @@ -14,7 +14,7 @@ When a program crash occurs on the system the Core Dump Handler is triggered to Add -> -DWITH_DLT_COREDUMPHANDLER=ON -DTARGET_CPU_NAME={i686|x86_64} +`-DWITH_DLT_COREDUMPHANDLER=ON -DTARGET_CPU_NAME={i686|x86_64}` options to cmake. The core dump handler code currently supports the i686 and x86_64 architecture. @@ -22,7 +22,7 @@ options to cmake. The core dump handler code currently supports the i686 and x86 As *root* (not sudo) execute the following: -> echo "|/usr/local/bin/dlt-cdh %t %p %s %e" > /proc/sys/kernel/core_pattern +`echo "|/usr/local/bin/dlt-cdh %t %p %s %e" > /proc/sys/kernel/core_pattern` NOTE: replace */usr/local/bin* with the path dlt-cdh has been installed to. This instructs the kernel to pipe a core dump as standard input to dlt-cdh together with the following parameters: @@ -33,7 +33,7 @@ NOTE: replace */usr/local/bin* with the path dlt-cdh has been installed to. This See -> man core +`man core` for details @@ -41,25 +41,27 @@ for details In */usr/lib/sysctl.d/* the file *50-coredump.conf* has to be created which is done automatically by -> make install +`make install` Unfortunately - at least on Fedora systems - abrt has to be removed with -> yum remove abrtd* +`yum remove abrtd*` because it ruthlessly overwrites our change at every boot. The core dump handler can be activated then without reboot by running -> sysctl -p /usr/lib/sysctl.d/50-coredump.conf +`sysctl -p /usr/lib/sysctl.d/50-coredump.conf` ### Configuration of link:dlt_filetransfer.html[DLT Filetransfer] for usage with dlt-cdh Make sure the following is set in the "Filetransfer Manager" section of */etc/dlt-system.conf*: -> ... -> FiletransferEnable = 1 -> ... -> FiletransferDirectory = /var/core -> ... +``` +... +FiletransferEnable = 1 +... +FiletransferDirectory = /var/core +... +``` ### Generation of core dump diff --git a/doc/dlt_extended_network_trace.md b/doc/dlt_extended_network_trace.md index 24554c0..8bc7ea0 100644 --- a/doc/dlt_extended_network_trace.md +++ b/doc/dlt_extended_network_trace.md @@ -20,7 +20,7 @@ Finally after sending all the data segments, one more packet is sent to indicate Truncated message can be sent using the following function: -> int dlt_user_trace_network_truncated(DltContext *handle, DltNetworkTraceType nw_trace_type, uint16_t header_len, void *header, uint16_t payload_len, void *payload, int allow_truncate) +` int dlt_user_trace_network_truncated(DltContext *handle, DltNetworkTraceType nw_trace_type, uint16_t header_len, void *header, uint16_t payload_len, void *payload, int allow_truncate) ` This will send a packet in the following format: @@ -35,17 +35,17 @@ payload | The truncated nw_trace payload | RAW User can send a segmented network trace message asynchronously using: -> void dlt_user_trace_network_segmented(DltContext *handle, DltNetworkTraceType nw_trace_type, uint16_t header_len, void *header, uint16_t payload_len, void *payload) +` void dlt_user_trace_network_segmented(DltContext *handle, DltNetworkTraceType nw_trace_type, uint16_t header_len, void *header, uint16_t payload_len, void *payload) ` This will start a background thread and return immediately. User can also send all the required packages one by one using: -> int dlt_user_trace_network_segmented_start(unsigned int *id, DltContext *handle, DltNetworkTraceType nw_trace_type, uint16_t header_len, void *header, uint16_t payload_len) -> -> int dlt_user_trace_network_segmented_segment(int id, DltContext *handle, DltNetworkTraceType nw_trace_type, int sequence, uint16_t payload_len, void *payload) -> -> int dlt_user_trace_network_segmented_end(int id, DltContext *handle, DltNetworkTraceType nw_trace_type) +` int dlt_user_trace_network_segmented_start(unsigned int *id, DltContext *handle, DltNetworkTraceType nw_trace_type, uint16_t header_len, void *header, uint16_t payload_len) ` + +` int dlt_user_trace_network_segmented_segment(int id, DltContext *handle, DltNetworkTraceType nw_trace_type, int sequence, uint16_t payload_len, void *payload) ` + +` int dlt_user_trace_network_segmented_end(int id, DltContext *handle, DltNetworkTraceType nw_trace_type) ` *NOTE*: It is not recommended to use these functions unless you really have to. diff --git a/doc/dlt_filetransfer.md b/doc/dlt_filetransfer.md index 2cf2ba3..c6c0e40 100644 --- a/doc/dlt_filetransfer.md +++ b/doc/dlt_filetransfer.md @@ -28,7 +28,7 @@ The file transfer is at least one single transaction. This transaction consist o Every filetransfer must begin with the header package using: -> int dlt_user_log_file_header(DltContext *fileContext,const char *filename) +` int dlt_user_log_file_header(DltContext *fileContext,const char *filename) ` Header Header Package Protocol: @@ -47,7 +47,7 @@ FLST | Package flag After the header package was sent, at least one or more data packages can be send using: -> int dlt_user_log_file_data(DltContext *fileContext,const char *filename,int packageToTransfer, int timeout) +` int dlt_user_log_file_data(DltContext *fileContext,const char *filename,int packageToTransfer, int timeout) ` Data Data Package Protocol: @@ -63,7 +63,7 @@ FLDA | Package flag After all data packages were sent, the end package must be sent to indicate that the filetransfer is over using: -> int dlt_user_log_file_end(DltContext *fileContext,const char *filename,int deleteFlag) +` int dlt_user_log_file_end(DltContext *fileContext,const char *filename,int deleteFlag) ` End Package Protocol: @@ -77,7 +77,7 @@ FLFI | Package flag The library offers the user the possibility to log informations about a file using the following method without transferring the file itself using: -> dlt_user_log_file_infoAbout(DltContext *fileContext, const char *filename) +` dlt_user_log_file_infoAbout(DltContext *fileContext, const char *filename) ` File Information Protocol: @@ -118,7 +118,7 @@ FLIF | Package flag If an error happens during file transfer, the library will execute the mehtod: -> void dlt_user_log_file_errorMessage(DltContext *fileContext, const char *filename, int errorCode) +` void dlt_user_log_file_errorMessage(DltContext *fileContext, const char *filename, int errorCode) ` File transfer error Protocol: @@ -214,7 +214,7 @@ Options: When you call "sudo make install", some automatic tests will be installed. Start the test using the following command from bash: -> dlt-test-filetransfer +` dlt-test-filetransfer ` It's important that the dlt-filetransfer example files are installed in /usr/share/dlt-filetransfer which will be done automatically by using "sudo make install". diff --git a/doc/dlt_for_developers.md b/doc/dlt_for_developers.md index b020357..e24f15f 100644 --- a/doc/dlt_for_developers.md +++ b/doc/dlt_for_developers.md @@ -404,7 +404,6 @@ DLT_PTR(PTR_VAR) | Architecture independent macro to print pointers ### DLT C++ Extension -Important note: By default, C++ Extension is disabled in ADIT platform. It can be enabled by setting the CMake option: *WITH_DLT_CXX11_EXT=ON*. The DLT C++ extension was added to DLT in version 2.13 . This approach solves the need to specify the type of each argument for applications written in C++ by using C++ templates and function overloading. The following shows the usage of this API extension: ``` diff --git a/doc/dlt_kpi.md b/doc/dlt_kpi.md index 10d684a..2531bb3 100644 --- a/doc/dlt_kpi.md +++ b/doc/dlt_kpi.md @@ -23,31 +23,31 @@ The following will explain the meaning to each three-character-identifier and ea The datasets in these messages have the following form: -> \[PID\];\[Parent PID\];\[Commandline\] +`[PID];[Parent PID];[Commandline]` Example message: -> NEW 21226;1;/usr/libexec/nm-dispatcher +`NEW 21226;1;/usr/libexec/nm-dispatcher` *STP*: This identifies a message that contains datasets describing processes that have ended since the last interval. The datasets in these messages have the following form: -\[PID\] +`[PID]` Example message: -> STP 20541 +`STP 20541` *ACT*: This identifies a message that contains datasets describing active processes. These are processes that have consumed CPU time since the last interval. The datasets in these messages have the following form: -> \[PID\];\[CPU time in milliseconds per second\];\[RSS bytes\];\[CTX-switches since last interval\];\[I/O bytes\];\[I/O wait time in milliseconds per second\] +`[PID];[CPU time in milliseconds per second];[RSS bytes];[CTX-switches since last interval];[I/O bytes];[I/O wait time in milliseconds per second]` Example message: -> ACT 20503;10;389;3;1886649;0 +`ACT 20503;10;389;3;1886649;0` NOTE: The *CPU time* value is the active time of a process in milliseconds, divided by the number of CPU cores. So this value should never get greater than 1000ms, which would mean 100% CPU usage. @@ -55,21 +55,21 @@ NOTE: The *CPU time* value is the active time of a process in milliseconds, divi The datasets in these messages have the following form: -> \[PID\];\[Commandline\] +`[PID];[Commandline]` Example message: -> CHK 660;/sbin/audispd +`CHK 660;/sbin/audispd` *IRQ*: This identifies a message that contains datasets describing the numbers of interrupts that occurred on each CPU. The datasets in these messages have the following form: -> \[IRQ name\];cpu\[CPU number\];\[Number of total interrupts\]; +`[IRQ name];cpu[CPU number];[Number of total interrupts];` Example message: -> IRQ 0;cpu0:133;cpu1:0; 1;cpu0:76827;cpu1:0; +`IRQ 0;cpu0:133;cpu1:0; 1;cpu0:76827;cpu1:0;` Synchronization messages: diff --git a/doc/dlt_user_manual.txt b/doc/dlt_user_manual.txt index 24c3a01..5cccfe9 100644 --- a/doc/dlt_user_manual.txt +++ b/doc/dlt_user_manual.txt @@ -258,9 +258,9 @@ DLT_DECLARE_CONTEXT(myContext); ---- int main(int argc, const char\* argv\[\]) { -DLT_REGISTER_APP("LOG","Test Application for Logging"); + DLT_REGISTER_APP("LOG","Test Application for Logging"); -DLT_REGISTER_CONTEXT(mycontext,"TEST","Test Context for Logging"); + DLT_REGISTER_CONTEXT(mycontext,"TEST","Test Context for Logging"); ... } -- cgit v1.2.1