How to check JVM start up arguments from the Command Line in WildFly

There are several options to collect JVM arguments of WildFly application server from the Command Line. In general terms, if you want to check JVM arguments of a Java process, you can use the ‘jps‘ tool which is available in the ‘bin’ folder of the JDK. Example: jps -lvm 8239 -Djboss.server.base.dir=/home/jboss/wildfly-preview/standalone -D[Standalone] -Xms64m -Xmx512m -XX:MetaspaceSize=96M … Read more

Quick ways to check the application status from shell with JBoss

The simplest way to check the status of an application running on JBoss / WildFly is to use the CLI tool and the deployment-info command. Here’s an example: supposing you have deployed the helloworld.war application, launch the CLI and connect to the server: $ bin/jboss-cli.sh -c Then, check the status of the helloworld.war application: [standalone@localhost:9990 … Read more

How do I get the list of MBeans with twiddle?

JBoss 5 provides a simple command line tool that allows for interaction with a remote JMX server instance. This tool is called jboss twiddle (for twiddling bits via JMX) and is located in the bin directory of the distribution. Twiddle is a command execution tool, not a general command shell. The syntax of this tool … Read more

How do I run garbage collector from shell?

If you need to force the execution of Garbage Collection of a Java process from the command line the best option is to use the jcmd utility. The Java diagnostic command (JCMD) is another JDK tool (available in the bin folder of the JDK) that will trigger a garbage collection routine if the JVM can … Read more

How to manage WildFly CLI execution with JCliff

In this tutorial we will learn how to use the JCliff tool to improve the management of WildFly application server using the CLI WildFly CLI is a powerful instrument to manage the application server resources using Dynamic Model Representation (DMR) notation. You can also store CLI commands in scripts and run them in batch. The … Read more

WildFly CLI Tech Tip #2: How to read and download log files from the CLI

Gathering information from server log files using WildFly CLI is quite simple; for example in order to get the list of the server log files, simply execute the list-log-files command against the logging subsystem. /subsystem=logging/:list-log-files { “outcome” => “success”, “result” => [ { “file-name” => “server.log”, “file-size” => 9695L, “last-modified-date” => “2014-02-13T15:46:04.365+0100” }, { “file-name” … Read more

WildFly: How to Add an User

This short tutorial will teach you how to Add an user with WildFly Application Server You can add a Management user through the add-user.sh script which is in the JBOSS_HOME/bin folder. Launch the script: Select the default option “a” to add a Management user. This user is added to the ManagementRealm. Therefore it is authorized … Read more

Using WildFly CLI to read the configuration file

If you want to read the application server configuration file (e.g. standalone.xml or domain.xml) directly from the CLI all you need to do is executing the command :read-config-as-xml. This can be useful to be executed as part of a script, so that you can redirect the standard output to a file, like in the following … Read more

How to check that WildFly is running using the Command Line Interface

In order to check the server status using the CLI, just connect to the management interface and query for the server-state attribute as follows: ./jboss-cli.sh -c [standalone@localhost:9999 /] :read-attribute(name=server-state) { “outcome” => “success”, “result” => “running” }  If you want to check the status from your shell, maybe as part of a script, then you … Read more

Exit mobile version