start-jsk / rtmros_hironx

hironx controller and applications using rtmros packages
http://wiki.ros.org/rtmros_hironx
10 stars 27 forks source link

Fix log fetch tool for QNX #508

Closed 130s closed 7 years ago

130s commented 7 years ago

There's already a tool to fetch log files from QNX (added in https://github.com/start-jsk/rtmros_hironx/pull/354) but I found it not functioning as I tested locally with QNX on vm. The changes in this PR gets the script work again.

This will also address #355. This will also address https://github.com/start-jsk/hironx-package/issues/83.

130s commented 7 years ago

Usecase:

# Simplest
$ rosrun hironx_ros_bridge qnx_fetch_log.sh nextage qnx_nxo_user
:
$ ls
opt_jsk_var_logs_20170602-020236.zip

# Fetch only files generated after certain date. "1" can be anything except "archive"
$ rosrun hironx_ros_bridge qnx_fetch_log.sh nextage qnx_nxo_user 1 2017-01-11

# Remove all raw .log files to free disk space. Same .zip file will be kept in the log folder.
$ rosrun hironx_ros_bridge qnx_fetch_log.sh nextage qnx_nxo_user archive

Help:

$ rosrun hironx_ros_bridge qnx_fetch_log.sh
usage:  [hostname (default:nextage)]
        [ossuser_qnx (default:tork)]
        [do_archive (default:1): If a string 'archive' is passed, remove all raw log files to save the disk space (date specified in 'date_after' will be ignored). Existing zip archives will not be deleted.]
        [date_after (default:none. Format: yyyy-mm-dd or mmddyyyy): Do not operate on files modified prior to the specified date.]
          [-h|--help] Print help message.
130s commented 7 years ago

Wrote about this feature on a tutorial.