Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix log fetch tool for QNX #508

Merged
merged 4 commits into from
Jun 2, 2017
Merged

Conversation

130s
Copy link
Contributor

@130s 130s commented Jun 1, 2017

There's already a tool to fetch log files from QNX (added in #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 added 3 commits June 1, 2017 01:32
… host.

Also let the help message show only when no arg was passed.
Add friendly notice for the script's credibility.
[ros_bridge][QNX log fetch] Default hostname set as nextage. That is the most common hostname.
…fic dates expr.

Ideally "date-after x" feature would have been useful, but looks like for tar command on QNX 6.5.0, none of date specifier option does not work, and implementing custom date query is a bit cumbersome now.
[ros_bridge][QNX log fetch] With 'archive' option, remove *.log files to save disk space.

[ros_bridge][QNX log fetch] Save the archived logs file to the same dir where raw log files are (/opt/jsk/var/log).
This way it'll be easier in the future to look for the older log file archives once their raw log files are removed.

[ros_bridge][QNX log fetch] Archive feature now can specify the period, instead of text matching.
@130s
Copy link
Contributor Author

130s commented Jun 2, 2017

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 130s changed the title Fix log fetch tool for QNX Fix log fetch tool for QNX (also fix #355) Jun 2, 2017
@130s 130s changed the title Fix log fetch tool for QNX (also fix #355) Fix log fetch tool for QNX Jun 2, 2017
@130s 130s merged commit 887547e into start-jsk:indigo-devel Jun 2, 2017
@130s 130s deleted the add/qnx_log_fetch branch June 2, 2017 16:54
@130s
Copy link
Contributor Author

130s commented Jun 2, 2017

Wrote about this feature on a tutorial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant