Unexplainable disk space usage in nagios/var/spool/checkresults
Thomas Guyot-Sionnest
dermoth at aei.ca
Wed Jan 27 07:40:48 CET 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 26/01/10 12:29 PM, Casey Allen Shobe wrote:
> 2010/1/26 Wolfe, Robert <robert.wolfe at robertwolfe.org
> <mailto:robert.wolfe at robertwolfe.org>>
>
> When you do an ‘ls –lash’ on this directory, what do you see?
>
>
> I already included that in my last post. The only difference was that I
> added -Sr to do a reverse sort by size (largest items at the bottom),
> and -F is included in my alias for ls, so '/' is shown at the end of
> directory names.
>
> However, this actually seems to be an issue with JFS and high turnover
> within a directory.
> http://www.mail-archive.com/jfs-discussion@lists.sourceforge.net/msg00748.HTML
I would highly recommend using tmpfs for the checkresults directory.
This is especially important on logging file systems like JFS, XFS,
Ext3+ and ReiserFS since every meta-data operation will cause a log
write+flush (at the very least) which will cause a constant stream of
unneeded IO.
1. Add this line to fstab:
checkresults /usr/local/nagios/var/checkresults tmpfs
uid=1001,gid=103,mode=0755 0 0
(in one line, nevermind auto line-warp... make sure the uid/gid are that
of the nagios user).
2. Make sure the dir exists (it should if nagios uses it!) and that
nagios is stopped. Delete any stale file and/or re-create the directory
if you need to free space used by it (i.e. Jfs bug), then mount it (it
should also get mounted at boot time before Nagios starts since it's in
the fstab):
# mount -a
3. Start nagios - it should now write all files in a memory fs (tmpfs).
Note: you can also add the size=nbytes mount option... it limits the
amount of RAM that can be used by the tmpfs, however unless you hit a
nasty bug it shouldn't be a problem (plus you can monitor it with
check_disk...)
Note 2: I also use one for temp/status.dat files...
- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFLX9/w6dZ+Kt5BchYRAkgXAKDrkRWtY2O1sRg2eD8h1FbkWlvMNgCgmtq2
fFZKTDXXrNaPgVf6CLZlD7g=
=WfLm
-----END PGP SIGNATURE-----
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list