Splunk Search

How would I stop and restart my UF and HF

SplunkDash
Motivator

Hello,

I have Universal Forward and Heavy Forward in Linux machine, how would I stop and restart them.  Any help will be highly appreciated. Thank you so much, appreciate your support in these efforts.

Labels (1)
Tags (1)
0 Karma
1 Solution

ashvinpandey
Contributor

@SplunkDash First of all for both UF & HF the process is same.

  1. First login to your linux instance via CLI.
  2. Now change ownership to splunk user.
  3. Go to bin directory of your splunk, in most common cases the path will be /opt/splunk/bin.
  4. If you don't remember the path of where your splunk is installed you can use the below command to check it:

 

echo $SPLUNK_HOME​

 

 

  • Now to to splunk/bin directory and check the splunk status using below commands.

 

./splunk status​

 

 

  • If splunk is already running you can directly restart it using below command.

 

./splunk restart​

 

 

  • If splunk is not running you need to start your service by using below command.

 

./splunk start​

 

 

  • Now again check the splunk status by using the above status command and check if the splunk is running.

That's all you need to do for a restart.

Also if this reply helped you a thumbs-up would be appreciated.

View solution in original post

PickleRick
SplunkTrust
SplunkTrust

Remember that all solutions given here require that you run those commands as the user splunk is running with. You might run into problems if splunk have been running so far with its own user and you suddenly run it as root. Might cause some permissions problems later.

So it's advisable to start and stop the service using the normal system mechanisms:

systemctl start splunkd.service

systemctl stop splunkd.service

systemctl status sytemctl service

If you're running splunk on a distro that doesn't ship with systemd but with other init (is it still possible in 2021?), try your typical system services manipulation commands i.e. service splunkd start/stop.

ashvinpandey
Contributor

@SplunkDash First of all for both UF & HF the process is same.

  1. First login to your linux instance via CLI.
  2. Now change ownership to splunk user.
  3. Go to bin directory of your splunk, in most common cases the path will be /opt/splunk/bin.
  4. If you don't remember the path of where your splunk is installed you can use the below command to check it:

 

echo $SPLUNK_HOME​

 

 

  • Now to to splunk/bin directory and check the splunk status using below commands.

 

./splunk status​

 

 

  • If splunk is already running you can directly restart it using below command.

 

./splunk restart​

 

 

  • If splunk is not running you need to start your service by using below command.

 

./splunk start​

 

 

  • Now again check the splunk status by using the above status command and check if the splunk is running.

That's all you need to do for a restart.

Also if this reply helped you a thumbs-up would be appreciated.

danielcj
Communicator

Hi,

The commands are the following:

- Stop Splunk: splunk stop
- Restart Splunk: splunk restart

You should be on the following path to execute the commands: $SPLUNK_HOME/bin/

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...