Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 23-01-2014, 06:45   #1
Registered User

Join Date: Jan 2014
Posts: 13
Old Log will be moved to opencpn.log.log

What is the best way to stop getting the pop up "Old log will be moved to opencpn.log.log" window?

We run OpenCPN 3.3.604 and just use the target list for our AIS view on a screen.

We run this on a CenOS 6.4 platform and should just be able to change the .bash_profile to stop this from appearing but it's not working.

Thought I would give this forum a try and see if there is a way to stop the logfile from filling up all together.
PHD1026 is offline   Reply With Quote
Old 23-01-2014, 07:04   #2
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,150
Re: Old Log will be moved to opencpn.log.log

PHD1026...
The log file handling is protecting it from being to big because it normaly grows a little every day. But if OCPN makes a copy very often there is something abnormal going on. The best way is to check in the log file what's causing the frequent printing and do something about it. If you can't solve it yourself it use to help posting the log here using the "Manage attachments" further down.
(But due to forum limitations a full log upload will usually not be admitted. So a tips is to add the .pdf extension to the file name before upload. Like this: opencpnc.log.pdf)
Hakan is online now   Reply With Quote
Old 23-01-2014, 07:20   #3
Registered User

Join Date: Jan 2014
Posts: 13
Re: Old Log will be moved to opencpn.log.log

Thank you and I will post it the way you said. Is there a way to disable the log? We record the screen to a DVR system so we don't need the log. I'm sure it logs every AIS target change and that is why it is getting larger.
PHD1026 is offline   Reply With Quote
Old 23-01-2014, 07:25   #4
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,150
Re: Old Log will be moved to opencpn.log.log

I'm not sure what you mean with "AIS Target change" but that not sounds like anything that normally goes to the log. For the moment I show some 400 AIS targets on the screen and nothing is printed to the log??
Apart from program initiating and closure events it's normally only a hourly one row log printed.
Hakan is online now   Reply With Quote
Old 23-01-2014, 07:28   #5
Registered User

Join Date: Jan 2014
Posts: 13
Re: Old Log will be moved to opencpn.log.log

I wasn't sure if the log logs every change in targets that are shown thru the AIS system.
PHD1026 is offline   Reply With Quote
Old 23-01-2014, 07:30   #6
Registered User

Join Date: Jan 2014
Posts: 13
Re: Old Log will be moved to opencpn.log.log

I would be happy to post the log file but I dont see where I can manage attachments. Forgive me for I am a newbie at this.
PHD1026 is offline   Reply With Quote
Old 23-01-2014, 07:33   #7
Registered User

Join Date: Jan 2014
Posts: 13
Re: Old Log will be moved to opencpn.log.log

I found it. However even with changing the extension it is still too large. I'll upload it and post a link.
PHD1026 is offline   Reply With Quote
Old 23-01-2014, 07:40   #8
Registered User

Join Date: Jan 2014
Posts: 13
Re: Old Log will be moved to opencpn.log.log

Here is the link:
Untitled Document

Right click link and save link as.

Thanks again for any help you can provide.
PHD1026 is offline   Reply With Quote
Old 23-01-2014, 08:34   #9
Registered User

Join Date: Feb 2010
Posts: 619
Re: Old Log will be moved to opencpn.log.log

As Hakan said, if the log is growing too fast, there must be something abnormal going on, and it is worth a look.

When full time cruising in 2012, I had to hit "OK" for the log.log message on my PC just 6 times (I always try to keep all history), so once about every 2 months. We had 2 or 3 laptops on board, so let's assume it was once a month on some of these ... I would think this is acceptable. The log definitely does not include data about AIS targets.

The log is most easily viewed by clicking the blue question mark "Help" icon, then "Copy log to clipboard", then start some editor and "Paste". I have a shortcut link on the desktop to opencpn.log file directly, so it opens in Notepad immediately ...

Of course, it is possible and easy to implement an option to handle the logging in silent way, e.g. alternating between two files. It would not be wise to let it grow uncontrollably, or drop logging altogether... A Feature Request?
PjotrC is offline   Reply With Quote
Old 23-01-2014, 08:51   #10
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: Old Log will be moved to opencpn.log.log

Quote:
Originally Posted by PHD1026 View Post
What is the best way to stop getting the pop up "Old log will be moved to opencpn.log.log" window?

We run OpenCPN 3.3.604 and just use the target list for our AIS view on a screen.

We run this on a CenOS 6.4 platform and should just be able to change the .bash_profile to stop this from appearing but it's not working.

Thought I would give this forum a try and see if there is a way to stop the logfile from filling up all together.
If you don't care at all about past history in the log file, its fairly easy to fix i Linux.

Just ad a line like this
Code:
rm $HOME/opencpn.log
in the file /etc/rc.local, or it may be /etc/rc.d/rc.local in CentOS.

The log file will be deleted each time you start the computer. OpenCPN will then promptly recreate it.

You may still get the popup if the log file fills up quickly. But then something is really wrong, and action is needed.

Thomas
cagney is offline   Reply With Quote
Old 23-01-2014, 12:57   #11
Registered User

Join Date: Jan 2014
Posts: 13
Re: Old Log will be moved to opencpn.log.log

This will work great for this installation. I'll give it a try.

What would be the code to make the computer reboot automatically every 24 hours?
PHD1026 is offline   Reply With Quote
Old 23-01-2014, 13:21   #12
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,211
Re: Old Log will be moved to opencpn.log.log

Code:
#!/bin/sh
reboot -n
placed in /etc/cron.daily
Just out of curiosity, could you please have a look into the log and tell us what's filling it?

Pavel
nohal is offline   Reply With Quote
Old 23-01-2014, 13:33   #13
Registered User

Join Date: Feb 2010
Posts: 619
Re: Old Log will be moved to opencpn.log.log

Quote:
Originally Posted by PHD1026 View Post
What would be the code to make the computer reboot automatically every 24 hours?
Depends on the kind of sailing one does, but most automation sounds dangerous in general. Imagine you are approaching the breakwater or entering a narrow channel at midnight (not unusual). The last thing one needs then is a maintenance script starting... unless the setup is only a toy.
PjotrC is offline   Reply With Quote
Old 23-01-2014, 13:35   #14
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: Old Log will be moved to opencpn.log.log

The opportunities in Linux are endless.......

There is no need to reboot for a simple thing like this.
Just make an executable file containing

Quote:
#!/bin/bash

/usr/bin/opencpn &
sleep 10
rm $HOME/opencpn.log
and make sure you start OpenCPN through this script.

OpenCPN runs just fine without a logfile. No warnings etc, and if something goes wrong, you will have no idea what happened.
Of course you could always start O the conventional way, in case of trouble.

Alternatively ... start OpenCPN as usual, and just delete opencpn.log manually. Same result.

Thomas
cagney is offline   Reply With Quote
Old 23-01-2014, 14:12   #15
Registered User

Join Date: Jan 2014
Posts: 13
Re: Old Log will be moved to opencpn.log.log

We put OpenCPN on a computer that no one looks at. We only use it for recording AIS target lists.

Anytime it boots it starts up automatically using the following .bash_profile:

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

# runtest.sh &

cp opencpn.conf .opencpn/ &

opencpn -TL &

Works great except for the log filling up every 2 weeks or so. But as I said no one is there to see it since we just record the VGA output to a file.

So another engineer said to try this:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
# runtest.sh &
mv -f opencpn.log opencpn.log.log
cp opencpn.conf .opencpn/ &
opencpn -TL &

However the program no longer auto loads on boot up.

Yes I am a newbie but looking for any help.
PHD1026 is offline   Reply With Quote
Reply

Tags
enc, opencpn


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Advertise Here


All times are GMT -7. The time now is 00:13.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.