Splunk Search

Clean the Dispatch Directory command error

mookiie2005
Communicator

I am trying to clean out the dispatch directory on our search head. I am using the command:

splunkd clean-dispatch D:\temp -1day

when the above is used splunk returns the below message:

SPLUNK_HOME must be set. Stopping.

I cannot get it to clean the dispatch directory. Has anyone had a similar issue? How did you resolve?

We are running slunk version 4.3.4 on a windows machine.

0 Karma
1 Solution

bshuler_splunk
Splunk Employee
Splunk Employee
C:\Documents and Settings\Administrator>cd "\Program Files\Splunk\bin"

C:\Program Files\Splunk\bin>mkdir %TEMP%\splunk_dispatch


C:\Program Files\Splunk\bin>splunk cmd splunkd clean-dispatch %TEMP%\splunk_dispatch -1d
Using logging configuration at C:\Program Files\Splunk\etc\log-cmdline.cfg.
dispatch dir:      C:\Program Files\Splunk\var\run\splunk\dispatch
destination dir:   C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\splunk_dispatch
earliest mod time: 2013-10-14T09:32:31.000-07:00

total: 0, moved: 0, failed: 0, remaining: 0 job directories from C:\Program Files\Splunk\var\run\splunk\dispatch to C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\splunk_dispatch

C:\Program Files\Splunk\bin>

View solution in original post

bshuler_splunk
Splunk Employee
Splunk Employee
C:\Documents and Settings\Administrator>cd "\Program Files\Splunk\bin"

C:\Program Files\Splunk\bin>mkdir %TEMP%\splunk_dispatch


C:\Program Files\Splunk\bin>splunk cmd splunkd clean-dispatch %TEMP%\splunk_dispatch -1d
Using logging configuration at C:\Program Files\Splunk\etc\log-cmdline.cfg.
dispatch dir:      C:\Program Files\Splunk\var\run\splunk\dispatch
destination dir:   C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\splunk_dispatch
earliest mod time: 2013-10-14T09:32:31.000-07:00

total: 0, moved: 0, failed: 0, remaining: 0 job directories from C:\Program Files\Splunk\var\run\splunk\dispatch to C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\splunk_dispatch

C:\Program Files\Splunk\bin>
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Manage Edge Processor pipelines end to end with APIs

This guide uses the Data Management APIs to create an Edge Processor, onboard one instance, deploy a pipeline ...

Splunk Brings Proof of Control to Digital Asset Transfers

Digital assets now sit inside the core of financial services. HSBC launched its Tokenized Deposit Service in ...

Manage Ingest Processor pipelines end to end with APIs

This guide uses the Data Management APIs to create an Ingest Processor pipeline, deploy it to the ...