You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2020/11/07 13:36:43 UTC

[GitHub] [mynewt-mcumgr] utzig commented on pull request #99: Implement shell management command handlers.

utzig commented on pull request #99:
URL: https://github.com/apache/mynewt-mcumgr/pull/99#issuecomment-723447248


   A bit of testing: 
   
   ```
   $ mcumgr --conn ttyACM0 shell exec "kernel uptime"
   status=0
   
   Uptime: 74320 ms
   $ newtmgr --conn ttyACM0 shell exec "kernel cycles"
   status=0
   
   cycles: 2692533 hw cycles
   $ mcumgr --conn ttyACM0 shell exec "kernel threads"
   Error: NMP timeout
   $ mcumgr --conn ttyACM0 shell exec "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
   Error: NMP timeout
   $ newtmgr --conn ttyACM0 shell exec "kernel xxx"    
   status=1
   
   kernel - Kernel commands
   Subcommands:
     cycles   :Kernel cycles.
     reboot   :Reboot.
     stacks   :List threads stack usage.
     threads  :List kernel threads.
     uptime   :Kernel uptime.
     version  :Kernel version.
   ```
   
   For future improvements, it would be better to not output `status=0` when commands have succeeded. Sending or receiving more than a few tens of characters completely hangs the shell, including the shell in a local serial emulator; whatever thread is hanging it's almost like a DoS attack, and this should be handled and fail cleanly.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org