Splunk Search

How would I stop and restart my UF and HF

malekmo
Contributor

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

@malekmo 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
Champion

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

@malekmo 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

danielcj
Path Finder

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
Did you miss .conf21 Virtual?

Good news! The event's keynotes and many of its breakout sessions are now available online, and still totally FREE!