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.
BeowulfNode42
Updated on September 18, 2022Comments
-
BeowulfNode42 almost 2 years
I've been trying the ntopng software from http://www.ntop.org/get-started/download on a CentOS box at work to monitor what is happening on our network. The problem I'm having is that I can't find any part of the software that gives an option to delete old data.
The disk usage by this software was so uncontrolled it used 79% of the space and 87% of the inodes on the disk in that server after a few months.
Has anyone seen a solution for having only the most recent xx days or GB of data when using ntopng? Also ensuring it doesn't run out of inodes as well. Can/should I just delete any old files and empty directories in its rrd data directory?
-
user9517 almost 10 yearsHow quickly did it use up the space ?
-
-
BeowulfNode42 over 9 yearsSo you don't think there's any related meta data that needs updating. Have you noticed any adverse effects from just deleting these files?
-
dima.butyrin over 8 yearsSo far, so good. I'm not sure is there any related metadata or not, looks like everything is work as usually.
-
tigerjack about 8 yearsFor me, the most used directories are the
*/rdd
ones. Do you think it's safe to use the same command (maybe with a longer mtime)?