clear logs on cvm /home/data/logs | Nutanix Community
Skip to main content

to clear the logs i followed the artical 

https://portal.nutanix.com/page/documents/kbs/details?targetId=kA0600000008dpDCAQ

but nothing seems to be working to clear the logs ,

 

nutanix@NTNX-23SH5K130410-A-CVM:72.12.6.51:~$ /usr/bin/rm /home/nutanix/data/logs/*
-bash: /usr/bin/rm: Argument list too long

 

 

nutanix@NTNX-23SH5K130372-A-CVM:172.17.6.59:/tmp$ ls -ltr
total 112
drwx------. 2 root    root    12288 Jun 10  2023 lost+found
-rw-r--r--. 1 nutanix nutanix     0 Jan  8 15:00 send-email.lock
drwx------. 3 root    root     1024 Jan 15 14:19 systemd-private-d708d6947f3b4951b974c34ea40737cd-ntpd.service-SJjinF
drwx------. 3 root    root     1024 Jan 15 14:19 systemd-private-d708d6947f3b4951b974c34ea40737cd-ntpd.service-BWBBQf
-rw-------. 1 root    root        0 Jan 15 14:19 svm_boot_succeeded
drwx------. 2 root    root     1024 Jan 15 14:19 python-gnupg
-rw-r--r--. 1 root    root      557 Jan 15 14:19 startd.log
-rw-r--r--. 1 root    root    32978 Jan 15 14:21 rc_nutanix_start.1881.log
-rw-------. 1 nutanix nutanix 55497 Jan 18 13:09 KB-1540_clean_v11.sh
nutanix@NTNX-23SH5K130372-A-CVM:172.17.6.59:/tmp$ sh sh KB-1540_clean.sh

 

cluster was off since many days due to switch issue , it is test cluster so i am really worried about data on it 

to clear the logs i followed the artical 

https://portal.nutanix.com/page/documents/kbs/details?targetId=kA0600000008dpDCAQ

but nothing seems to be working to clear the logs ,

 

nutanix@NTNX-23SH5K130410-A-CVM:72.12.6.51:~$ /usr/bin/rm /home/nutanix/data/logs/*
-bash: /usr/bin/rm: Argument list too long

 

 

nutanix@NTNX-23SH5K130372-A-CVM:172.17.6.59:/tmp$ ls -ltr
total 112
drwx------. 2 root    root    12288 Jun 10  2023 lost+found
-rw-r--r--. 1 nutanix nutanix     0 Jan  8 15:00 send-email.lock
drwx------. 3 root    root     1024 Jan 15 14:19 systemd-private-d708d6947f3b4951b974c34ea40737cd-ntpd.service-SJjinF
drwx------. 3 root    root     1024 Jan 15 14:19 systemd-private-d708d6947f3b4951b974c34ea40737cd-ntpd.service-BWBBQf
-rw-------. 1 root    root        0 Jan 15 14:19 svm_boot_succeeded
drwx------. 2 root    root     1024 Jan 15 14:19 python-gnupg
-rw-r--r--. 1 root    root      557 Jan 15 14:19 startd.log
-rw-r--r--. 1 root    root    32978 Jan 15 14:21 rc_nutanix_start.1881.log
-rw-------. 1 nutanix nutanix 55497 Jan 18 13:09 KB-1540_clean_v11.sh
nutanix@NTNX-23SH5K130372-A-CVM:172.17.6.59:/tmp$ sh sh KB-1540_clean.sh

 

cluster was off since many days due to switch issue , it is test cluster so i am really not worried about data on it 

 


i have run the following and it fixed the issue 

 

allssh "find ~/data/logs/ -name '*.*' -mmin +120 -type f -exec rm '{}' +"

allssh "find ~/data/logs/sysstats -name '*.*' -mmin +60 -type f -exec rm '{}' +"

 

allssh df -kh /home

 

recommanded to Consult Nutanix support