Solved

Change beasvc.exe default stdout log rotation parameters on BEA Weblogic Server 10.0

Posted on 2008-06-12
15
1,804 Views
Last Modified: 2013-12-10
I'm trying to change default log rotation parameters for weblogic server service as suggested here:
http://edocs.bea.com/wls/docs100/server_start/winservice.html#wp1193277

my installsvc.cmd contains:
....
set ROTATION_TYPE = TIME
set TIME_START_DATE = Jun 12 2008 15:07:00
set TIME_INTERVAL_MINS = 3
set STD_LOG=C:\logs\stdout.log
beasvc.exe -install....  -log:"%STD_LOG%"
......

This is the sniplet from the stdout.log:
......
[Thu Jun 12 15:45:09 2008] [I] [initLog] initializing logger
[Thu Jun 12 15:45:09 2008] [E] [initLog] No 'ROTATION_TYPE' header found. 'TIME' based rotation will be used by default.
[Thu Jun 12 15:45:09 2008] [E] [initLog] No 'TIME_START_DATE' header found or value is invalid. Rotation will take place every 24 hours beginning today at 23:59:59
[Thu Jun 12 15:45:09 2008] [E] [initLog] No 'TIME_INTERVAL_MINS' header found. Using the default value of 24 hours.
[Thu Jun 12 15:45:09 2008] [I] [initLog] TIME based log rotation is ON
[Thu Jun 12 15:45:09 2008] [I] [trigger] First rotation due in 29690 secs
[Thu Jun 12 15:45:09 2008] [I] [ServiceStart] console allocation successful. THREAD_DUMP redirection enabled
[Thu Jun 12 15:45:09 2008] [I] [ServiceStart] About to execute CreateThread()
.....
the service then starts ok and works with default settings, but that's not what I'm looking for...

any ideas are welcome ;)
thanks!
0
Comment
Question by:pmasek
  • 9
  • 6
15 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 21782685
Do you run the script with a user that has privileges to modify the registry? f you look a bit further down from the link you posted you will see the relevant section.
0
 

Author Comment

by:pmasek
ID: 21783271
yes, the service is running under system acount.
0
 
LVL 35

Expert Comment

by:girionis
ID: 21783324
It might sound stupid, but are you rnning the right file? Yu might have more than one and you don't run the one you need to.
0
 

Author Comment

by:pmasek
ID: 21783592
what you mean by 'right file'? is that the service install script? i can see the results from changes in the service install script in the log for other settings...
0
 
LVL 35

Expert Comment

by:girionis
ID: 21784679
Yes this is the one, I was just wondering if you have two instances of WebLogic installed. I can't think of anythign else, your script seems correct. The final thing I would suggest is that maybe you need to do it as the docs say, do not use "set" but rather use the hash (#) symbol (although I am pretty sure this is used for comments) in front of the settings

# ROTATION_TYPE = TIME
# TIME_START_DATE = Jul 17 2003 05:25:30
# TIME_INTERVAL_MINS = 1440
0
 

Author Comment

by:pmasek
ID: 21794720
thanks for your ideas girionis, yes i've tried with # signs instead of set but to no avail, it was failing even earlier...
0
 
LVL 35

Expert Comment

by:girionis
ID: 21794950
Have you tried without "set" and "#"? I can't think of anything else.
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

Author Comment

by:pmasek
ID: 21796066
tried that too... same result as with set...
0
 
LVL 35

Expert Comment

by:girionis
ID: 21798050
I am not sure what else you can try, sorry :(
0
 
LVL 35

Expert Comment

by:girionis
ID: 21801722
Can you do something else?

Define these variables

# ROTATION_TYPE = TIME
# TIME_START_DATE = date-in-required-format
# TIME_INTERVAL_MINS = number-of-minutes

in a separate file (as they are, with the hash in front of them). Name it "test.txt" for example. Make sure you press enter after the last line.

Then modify the script to start by passing this file in the log:

beasvc.exe -install....  -log:<absolute path to your test.xtx file>
0
 
LVL 35

Expert Comment

by:girionis
ID: 21801730
> Define these variables

And make sure you define them at the top of the file.
0
 

Author Comment

by:pmasek
ID: 21806157
-log:pathToFile is apath to the actual logfile in which the output will be written, it is not a parameter for configuration file...

thanks for your ideas :)
0
 
LVL 35

Accepted Solution

by:
girionis earned 500 total points
ID: 21808276
Not according to the URL you posted.

2. Edit the file you specified in the -log: pathname argument. If a file does not exist, create one.
For example, if you issued the example command in step 3. in the previous section, create a file named d:\bea\wlserver6.1\config\mydomain\myserver-stdout.txt.
3. Do one of the following:
If you want the Windows service to rotate the message file at a specific time interval regardless of file size, add the following statements ***at the top of the file***, each statement on a separate line (make sure to press the Enter or Return key after typing the last line):
# ROTATION_TYPE = TIME
# TIME_START_DATE = date-in-required-format
# TIME_INTERVAL_MINS = number-of-minutes
....
....

0
 

Author Closing Comment

by:pmasek
ID: 31466781
well, what can i say, RTFM properly! Thanks a lot girionis!
0
 
LVL 35

Expert Comment

by:girionis
ID: 21811014
I should have RTFM as well. Thanks for accepting :)
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

This exercise is about for the following scenario: Dmgr and One node with 2 application server. Each application server contains it owns application. Application server name as follows server1 contains app1 server2 contains app1 Prereq…
This article is about some of the basic and important steps to be used to improve the performance in web-sphere commerce application development. 1) Always leverage the Dyna-caching facility provided by the product 2) Remove the unwanted code …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now