jcmd - executing multiple commands at the same safepoint?
Kirk Pepperdine
kirk.pepperdine at gmail.com
Thu May 10 06:07:04 UTC 2018
> On May 10, 2018, at 7:04 AM, Thomas Stüfe <thomas.stuefe at gmail.com> wrote:
>
> Oh... maybe. You are right. And I see commas are not good either since
> they are used in sub options (e.g. GC.class_stats).
>
> Alternative ideas could be using brackets surrounding the
> command-and-options (e.g. '{''}'):
>
> jcmd { GC.class_stats columns=InstBytes,KlassBytes } { VM.metaspace
> show-loaders }
are exposed braces safe in shells?
>
> I think technically we would not even need delimiters, since the
> commands are as keywords limiting enough. E.g. one could just specify:
>
> jcmd GC.class_stats columns=InstBytes,KlassBytes VM.metaspace show-loaders
I’d vote for this form. Simple..
— Kirk
>
> and that would be for jcmd too. It is more for the benefit of the user.
>
> On Thu, May 10, 2018 at 7:54 AM, Kirk Pepperdine
> <kirk.pepperdine at gmail.com> wrote:
>> Awesome idea! Would the semicolon would be an issue for shell scripts?
>>> On May 10, 2018, at 6:52 AM, Thomas Stüfe <thomas.stuefe at gmail.com> wrote:
>>>
>>> Hi all,
>>>
>>> just asking around for opinions.
>>>
>>> I am playing with the idea of bundling diagnostic commands to have
>>> them executed at the same safepoint, in order to get results
>>> consistent with each other. E.g. a heapdump and a corresponding
>>> metaspace statistic.
>>>
>>> Syntax wise, I think one could specify multiple commands in jcmd
>>> separated by comma or semicola:
>>>
>>> jcmd <command> <option> <option>; <command 2> <option> <option>
>>>
>>> What do you think, would that be a useful addition?
>>>
>>> Thanks, Thomas
>>
More information about the serviceability-dev
mailing list