FactorPad
Build a Better Process

The Solr status Command Syntax and Examples

This command prints JSON-formatted output of settings for each running Solr instance, providing a quick way to get acquainted.
  1. About - understand the purpose of the status command.
  2. Syntax - see solr status command usage from the command line.
  3. Options - view options and output from the solr status command.
  4. Examples - review several common examples including additional help.
face pic by Paul Alan Davis, CFA
Updated: February 24, 2021
Here we focus on the command line using a Linux-based operating system, however many of the same commands work for macOS. There are slight differences for Windows.

Outline Back Tip Next

/ factorpad.com / tech / solr / reference / solr-status.html


An ad-free and cookie-free website.


The solr status command

Beginner

As we build out custom search applications and evaluate Apache Solr search versus Elasticsearch it is important to learn about server instances and configurations quickly. This command allows you to do just that. The solr status command offers a fast way to learn about modes, nodes, clusters, replicas, cores and collections while offering locations of important files.

Apache Solr Reference

1. About the solr status command

The solr status command will poll the Solr server for running processes and generate a report summarizing all of the locations and settings. One of the unique aspects of the status command is that it has no options. If no instances are running it will provide a message and exit. If instances are running it will provide a report and exit. So it is very limited in its functionality, but provides helpful information quickly.

The solr status command is one of 12 commands within the main solr script.

The solr status command itself has no options. Everything after the command itself is ignored, meaning you cannot run a status report only on a specific port.

2. Syntax for the solr status command

The syntax for running solr status is as follows.

$ bin/solr status

This syntax assumes your current working directory is the $SOLR_HOME directory for Solr, which for version 7 would be ~/solr-7.0.0/ in standalone mode for a local installation. When running in a production environment the directory locations may differ.

So the path to the location of the solr script is: ~/solr-7.0.0/bin/solr. Alternatively, the solr script can be run using the convention ./solr from within the bin directory.

If Solr Windows is your preferred environment for custom search, the solr script is called using solr.cmd.

3. Options for the solr status command

The solr status command takes no options (parameters). It simply polls for running Solr server instances and presents a JSON-formatted report of settings.

Syntax Purpose Default
bin/solr status Provide a status of running Solr instances. No options
Items reported in a status report

Below is a list of items reported in JSON format when using the bin/solr status command in standalone (one server) mode.

The following additional items are reported when Solr is run in SolrCloud mode.

4. Examples of the solr status command

Example 1 - The Solr status when no nodes are present

As mentioned earlier, if no instances of Solr are present then you will see a message and the script will exit.

$ bin/solr status No Solr nodes are running.
Example 2 - Find help on the Solr status command

The status command does not have a traditional help similar to a man page for other commands. Any text entered after the command will be ignored and Solr will poll for instances and provide a report, if any instances are present.

$ bin/solr status -help No Solr nodes are running.
Example 3 - Start a Solr instance and access its status

The following commands will start a basic solr instance in standalone mode using default settings and then report its status.

$ bin/solr start Waiting up to 180 seconds to see Solr running on port 8983 [\] Started Solr server on port 8983 (pid=5700). Happy searching! $ bin/solr status { "solr_home":"/home/paul/solr-7.0.0/server/solr", "version":"7.0.0 3ba304b29825a94249c5145b3f5061e87b87d8f8 - anshum - 2017-09-08 13:21:08", "starttime":"2017-10-11T16:16:15.224Z", "uptime":"0 days, 0 hours, 4 minutes, 9 seconds", "memory":"30.4 MB (6.2%) of 490.7 MB"}

Other Related Solr Content

FactorPad offers Apache Solr Search content in both tutorials and reference.


What's Next?

Before you forget, subscribe to our YouTube Channel and follow @factorpad more free opportunities to learn.

Outline Back Tip Next

/ factorpad.com / tech / solr / reference / solr-status.html


solr status
apache solr
solr reference
enterprise search
apache Lucene
lucene reference
apache solr search
solr examples
solr commands
solr syntax
solr help
solr wiki
solr settings
solr configuration
custom search
solr man page

A newly-updated free resource. Connect and refer a friend today.