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!

Meet Splunk Observability Studio: AI-Assisted OpenTelemetry Instrumentation Without ...

Instrumentation is usually the last step or even an afterthought when building out a project. The feature ...

Federated Search for Cisco Security and Analytics Logging (SAL) is now GA on Splunk ...

Federated Search for Cisco  Security Analytics and Logging (SAL) is now generally available as part of the ...

Your Path to AgenticOps: AI Experiences for Every Splunk Practitioner

Your Path to AgenticOps: AI Experiences for Every Splunk Practitioner   Join us for a demo-driven look at how ...