We can able to configure -Dweblogic.Stdout and -Dweblogic.StdErr params in weblogic configuration to print logs
Windows platform :
set SAVE_JAVA_OPTIONS=%JAVA_OPTIONS% -Xms8192m -Xmx10240m
-XX:MaxPermSize=4096m -Djavax.xml.soap.MessageFactory=com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl
-Dweblogic.Stdout="D:\ims_ecs\bea10_36\user_projects\domains\Domainname\logs\SystemOut.txt"
-Dweblogic.Stderr="D:\ims_ecs\bea10_36\user_projects\domains\Domainname\logs\SystemErr.txt"
-Dweblogic.slc=true -Dweblogic.debug.DebugServerLifeCycle=true
Logs are printed in declared location .
Linux platform :
set SAVE_JAVA_OPTIONS=%JAVA_OPTIONS% -Xms512m -Xmx1024m
-XX:MaxPermSize=512m -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false -Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
-Dweblogic.Stdout=/u01/app/oracle/product/ofm12.1.2/user_projects/domains/Domainname/logs/SystemOut.txt
-Dweblogic.Stderr=/u01/app/oracle/product/ofm12.1.2/user_projects/domains/Domainname/logs/SystemErr.txt
Able to start weblogic but logs not printed in Required location
Can you please suggest how to get weblogic domain logs in linux
Windows and Linux have different nomenclature for their scripts.
Check startWebLogic.sh from WLS installation:
${VARIABLE_NAME} instead %VARIABLE_NAME%
: instead ;
etc.
Snippet code from it:
JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.management.password=${WLS_PW}"
...
...
${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WLS_POLICY_FILE} ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS}
Thanks Devwebcl. Instead of % symbol need to use {} in linux
then logs get printed .
used command in linux :
SAVE_JAVA_OPTIONS=%JAVA_OPTIONS% -Djavax.xml.soap.MessageFactory=com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl -Dweblogic.Stdout="/u01/app/oracle/product/ofm12.1.2/user_projects/domains/domainname/logs/SystemOut.txt" -Dweblogic.Stderr="/u01/app/oracle/product/ofm12.1.2/user_projects/domains/domainname/logs/SystemErr.txt"-Dweblogic.slc=true -Dweblogic.debug.DebugServerLifeCycle=true -Dweblogic.log.RedirectstdoutToServerLogEnabled=true
Related
I have two problems with log4j2:
I cannot figure out how to specify the log root level in the command line.
I execute runnable jar with log4j2.xml config file
java -Dlog4j.configurationFile=log4j2.xml -jar my.jar
The log4j2.xml has default loggers root log level set to INFO. But sometimes I need to specify DEBUG.
-Dlog4j.configurationFile=log4j2.xml does not work on Windows though it works fine on Mac and Linux. log4j2.xml does exist in current folder.
I get error when executing above mentioned command line with Windows PowerShell
Error: Could not find or load main class .configurationFile=log4j2.xml
I tried -Dlog4j.configurationFile=file://log4j2.xml or -Dlog4j.configurationFile=./log4j2.xml or -Dlog4j.configurationFile=file://<full_path_to_log4j2.xml> the same error
Define a property named "rootLevel" as
${sys:rootLevel:=INFO}
then on your root Logger specify
<Root level="${rootLevel}">
The root level will now default to Info and you can override it with -DrootLevel=DEBUG on the command line.
The problem is the dot in the property name. On Windows you need to put it in quotes.
Im using tika-app.jar with the version 1.12,to try to find the list of corrupted files that can't be opened in a specified folder.
the problem is when i tested inside windows it gives me in the log folder some exception that allow me to know what files that can't be opened like this :
Caused by: org.apache.poi.openxml4j.exceptions.InvalidOperationException: Can't open the specified file: 'folder\mi-am-CV.docx'
but the problem in linux is only i get a broad error in the log folder like this:
WARN org.apache.tika.batch.FileResourceConsumer - <parse_ex resourceId="test-corrupted-2.doc">org.apache.tika.exception.TikaException: Unexpected RuntimeException from org.apache.tika.parser.microsoft.OfficeParser#f6e9bd4
so i can't know specificaly what files that are really corrupted and can't be opened.
here's the shell command that i use for that in linux :
java -Dlog4j.debug -Dlog4j.configuration=file:log4j_driver.xml -cp "bin/*" org.apache.tika.cli.TikaCLI -JXX:-OmitStackTraceInFastThrow -JXmx5g -JDlog4j.configuration=file:log4j.xml -bc tika-batch-config-basic-test.xml -i /folder -o outxml -numConsumers 10
thanks.
Hello I get this error when I try the simple esample of the tutorial:
"grun Hello -r tree
Warning: TestRig moved to org.antlr.v4.gui.TestRig; calling automatically
Problems calling org.antlr.v4.gui.TestRig.main(args)
"
I cannot figure out what is going on.
Can you help me please.
It sounds like you have setup your 'grun' alias to use :
org.antlrv4.runtime.misc.TestRig
//and from antlr4 onwards they deprecated that and use this instead.
org.antlrv4.gui.TestRig
So you should try resetting your 'grun' alias either from terminal or batch file depending on how you set it up. If there are still errors comment here and i will try and help:
alias grun='java org.antlr.v4.gui.TestRig'
if you still have any errors after updating your setup alias then leave a comment and i will try to help further.
Setup TestRig - Added here so content is not lost after the documentation section is shut down.
ANTLR contains a testing tool in its runtime library, this tool can be used to display information detailing how the parsing is performed to match input against defined rules in your grammar file.
To use this tool contained within the ANTLR jar file you should setup your systems classpath to allow access to both the ANTLR tool and the runtime library :
export CLASSPATH=".:/usr/local/lib/antlr-4.5.3-complete.jar:$CLASSPATH"
Note: Ensure the Dot precedes any path to ensure the java virtual machine wont see classes in your current working directory.
Alises can be used on Linux/MAC/Unix to simplify commands used:
alias antlr4='java -jar /usr/local/lib/antlr-4.5.3-complete.jar'
//or any directory where your jar is located
Note setup on windows for aliases and classpath setup may be more complicated, see here for more comprehensive details.
Accessing TestRig
Once you have setup your alias you can setup TestRig in the following way, again using an alias is recommended as reduces the amount of time required to perform the action:
alias grun='java org.v4.runtime.misc.TestRig'
If you do not wish to setup an alias on windows you can access TestRig by running the following command in the same location as your ANTLR jar directory:
java -cp .;antlr.4.5.3-complete.jar org.antlrv4.runtime.misc.TestRig
//or
java -cp .;antlr.4.5.3-complete.jar org.antlrv4.gui.TestRig
To run TestRig on your grammar you can pass the parameters in for your grammar like this :
grun yourGrammar yourRule -tree //using the setup alias java -cp .;antlr.4.5.3-complete.jar org.antlrv4.gui.TestRig yourGrammar YourRule -tree //on windows with no alias java -cp .;antlr.4.5.3-complete.jar org.antlrv4.gui.TestRig yourGrammar Hello r -tree //Windows with the grammar Hello.g4 starting from the rule 'r'.
grun yourGrammar yourRule -tree //using the setup alias
java -cp .;antlr.4.5.3-complete.jar org.antlrv4.gui.TestRig yourGrammar YourRule -tree //on windows with no alias
java -cp .;antlr.4.5.3-complete.jar org.antlrv4.gui.TestRig yourGrammar Hello r -tree
//Windows with the grammar Hello.g4 starting from the rule 'r'.
I'm doing get simple trace file from QEMU.
I followed instructions docs/tracing.txt
with this command "qemu-system-x86_64 -m 2G -trace events=/tmp/events ../qemu/test.img"
i'd like to get just simple trace file.
i've got trace-pid file, however, it dosen't have anything in it.
Build with the 'simple' trace backend:
./configure --enable-trace-backends=simple
make
Create a file with the events you want to trace:
echo bdrv_aio_readv > /tmp/events
echo bdrv_aio_writev >> /tmp/events
Run the virtual machine to produce a trace file:
qemu -trace events=/tmp/events ... # your normal QEMU invocation
Pretty-print the binary trace file:
./scripts/simpletrace.py trace-events trace-* # Override * with QEMU
i followd this instructions.
please somebody give me some advise for this situation.
THANKS!
I got same problem by following the same document.
https://fossies.org/linux/qemu/docs/tracing.txt
got nothing because
bdrv_aio_readv and bdrv_aio_writev was not enabled by default, at least the version I complied, was not enabled. you need to open trace-events under source directory, looking for some line without disabled, e.g. I using:
echo "load_file" > /tmp/events
Then start qemu,
after a guest started, I run
./scripts/simpletrace.py trace-events trace-Pid
I got
load_file 1474.156 pid=5249 name=kvmvapic.bin path=qemu-2.8.0-rc0/pc-bios/kvmvapic.bin
load_file 22437.571 pid=5249 name=vgabios-stdvga.bin path=qemu-2.8.0-rc0/pc-bios/vgabios-stdvga.bin
load_file 10034.465 pid=5249 name=efi-e1000.rom
you can also add -monitor stdio to qemu command line, after it started, you can the following command in qemu CLI:
(qemu) info trace-events
load_file : state 1
vm_state_notify : state 1
balloon_event : state 0
cpu_out : state 0
cpu_in : state 0
1 means enabled events.
Modify the trace-events file in the source tree
As of v2.9.0 you also have to remove the disable from the lines you want to enable there, e.g.:
-disable exec_tb(void *tb, uintptr_t pc) "tb:%p pc=0x%"PRIxPTR
+exec_tb(void *tb, uintptr_t pc) "tb:%p pc=0x%"PRIxPTR
and recompile.
Here is a minimal fully automated runnable example that boots Linux and produces traces: https://github.com/cirosantilli/linux-kernel-module-cheat
For example, I used the traces to count how many boot instructions Linux has: https://github.com/cirosantilli/linux-kernel-module-cheat/blob/c7bbc6029af7f4fab0a23a380d1607df0b2a3701/count-boot-instructions.md
I have a lightly patched QEMU as a submodule, the key commit is: https://github.com/cirosantilli/qemu/commit/e583d175e4cdfb12b4812a259e45c679743b32ad
So far here are the things I've checked from the server:
DB2 JDBC Driver - check
DB2 License (db2jcc_license_cu.jar) included in class path - check
DB2 db2java.zip included in class path - check
DB2 db2jcc.jar included in class path - check
Here's the current class path:
CLASSPATH=/home/db2cae/sqllib/java/db2java.zip:/home/db2cae/sqllib/java/sqlj.zip:/home/db2cae/sqllib/function:/home/db2cae/sqllib/java/db2jcc_license_cu.jar:/home/db2cae/sqllib/tools/clpplus.jar:/home/db2cae/sqllib/tools/antlr-3.2.jar:/home/db2cae/sqllib/tools/jline-0.9.93.jar:/home/db2cae/sqllib/java/db2jcc.jar:.
JAVA_BINDIR=/usr/lib64/jvm/jre/bin
JAVA_HOME=/usr/lib64/jvm/jre
JAVA_ROOT=/usr/lib64/jvm/jre
The command that was executed was:
java -cp ./db2jcc.jar com.ibm.db2.jcc.DB2Jcc -version
However it returned
What could be the possible problem for this?
i assume your classpath environment is not considered.
You could try someting like:
Windows:
java -cp %CLASSPATH%;./db2jcc4.jar com.ibm.db2.jcc.DB2Jcc -version
Linux:
java -cp $CLASSPATH:./db2jcc4.jar com.ibm.db2.jcc.DB2Jcc -version