我使用 ( sudo picocom -b 115200 /dev/ttyUSB0) 连接到基于 ThreadX 系统的实时嵌入式系统。
连接到此设备后,我会使用一些 ThreadX 命令来显示一些日志。
目前我正在使用手动复制过去的操作来保存日志。有没有其他方法可以将终端上显示的所有输出(日志)保存到我计算机上的文件中?
小智 7
picocom 有日志记录功能-g。你可以这样使用它;
picocom -b 115200 /dev/ttyUSB0 -g my_picocom_logfile.txt
来自联机帮助页;
--logfile | -g
Use specified file for logging (recording) serial input, and possibly serial output. If the file exists, it is appended to. Every
character read from the serial port is written to the specified file (before input mapping is performed). If local-echo mode is is enabled
(see --echo option and C-c command), then every character written to the serial port (after output mapping is performed) is also logged to
the same file. (Default: no logging)
Run Code Online (Sandbox Code Playgroud)
您可以在下运行它script- 查看man script并执行:
script my.log
sudo picocom -b 115200 /dev/ttyUSB0
...
exit
Run Code Online (Sandbox Code Playgroud)
所有的输入和输出都将在my.log.
| 归档时间: |
|
| 查看次数: |
8354 次 |
| 最近记录: |