このコンテンツは選択した言語では利用できません。

7.14. fabric:container-edit-jvm-options


Abstract

Replace the JVM options used to launch a container

Synopsis

fabric:container-edit-jvm-options [ --help ] [ -u, --username user ] [ -p, --password password ] { Container } [ JVMOptions ]

Description

Enables you to set the Java Virtual Machine (JVM) options that are passed to the Java runtime when launching the container. Note that this command replaces all of the existing JVM options for the container. Hence, when you invoke this command, you must specify all of the container's JVM options, not just the ones you want to add.
For example, suppose you have a container named ssh2 and you want to add the following JVM options: -Xms2048M -Xmx8192M. Proceed as follows:
  1. Invoke the container-edit-jvm-options command to discover the current JVM options used by the ssh2 container, as follows:
    JBossFuse:karaf@root> container-edit-jvm-options ssh2
    -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -Djava.endorsed.dirs=/usr/lib/jvm/jre/jre/lib/endorsed:/usr/lib/jvm/jre/lib/endorsed:/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/lib/endorsed -Djava.ext.dirs=/usr/lib/jvm/jre/jre/lib/ext:/usr/lib/jvm/jre/lib/ext:/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/lib/ext -Dkaraf.instances=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/instances -Dkaraf.home=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133 -Dkaraf.base=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133 -Dkaraf.data=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/data -Dkaraf.etc=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/etc -Djava.io.tmpdir=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/data/tmp -Djava.util.logging.config.file=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/etc/java.util.logging.properties -Djavax.management.builder.initial=org.apache.karaf.management.boot.KarafMBeanServerBuilder -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true
  2. Invoke the container-edit-jvm-options command, passing all of new JVM options as the second argument to the command (enclosed in single or double quotes). That is, to construct the second argument, copy the JVM options output from the previous step, append your additional JVM arguments, and enclose all of these JVM options in quotes. For example:
    JBossFuse:karaf@root> container-edit-jvm-options ssh2 '-XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -Djava.endorsed.dirs=/usr/lib/jvm/jre/jre/lib/endorsed:/usr/lib/jvm/jre/lib/endorsed:/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/lib/endorsed -Djava.ext.dirs=/usr/lib/jvm/jre/jre/lib/ext:/usr/lib/jvm/jre/lib/ext:/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/lib/ext -Dkaraf.instances=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/instances -Dkaraf.home=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133 -Dkaraf.base=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133 -Dkaraf.data=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/data -Dkaraf.etc=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/etc -Djava.io.tmpdir=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/data/tmp -Djava.util.logging.config.file=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/etc/java.util.logging.properties -Djavax.management.builder.initial=org.apache.karaf.management.boot.KarafMBeanServerBuilder -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true -Xms2048M -Xmx8192M'
  3. In order for these new JVM options to take effect, you need to restart the ssh2 container, as follows:
    JBossFuse:karaf@root> container-stop ssh2
    JBossFuse:karaf@root> container-start ssh2
  4. Verify that the current JVM settings have the new values, as follows:
    JBossFuse:karaf@root> container-edit-jvm-options ssh2
    ...

Arguments

Table 7.14. fabric:container-edit-jvm-options Arguments
ArgumentInterpretation
--help Displays the online help for this command.
-u, --username Specifies the username to log on to a remote container.
-p, --password Specifies the password to log on to a remote container.
ContainerThe name of the container.
JVMOptionsSpecifies the container's new JVM options, which completely replace the old JVM options. If this argument is omitted, the command shows the existing JVM options for the specified container.
Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.