Process fills up all available space

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
vmesquita
Posts: 315
Joined: Fri Aug 10, 2012 12:52 pm

Process fills up all available space

Post by vmesquita »

Hello,

We are having an issue in which some process in the Nagios server fills up all the free space (13Gb), up to the point where some functions like login on the web interface doesn't work anymore. Then after a while this space is released again. We have the /store folder in a separated partition so we know that it's not what's taking up space. Would you have any ideas on how to investigate this?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Process fills up all available space

Post by tgriep »

Can you run the following commands as root when the system's drive fills up and post the output here?

Code: Select all

df -h
df -i
ps -ef --cols=300
Find largest 10 directories by size command:

Code: Select all

find / -type d -print0 | xargs -0 du | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}
Find the largest 10 files by size command:

Code: Select all

find / -type f -print0 | xargs -0 du | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}

Can you run them now as well and post it here so we can see that the server current drive allocations and file usage it has now?
Be sure to check out our Knowledgebase for helpful articles and solutions!
vmesquita
Posts: 315
Joined: Fri Aug 10, 2012 12:52 pm

Re: Process fills up all available space

Post by vmesquita »

Hi tgriep, thanks for the reply.

I tried to run the recommended commands, however it also gets the mount points we have at /var (like /var/sa530,/var/sb530 etc). So the between the 10 biggest folders those mount points were taking in account which probably doesn't make much sense. Is there a way to exclude some folders in the command?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Process fills up all available space

Post by tgriep »

The simplest thing to do is to just run the command against the partition that files up.
For example, if the /var partition fills up, run the command like so.

Code: Select all

find /var -type f -print0 | xargs -0 du | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}
Or, to exclude the /var folder, run this

Code: Select all

find / -path '/var' -prune -o -type f -print0 ! -path "/var/*" | xargs -0 du | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked