How do I control UL via jcmd VM.log?

Thomas Stüfe thomas.stuefe at gmail.com
Wed Jan 27 14:28:41 UTC 2016


Staffan, Steffan,

thanks a lot! Now I see my output as expected.

Kind Regards, Thomas


On Wed, Jan 27, 2016 at 3:23 PM, Stefan Karlsson <stefan.karlsson at oracle.com
> wrote:

> Hi Thomas,
>
> On 2016-01-27 14:48, Thomas Stüfe wrote:
>
>> Hi all,
>>
>> sorry if this is a stupid question. I have trouble figuring out the syntax
>> to enable Logging dynamically using jcmd for a life process.
>>
>> Whatever argument I hand down to the VM.log command, I
>> get java.lang.IllegalArgumentException.
>>
>> Examples:
>>
>> ./images/jdk/bin/jcmd 12680 VM.log  all
>> ./images/jdk/bin/jcmd 12680 VM.log  all=trace
>> ./images/jdk/bin/jcmd 12680 'VM.log  all=trace'
>> ...
>> nothing works.
>>
>
> Try the following to get more help:
>
> ./images/jdk/bin/jcmd 12680 VM.log help
> ---
> VM.log
> Lists, enables, disables or changes a log output configuration.
>
> Impact: Low: No impact
>
> Permission: java.lang.management.ManagementPermission(control)
>
> Syntax : VM.log [options]
>
> Options: (options must be specified using the <key> or <key>=<value>
> syntax)
>         output : [optional] The name or index (#<index>) of output to
> configure. (STRING, no default value)
>         output_options : [optional] Options for the output. (STRING, no
> default value)
>         what : [optional] Configures what tags to log. (STRING, no default
> value)
>         decorators : [optional] Configures which decorators to use. Use
> 'none' or an empty value to remove all. (STRING, no default value)
>         disable : [optional] Turns off all logging and clears the log
> configuration. (BOOLEAN, no default value)
>         list : [optional] Lists current log configuration. (BOOLEAN, no
> default value)
> ---
>
> and also:
>
> ./images/jdk/bin/jcmd 12680 VM.log list
>
> to see what's currently used.
>
>
> and then:
>
> ./images/jdk/bin/jcmd 12680 VM.log what=all=trace
>
>
> to change the settings.
>
> StefanK
>
>
>
>>
>> I also looked through https://bugs.openjdk.java.net/browse/JDK-8046148
>> but
>> did not find a clear answer beside "Everything that can be specified on
>> the
>> command line can also be specified dynamically with Diagnostic Commands."
>> which did not help much.
>>
>> What am I doing wrong?
>>
>> Thanks and Kind Regards, Thomas
>>
>
>


More information about the hotspot-runtime-dev mailing list