Howto prevent ntopng causing out of disk space and inodes?

I've encountered a similar problem. One day df -ih shows that there is no free inodes on root partition. OS is Ubuntu 12.04.

After some research I found that there is a lot of small .json files in /var/tmp/ntopng/\*/top_talkers/ which contain information about the most active consumers of traffic.

We don't need that much history (I've seen some files which are 1 year old) so I decided to delete all files older than 2 months:

find /var/tmp/ntopng/*/top_talkers/* -mtime +60 -delete

Also I’ve added task to the /etc/crontab:

@monthly    ubuntu  /usr/bin/find /var/tmp/ntopng/*/top_talkers/* -mtime +60 -delete

Now server uses only 55% of inodes.

Tags:

Redis

Rrdtool