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

How to start/stop Servers and ServerGroups from the CLI

Here is a quick tip: How to start or stop all servers belonging to a WildFly Server Group using the Command Line Interface. Connect to the Command Line Interface: $ ./jboss-cli.sh -c Now in order to stop all server groups in “main-server-group”: /server-group=main-server-group:stop-servers Conversely, to start all server groups in the “main-server-group”_ /server-group=main-server-group:start-servers On the … Read more

How to run a WildFly CLI commands from the shell

WildFly ships with a powerful Command Line Interface which can be run interactively or not. In this tutorial we will learn how to run CLI commands in non-interactive mode. Running CLI commands in a File The simplest option to run CLI commands in non-interactive mode is to include the commands in a text file and … 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