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!

Splunk Add-on for Microsoft Windows 11.0.3: Parse Once, Search Faster

The updated Splunk Add-on for Microsoft Windows helps customers search Windows events faster by reducing ...

What's New in Splunk Enterprise Security 8.8 and Beyond

Threats move at machine speed. Keeping up should not depend on having the biggest budget, the largest team, or ...

A Four-Part Event Series: State of Observability - Where AI Meets Performance

As AI agents take on more complex tasks, teams need greater visibility into how they behave, what they cost, ...