大网数据广告活动
服务器运维问答

Howto prevent ntopng causing out of disk space and inodes?

· 52CE 我爱测

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 giv…

问题原文

原帖链接 · BeowulfNode42 · CC BY-SA 3.0

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?

已采纳解答

原帖链接 · dima.butyrin · CC BY-SA 3.0

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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2014-09-03)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。