Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1877
  • Last Modified:

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

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
pmasek
Asked:
pmasek
  • 9
  • 6
1 Solution
 
girionisCommented:
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
 
pmasekAuthor Commented:
yes, the service is running under system acount.
0
 
girionisCommented:
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
pmasekAuthor Commented:
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
 
girionisCommented:
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
 
pmasekAuthor Commented:
thanks for your ideas girionis, yes i've tried with # signs instead of set but to no avail, it was failing even earlier...
0
 
girionisCommented:
Have you tried without "set" and "#"? I can't think of anything else.
0
 
pmasekAuthor Commented:
tried that too... same result as with set...
0
 
girionisCommented:
I am not sure what else you can try, sorry :(
0
 
girionisCommented:
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
 
girionisCommented:
> Define these variables

And make sure you define them at the top of the file.
0
 
pmasekAuthor Commented:
-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
 
girionisCommented:
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
 
pmasekAuthor Commented:
well, what can i say, RTFM properly! Thanks a lot girionis!
0
 
girionisCommented:
I should have RTFM as well. Thanks for accepting :)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 9
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now