Splunk Search

How can I figure out why my lastlog directory is huge?

wvalente
Explorer

Hi guys,

Why is my lastlog directory so huge?

-rw-r--r--. 1 root   root   **216G** Aug  7 17:35 lastlog

What can I do to reduce it?

Thanks

0 Karma

dshakespeare_sp
Splunk Employee
Splunk Employee

I believe that lastlog is a sparse file see http://www.noah.org/wiki/Lastlog_is_gigantic

0 Karma

cpetterborg
SplunkTrust
SplunkTrust

The file should not be that big. Period.

You can't reduce the size without deleting all the data. If you want to delete all the data, don't delete the file, because your system will keep it open and it will stay the same size until you reboot. You can delete the contents of the file with the following command:

cp /dev/null >/var/log/lastlog
0 Karma
Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...