{"id":1513,"date":"2024-08-02T06:55:58","date_gmt":"2024-08-02T06:55:58","guid":{"rendered":"http:\/\/www.recologypower.com:9080\/?p=1513"},"modified":"2024-08-02T06:55:58","modified_gmt":"2024-08-02T06:55:58","slug":"%e3%80%90lx2160%e3%80%91how-to-dynamically-adjust-mc-log-level-using-restool","status":"publish","type":"post","link":"http:\/\/www.recologypower.com:9080\/?p=1513","title":{"rendered":"\u3010lx2160\u3011How to dynamically adjust MC log level using restool"},"content":{"rendered":"\n<p><strong>Prerequisites:<\/strong>&nbsp;The board should be running Linux and connected to terminal console.<\/p>\n\n\n\n<p><strong>Note:<\/strong>&nbsp;For log level debug support, the restool version should be LSDK-2003-RC1 or above and MC version should be 10.20.0 or above.<\/p>\n\n\n\n<p>To check restool version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ root@localhost:~# restool -v\r\nrestool LSDK-20.04<\/code><\/pre>\n\n\n\n<p>To check MC version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>root@localhost:~# restool -m\r\nMC firmware version: 10.24.0<\/code><\/pre>\n\n\n\n<p>For debugging, use\u00a0the\u00a0ls-debug\u00a0script available in the LSDK rootfs. There is no need to create the debug object.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls-debug -h <\/code><\/pre>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>-h, &#8211;help<\/td><td>ls-debug&nbsp;help information<\/td><\/tr><tr><td>-ts, &#8211;timestamp=X<\/td><td>Enable\/Disable timestamp printing, X is ON or OFF<\/td><\/tr><tr><td>-c, &#8211;console=X<\/td><td>Enable\/Disable printing in UART console, X is ON or OFF<\/td><\/tr><tr><td>-l, &#8211;log=X<\/td><td>Enable\/Disable printing in DDR log, X is ON or OF<\/td><\/tr><tr><td>-u, &#8211;uart=X<\/td><td>Set UART ID of the console, X = [0 &#8211; 4], 0 = OFF<\/td><\/tr><tr><td>-ll, &#8211;level=X<\/td><td>Set logging level, X = [0 &#8211; 5]0: Global1: Debug2: Info3: Warning4: Error5: Critical<\/td><\/tr><tr><td>-m, mem, &#8211;memory<\/td><td>Dump information about memory modules available<\/td><\/tr><tr><td>dpxy.z<\/td><td>Dump information about MC respective object<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>For example, to enable logging in console with log level INFO:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ ls-debug --log=on --console=on --level=2              \r\ndpdbg.0 created\r\nDDR log printing ON\r\nUART console printing ON\r\nLog level set to 2\r\n$ root@localhost:~# ls-debug --memory\r\nMemory dumped information available in MC log\/console\r\n$ root@localhost:~# cat `find \/dev\/ -name \"*mc_console\"`\r\n&#91;I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dpdbg_open on DPDBG\r\n&#91;I, RESMAN]  Handling command: dpdbg_dump on DPDBG\r\n&#91;I, DPNI]  Memory info:\r\n&#91;I, DPNI]  MC DDR #1 cacheable memory\r\n&#91;I, DPNI]        Total: 134217728 bytes\r\n&#91;I, DPNI]        Used: 14802708 bytes\r\n&#91;I, DPNI]        Free: 119415020 bytes\r\n&#91;I, DPNI]  MC DDR #1 non-cacheable memory\r\n&#91;I, DPNI]        Total: 50331648 bytes\r\n&#91;I, DPNI]        Used: 27680 bytes\r\n&#91;I, DPNI]        Free: 50303968 bytes\r\n&#91;I, DPNI]  DMEM1 memory\r\n&#91;I, DPNI]        Total: 81920 bytes\r\n&#91;I, DPNI]        Used: 27168 bytes\r\n&#91;I, DPNI]        Free: 54752 bytes\r\n&#91;I, DPNI]  DMEM2 memory\r\n&#91;I, DPNI]        Total: 81920 bytes\r\n&#91;I, DPNI]        Used: 27168 bytes\r\n&#91;I, DPNI]        Free: 54752 bytes\r\n&#91;I, DPNI]  DDR #1 memory\r\n&#91;I, DPNI]        Total: 1610612736 bytes\r\n&#91;I, DPNI]        Used: 143163392 bytes\r\n&#91;I, DPNI]        Free: 1467449344 bytes\r\n&#91;I, DPNI]  PEB memory\r\n&#91;I, DPNI]        Total: 2097152 bytes\r\n&#91;I, DPNI]        Used: 524288 bytes\r\n&#91;I, DPNI]        Free: 1572864 bytes\r\n&#91;I, DPNI]  DP-DDR memory\r\n&#91;I, DPNI]        Total: 4294967296 bytes\r\n&#91;I, DPNI]        Used: 0 bytes\r\n&#91;I, DPNI]        Free: 4294967296 bytes\r\n&#91;I, RESMAN]  Handling command: dpdbg_close on DPDBG\r\n&#91;I, RESMAN]  Handling command: dprc_close for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dprc_set_irq_mask for DPRC 1 on portal id 0\r\n&#91;I, RESMAN]  Handling command: dprc_set_irq_enable for DPRC 1 on portal id 0\r\nroot@localhost:~#<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<div class=\"slide-text-bg2\">\n<h3>Prerequisites:&nbsp;<\/h3>\n<\/div>\n<div class=\"flex-btn-div\"><a href=\"http:\/\/www.recologypower.com:9080\/?p=1513\" class=\"btn1 flex-btn\">\u9605\u8bfb\u66f4\u591a<\/a><\/div>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[102],"tags":[],"_links":{"self":[{"href":"http:\/\/www.recologypower.com:9080\/index.php?rest_route=\/wp\/v2\/posts\/1513"}],"collection":[{"href":"http:\/\/www.recologypower.com:9080\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.recologypower.com:9080\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.recologypower.com:9080\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.recologypower.com:9080\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1513"}],"version-history":[{"count":1,"href":"http:\/\/www.recologypower.com:9080\/index.php?rest_route=\/wp\/v2\/posts\/1513\/revisions"}],"predecessor-version":[{"id":1514,"href":"http:\/\/www.recologypower.com:9080\/index.php?rest_route=\/wp\/v2\/posts\/1513\/revisions\/1514"}],"wp:attachment":[{"href":"http:\/\/www.recologypower.com:9080\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1513"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.recologypower.com:9080\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1513"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.recologypower.com:9080\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}