VMware Cloud Community
pilot8
Contributor
Contributor

Can this logs be safely deleted ?

Hi,

ESXi 3.5, can the below logs be deleted such as rm -f messages.1.gz , or is there a special process
or steps to deleted this logs.

this log directories are getting large and I want to save space before / gets 100% used up.

thanks!


Joe

cd /var/log


w-------    1 root     root       164342 Sep  5 16:05 messages
drwxr-xr-x    1 root     root          512 Sep  5 13:09 vmware
drwxr-xr-x    1 root     root          512 Sep  5 10:18 .
-rw-------    1 root     root        80343 Sep  5 10:18 messages.0.gz
-rw-------    1 root     root        52539 Sep  3 21:10 messages.1.gz
-rw-------    1 root     root        27356 Sep  3 04:36 messages.2.gz
-rw-------    1 root     root        26581 Sep  3 04:36 messages.3.gz
-rw-------    1 root     root        26502 Sep  3 04:36 messages.4.gz
-rw-------    1 root     root        26616 Sep  3 04:35 messages.5.gz
-rw-------    1 root     root        26624 Sep  3 04:35 messages.6.gz
-rw-------    1 root     root        26662 Sep  3 04:35 messages.7.gz

/var/log/vmare

rw-r--r--    1 root     root        54286 Sep  5 16:06 hostd-4.log
drwxr-xr-x    1 root     root          512 Sep  5 13:09 .
-rw-r--r--    1 root     root       262168 Sep  5 13:09 hostd-3.log
-rw-r--r--    1 root     root            1 Sep  5 13:09 hostd-index
drwxr-xr-x    1 root     root          512 Sep  5 10:18 ..
-rw-r--r--    1 root     root       262168 Sep  4 22:46 hostd-2.log
-rw-r--r--    1 root     root       262168 Sep  4 08:25 hostd-1.log
-rw-r--r--    1 root     root       262168 Sep  3 18:06 hostd-0.log
-rw-r--r--    1 root     root       262168 Sep  3 04:36 hostd-7.log
-rw-r--r--    1 root     root       262168 Sep  3 04:36 hostd-6.log
-rw-r--r--    1 root     root       262168 Sep  3 04:36 hostd-5.log

0 Kudos
3 Replies
a_p_
Leadership
Leadership

Basically you can delete them (all compresses messages-*.gz files as well as all but the newest hostd-*.log files). However I doubt this will help you much, since the files are only a few days old. You should try to find out what causes the files to grow that fast. Maybe there's an issue with the host!?

André

0 Kudos
a_p_
Leadership
Leadership

Discussion moved from VMware ESX™ 4 to VI: VMware ESXi™ 3.5

0 Kudos
MDMF
Contributor
Contributor

you can also truncate a log using > file.log

example:

# > messages

regards,

Michel Muñoz

0 Kudos