Resolved How to clear broker and server logs?

Hello,

I have massive log files from the server and broker:
-rw-rw-rw- 1 root root 16255854027 Feb 7 13:05 AccordLive.server.log
-rw-rw-rw- 1 root root 5478113445 Feb 7 13:05 AccordLive.broker.log

Is it safe and possible to clear them using for example "cp /dev/null <file>" ?

I am about to have a change in the config file dlc/properties/ubroker.properties, but before that goes in I'd like to clear the logs.

Thanks
Richard
 

cj_brandt

Active Member
Depending on your version of OE and the parameter "allowruntimeupdates" in the ubroker.properties file, you might be able to lower the logging level online.

I don't recall if cat /dev/null > log will actually release the space without having to stop the app server.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
You should look at setting the number of logs and the log size threshold (I'm away from the office and can't remember the ubroker parameter names offhand). This will allow you to rotate through a number of log files of fixed maximum size. Thus you can archive or delete the older files online as they are no longer being written to.

With multi-GB files, either they are *very* old, or the logging is very verbose, or they contain a *lot* of errors. I'm generally inclined to suspect the latter. I'd grep those files with a regex for Progress errors, e.g. " \([0-9]*\).$".
 
You should look at setting the number of logs and the log size threshold (I'm away from the office and can't remember the ubroker parameter names offhand). This will allow you to rotate through a number of log files of fixed maximum size. Thus you can archive or delete the older files online as they are no longer being written to.

With multi-GB files, either they are *very* old, or the logging is very verbose, or they contain a *lot* of errors. I'm generally inclined to suspect the latter. I'd grep those files with a regex for Progress errors, e.g. " \([0-9]*\).$".

Someone from my vendor already prepared the changes:

Changes within [UBroker.AS.AccordLive] section: -

Code:
    brkrLogThreshold=100000    changed to    1024000
    brkrNumLogFiles=10     changed to    2

New lines within [UBroker.AS.AccordLive] section: -

Code:
    srvrNumLogFiles=2
    srvrLogThreshold=1024000

I guess I will have to stop/start the services before these changes take effect. It seems cj_brandt answered my question.

Thank you all.
Richard
 

TomBascom

Curmudgeon
Not exactly your question but for the db you can use "prolog" to truncate the .lg:

I usually do something like:
Code:
cp dbname.lg dbname.lg.YYYY.MM.DD
prolog dbname -online
in a cron job once a week or so.
 
Are we talking about the same thing?
prolog to clear database log? I wanted to clear the server logs, not database log that is part of the database.

Sorry, I am a bit confused.
Richard
 
Top