ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Is there an alternative way to get rid of ros log files? [closed]

asked 2017-04-11 05:11:32 -0500

updated 2017-04-11 05:12:02 -0500

Getting the error

WARNING: disk usage in log directory [/home/an/.ros/log] is over 1GB. 
It's recommended that you use the 'rosclean' command.

Well i can rosclean purge and delete all everything or maybe delete using. Is there a way to delete the oldest entries and lighten my log files. It would not be ideal to clean the entire log file.

Also I wonder what happens if I let it accumulate and not clean? I am asking this question without much googling. So excuse me if there is already something clearly written. ROS insights are most welcome. Thanks

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by arunavanag
close date 2017-04-12 00:13:29.743358

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-04-11 08:06:46 -0500

mgruhler gravatar image

Also I wonder what happens if I let it accumulate and not clean?

Well, you run out of disk space, eventually...

You not googling is obvious, as your question directly relates to http://answers.ros.org/question/22996... :-)

About your question though:

Of course. However, this requires some manual scripting. IMO, there are two ways.

  1. Write a simple script that you start via cron. You can e.g. use the find tool with the -mtime property to get the last modified time of a file and delete via this.
  2. Use logrotate. However, as the log files typically get "stamped" with the RUN_ID, this will probably also need some fiddeling with the prerotate and postrotate scripts.
edit flag offensive delete link more

Comments

Thanks a lot @mig

arunavanag gravatar image arunavanag  ( 2017-04-11 20:06:59 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2017-04-11 05:11:32 -0500

Seen: 4,015 times

Last updated: Apr 11 '17