summaryrefslogtreecommitdiff
path: root/src/console
Commit message (Collapse)AuthorAgeFilesLines
* console :fix conversion warningsDinh Cong Toan(RBVH/ECM12)2021-01-069-48/+48
| | | | | | - Explicit type conversion from 'signed' to 'unsigned' Signed-off-by: Dinh Cong Toan(RBVH/ECM12) <Toan.DinhCong@vn.bosch.com>
* dlt-receive: flush stdout buffer by signalKHANH LUONG HONG DUY2021-01-061-1/+29
| | | | | | | | | | | When dlt-receive logs is redirecting to file then a terminating signal is sent to dlt-receive, it will stop without flushing all logs from stdout to file, due to the default size of stdout is 4096 byte. When dlt-receive receive the SIGTERM or SIGINT, it flushes stdout buffer to stdout before terminating. Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* dlt-convert: replace system() by dlt_execute_command()KHANH LUONG HONG DUY2021-01-061-13/+12
| | | | Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* dlt-control.c: return -1 on error (#259)Moritz Warning2020-12-081-12/+40
| | | Signed-off-by: Moritz Warning <moritzwarning@web.de>
* dlt-control.c: initialize dltdata via struct literal (#257)Moritz Warning2020-11-101-20/+10
| | | | | | this make the code easier to read and initializes all other variables with 0 Signed-off-by: Moritz Warning <moritzwarning@web.de>
* Implement DLTClient for UDP multicast (#240)João Sousa2020-08-311-3/+16
| | | | | | | | | * Add UDP multicast support on client side UDP multicast support is already present on server side. This patch add seemless support for UDP multicast on client side in dlt-receive. Signed-off-by: Joao Sousa <joao.sa.sousa@ctw.bmwgroup.com>
* network trace: Include necessary headersSaya Sugiura2020-07-061-2/+0
| | | | | | | | | | | Some components which links dlt seem to depend on following headers, which will be included by mqueue.h. - sys/types.h - fcntl.h So explicitly include them if mqueue interface is not supported in dlt_user.h. Also two headers are removed if dlt_used.h is included. Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Remove duplicate definition of DLT_CONVERT_TEXTBUFSIZEBui Nguyen Quoc Thanh2020-07-061-1/+0
| | | | Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
* fix some gcc9 compiler warningsFelix Herrmann2020-07-061-2/+2
| | | | | | | | | Many stringop-truncation and stringop-overflow warnings are still there (so many). https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8/ Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com> Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* Android: Enable Android buildFelix Herrmann2020-07-061-2/+10
| | | | | Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com> Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* Use ssize_t for bytes_writtenBui Nguyen Quoc Thanh2020-07-061-1/+1
| | | | Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>
* Fix dlt-sortbytimestampBui Nguyen Quoc Thanh2020-07-061-4/+34
| | | | | | | | In case there is only one cycle of boot, perform sort by timestamp and write all messages out. Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>
* rename definition PACKED to DLT_PACKEDFelix Herrmann2020-07-061-1/+1
| | | | | Signed-off-by: Felix Herrmann <external.Felix.Herrmann3@de.bosch.com> Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
* sys/poll.h: deprecate old sys/poll.h include header, now glibc/musl wants ↵Gianfranco Costamagna2020-01-271-1/+1
| | | | | | | | | poll.h being included directly. This fixes a build failure on musl systems with strict c hardening flags Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org>
* console: fix memleak of dlt-logstorage-listPhong Tran2019-12-111-0/+2
| | | | | | report by coverity with Resource leak (RESOURCE_LEAK) Signed-off-by: Phong Tran <tranmanphong@gmail.com>
* cmake improvement for Logstorage consoleSaya Sugiura2019-09-131-15/+18
|
* console: Add get sw version control msgVo Trung Chi2019-09-131-81/+210
| | | | | | | | dlt-control command is extended to send get software version control message. e.g: dlt-control -k localhost Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
* console: Tool to merge multiple DLT filesBui Nguyen Quoc Thanh2019-09-132-44/+279
| | | | | | | | | | | | | | - Sort in dlt-sortbytimestamp: first sorted by time, second sorted by timestamp. - Support multiple compressed files in dlt-convert. These changes is based on use case: User can expects to join several dlt files which are compressed in tar.gz file (maybe per component). Moreover, currently the existing sort is only applicaple for single boot cycle. There should be a support for sorting multiple cyclic boots in one dlt file. Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>
* Correct sa findingsSaya Sugiura2019-07-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dlt_offline_logstorage.c - Parameter to isdigit is not correct - Handle the size of memset() and strncpy() properly dlt-test-stress-user.c - Parameter d is duplicated dlt_env_ll.c - Parameter env is used before NULL check - Remove redundant line dlt-control-common.c dlt_daemon_event_handler.c - Do not use NULL variable to print log dlt_config_file_parser.c - Remove unnecessary loop dlt_daemon_client.c - Return error in NULL check dlt_user.c - Free allocated memory in error case Related commit: 5c8f88d logstorage: fix compile error Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* logstorage: fix compile errorjiripopek2019-07-221-1/+1
| | | | | | Mount path unitialized and it is always NULL inside the statement. Signed-off-by: jiripopek <Jiri.Popek@bmw.de>
* doxygen: Align variable for apid and ctidSaya Sugiura2019-07-191-7/+7
| | | | | | | The variables used for application id and context id are aligned with "apid" and "ctid". Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* doxygen: Remove licenceSaya Sugiura2019-07-1918-36/+0
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* doxygen: Get rid of warningsSaya Sugiura2019-07-197-14/+16
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* cmake: Allow build as a subproject (#145)Vo Trung Chi2019-07-091-1/+1
| | | | | | Use PROJECT_* instead of CMAKE_* to allow build as a subproject of another cmake project. Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
* cmake-improvements (#135)Vo Trung Chi2019-07-031-27/+21
| | | | | | | | | | | | | | | 1. Allow building as a subproject of another cmake project (CMAKE_* vs PROJECT_* variables) 2. Do not generate header files within source – bad practice, use build directory for that(e.g. change location where dlt_version.h is being generated) 3. Use add_compile_options() instead of *_C/CXX_FLAGS variables for proper compile environment definition, also bad practice, also see p.2 4. Add WITH_DLT_PKGCONFIG – add generate pkgconfig .pc files as switchable option, should probably be part of headers install routine. Signed-off-by: Radoslaw Kaczorowski <external.radoslaw.kaczorowski@bosch-softtec.com>
* fix warning of self assignPhong Tran2019-06-242-3/+3
| | | | | | | | | | use (void)xyz instead of self assign error log: error: explicitly assigning value of variable of type 'void *' to itself [-Werror,-Wself-assign] Signed-off-by: Phong Tran <tranmanphong@gmail.com>
* dlt-convert: fix warning of wrong conversionPhong Tran2019-06-241-1/+4
| | | | | | | | | | | change to use usleep dlt-daemon/src/console/dlt-convert.c:346:35: warning: implicit conversion from 'double' to 'unsigned int' changes value from 0.1 to 0 [-Wliteral-conversion] sleep(0.1); Signed-off-by: Phong Tran <tranmanphong@gmail.com>
* cleanup: Use dlt_vlog()Saya Sugiura2019-06-191-17/+8
| | | | | | | There were a couple of places which used snprintf-dlt_log. It is now replaced with dlt_vlog(). Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Fix alerts from lgtmSaya Sugiura2019-06-192-8/+9
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Fix compiler warningsSimon Herkenhoff2019-05-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix compiler warnings about socket usage Correct the data types used for the socket declaration. We use AF_UNIX sockets so we use struct sockaddr_un, but we need to cast to struct sockaddr for the socket API. Fix compiler warnings about sign-compare Fix two occurences of signed - unsigned comparison by casting the values accordingly. Note that the cast is legal as the first parts of both conditional statements make sure the value is not negative before casting to unsigned. While at it, add strtol error checking. Fix compiler warnings about string functions Add string.h to src/daemon/dlt_daemon_unix_socket.c, because it was unaware of memcpy and strerror. While at it, change unsafe use of sprintf to proper dlt_vlog and remove the char buffer. Fix compiler warnings about unused-* Fix two unused-variable and one unused-parameter warning. While at it, change the #ifdef to not run into an empty block. Simply reverse the condition and enclose the complete else with the #ifdef. POSIX: Use memset instead of bzero "The bzero() function is deprecated (marked as LEGACY in POSIX.1-2001); use memset(3) in new programs." Use memset instead of bzero and remove any occurrence from DLT. Include of header "strings.h" that has bzero is also removed. Signed-off-by: Simon Herkenhoff <sherkenhoff@jp.adit-jv.com> Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com> Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* POSIX: Replace usleep with nanosleepSaya Sugiura2019-05-063-2/+11
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Make dlt-convert more responsive when watching a fileAigars Mahinovs2019-02-021-1/+1
|
* Code beautification using uncrustifyChristoph Lipka2018-12-2111-1299/+928
| | | | Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
* Use poll in the dlt-daemon for POSIX complianceManikandanC2018-11-304-104/+132
| | | | | | | | | | | The poll system call is now used in the daemon to enable DLT use in POSIX compliant systems. Also added introduced new unregister_app macro to avoid missing of logs in startup buffer. Signed-off-by: Frederic Berat <fberat@de.adit-jv.com> Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com> Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com> Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
* dlt-client: logging: Extended the receiver buffer sizeManikandan C2018-11-233-16/+16
| | | | | | | | | | | - dlt-control couldn't receive all the GET_LOG_INFO response message when many applications and contexts are registered. Therefore the receiver buffer size was extended to 65K. Also the receive buffer size macros are reduced to one variable. - Code cleanup and improvements Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* dlt-control: update get log infoSaya Sugiura2018-11-231-8/+17
| | | | | | | - Context printing in dlt_process_get_log_info function updated - Parameter in dlt_set_loginfo_parse_service_id function fixed Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Gateway ImprovementsManikandan C2018-11-233-364/+61
| | | | | | | | | | | | | -Support to send and parse periodic control messages -add application/contexts to passive ECU list -Refactor dlt_gateway_send_control_message -Gateway issues with corrupted data and on demand connection -Unit Test update Signed-off-by: Saya Sugiura ssugiura@jp.adit-jv.com Signed-off-by: Christoph Lipka clipka@jp.adit-jv.com Signed-off-by: S. Hameed shameed@jp.adit-jv.com Signed-off-by: ManikandanC Manikandan.Chockalingam@in.bosch.com
* Log storage - Updates (#82)ManikandanChockalingam2018-11-152-2/+48
| | | | | | | | | | - improvements and refactor key creation - Sync strategies added Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com> Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com> Signed-off-by: S. Hameed <shameed@jp.adit-jv.com> Signed-off-by: Ravi Sankar P <ponnurangamravi.sankar@in.bosch.com> Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Add dlt-sortbytimestamp utility plus documentation (#73)eBardieCT2018-09-252-1/+424
| | | | | | | | | | | | | | | * Add dlt-sortbytimestamp utility plus documentation Add a commandline utility to sort a DLT file by timestamp. By default a DLT file's messages are in the order they were received by the logger. This is not ideal for tracing problems on systems with multi-threaded programmes running on multi-core CPUs since message reception order will not always (or even often) correspond to message creation order. The documentation deals with how to handle the problem case of DLT files containing messages from multiple boot cycles.
* Fix gcc 8 build (#74)Jesus Sanchez-Palencia2018-09-252-2/+2
| | | | | | | | | | | | * dlt-control-common: Fix build with GCC 8: When the "stringop-truncation" warning is treated as an error, the build fails with the following message: * dlt-control-common.c:213:29: error: ‘strncpy’ output may be truncated copying 255 bytes from a string of length 1023 [-Werror=stringop-truncation] On this file we want to truncate the string due to the destination buffer size, so fix the above by using memcpy() instead. * dlt-logstorage-common: Fix build with GCC 8: When the "stringop-truncation" warning is treated as an error, the build fails with the following message: * dlt-logstorage-common.c:313:5: error: ‘strncpy’ specified bound 1024 equals destination size [-Werror=stringop-truncation] In order to avoid truncating and leaving the '\0' byte out, reduce the bound by 1 byte. * systemd/3rdparty: Fix sd-daemon build with GCC 8: When the "stringop-truncation" warning is treated as an error, the build fails with the following message: * sd-daemon.c:453:9: error: ‘strncpy’ specified bound 108 equals destination size. In order to avoid truncating and leaving the '\0' byte out, reduce the bound by 1 byte. Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
* Introduce controlling entire system trace status feature from dlt-control (#57)Yusuke Sato2018-05-181-18/+50
| | | | | | | | | | | | | | | | | | | | | * dlt-control: Provision to control entire system trace status 1. support for setting trace status using wildcards for both app and context 2. support for setting entire system trace status *This Logic is as same as for changing log level. (SHA: a966393ad7003d02870bceffa08df5ddf4bbf864 dlt-control: Provision to control entire system log level) * dlt-daemon: Fix control entire log level / trace status issue In previous, dlt-control could send request to set all log level / trace status with DLT_LOG_DEFAULT / DLT_TRACE_STATUS_DEFAULT(-1). However, dlt-daemon could not accept these value. This change fix this issue so that setting log level/trace status of all registered contexts become possible. Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
* dlt-control: Fix Setting default trace status issue (#53)Yusuke Sato2018-05-081-3/+3
| | | | | Default trace status could not be set by "-f" option. Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
* dlt-client: fix dlt_client_cleanup memory handlingOnkar Palkar2017-02-063-8/+26
| | | | | | | Setter function introduced for seting up string parameters which are free'd in dlt_client_cleanup Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Dlt-Receive: Use PRIxxx macros for printf variablesChristoph Lipka2016-10-241-2/+3
| | | | | | This change is done to remove compiler warnings. Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Offine logstorage: Remove duplicated source fileChristoph Lipka2016-10-241-467/+0
| | | | Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* CommonControl: Fix for commands not working with unix socketS. Hameed2016-04-283-25/+44
| | | | | | | | This commit resloves a bug introduced from the commit: CommonControl: Unix socket path and ecuid parsing for control applications Signed-off-by: S. Hameed <shameed@jp.adit-jv.com> Change-Id: Ifd4af24cab3ef41fda86fdf63a559438b51eca6e
* CommonControl: Unix socket path and ecuid parsing for control applicationsManikandan C2016-04-286-17/+117
| | | | | | Signed-off-by: Manikandan C <Manikandan.Chockalingam@in.bosch.com> Change-Id: I023c6bccbe3977d50b77bb601df80643d8e2d82c
* dlt-control: Provision to control entire system log levelManikandan C2016-04-281-36/+99
| | | | | | | | 1. support for setting log level using wildcards for both app and context 2. support for setting entire system log level Signed-off-by: Manikandan C <Manikandan.Chockalingam@in.bosch.com> Change-Id: I92f8c5461903f092cd50f05f644013432940a87b
* Offline logstorage: On Demand triggering for syncing Logstorage cache and ↵Christoph Lipka2016-04-253-22/+71
| | | | | | | | support long options Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com> Change-Id: I2bac5e48a5d210b544a96fe96dc322f28ac472fe
* Reverted previous logstorage fixLutz Helwing2016-01-291-2/+2
| | | | | Change-Id: I58a5a89de2ab6a2ab91aad919144307f49f046af Signed-off-by: Lutz Helwing <lutz_helwing@mentor.com>