How to Check Kafka Status in Linux: 3 Methods

In Linux, you can check if the Kafka service is running by using the following command:

  1. Check if the Kafka process is running using the ps command.
ps aux | grep kafka

If the Kafka service is already started, it will display relevant process information.

  1. Check the status of Kafka services:
systemctl status kafka

This command will display the current status of the Kafka service, including whether it is running.

  1. Check the log files for Kafka.

Kafka log files are typically located in the “logs” folder within the Kafka installation directory, and can be viewed using the “cat” or “tail” command to see the latest log information.

cat /path/to/kafka/logs/server.log

Or

tail -f /path/to/kafka/logs/server.log

The above are some common ways to check if Kafka is started and running, you can choose the appropriate method according to the specific situation.

bannerAds