JBoss cheatsheet for Linux Administrators (2022)

This is my JBoss / WildFly cheatsheet I use for managing the application server on a Linux box. Enjoy it and welcome any contribution to the cheatsheet. WildFly / JBoss CLI How to execute commands in non-interactive way: jboss-cli.sh –connect –command=”:reload” How to connect to a non default host/port jboss-cli.sh –connect –controller=192.168.0.1:9990 How to execute … Read more

Categories CLI

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

Categories CLI

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

Categories CLI

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

Categories CLI

WildFly CLI Tech Tip #1: How to read WildFly System Properties

Here is a new section for WildFly CLI gurus. In the first tip we will learn how to gather all System Properties which are available in WildFly using the CLI. You might be surprised to see that WidFly System Properties are not available through the /system-property path. For example, if you are looking for the … Read more

Categories CLI

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

Categories CLI

How to use conditional statements in WildFly CLI

WildFly Command Line Interface is not a real programming language with complex structures. Nevertheless it’s possible to execute conditional logic in it and this short tutorial will show how to do it. WildFly Command Line Interface contains the “if” keywords which can be used to build conditional logic. here is the synopsys of the command: … Read more

Categories CLI