A few months ago I also sent a small patch that adds afs to the list of
filesystem types to be skipped. Without this patch the filestsyem
metrics are inflated by an extra 9 Gig on our systems:
$ df /afs
Filesystem 1k-blocks Used Available Use% Mounted on
AFS 9000000 0 9000000 0% /afs
I don't see this in the current cvs, so I have attached this patch to
this email.
~Jason
On Mon, 2003-07-14 at 16:08, Federico Sacerdoti wrote:
> On Sunday, July 13, 2003, at 11:09 AM, Albert Strasheim wrote:
>
> > Secondly, Ganglia seems to think that there is 113.830 GB of disk
> > installed
> > in the machines, instead of ~80GB. df -a output is as follows.
> >
> > [EMAIL PROTECTED] albert]$ df -a
> > Filesystem 1k-blocks Used Available Use% Mounted on
> > /dev/hda3 36298348 4655088 29799400 14% /
> > none 0 0 0 - /proc
> > /dev/hda1 101089 9067 86803 10% /boot
> > none 0 0 0 - /dev/pts
> > /dev/hdb1 38464340 70012 36440424 1% /home
> > none 514748 0 514748 0% /dev/shm
> >
>
> This is a known problem. I wrote the disk_total metric and I'm afraid
> it is not accurate in all situations, as you have found.
>
> The "disk_total" logic is as follows.
> 1. Read and parse /proc/mounts
> 2. Run statvfs() to find total blocks per filesystem. Sum them
> together, multiply by block size.
> Skip device names we have seen before (necessary so as not to count
> automounted devices more than once - especially user's home
> directories).
> 3. That's it. There is no other smarts about "special" filesystems such
> as root and shmem.
>
> I will work on making the disk metrics more accurate, however more
> information from users would help very much. Does anyone else see
> erroneous disk_total figures?
>
> -fds
>
> Jason Smith first found this problem. Here is his March 3, 2003 post:
> --------
> ...
> gmond's value is a lot
> closer to what I add up with df, but still a little bit off and I am not
> sure why. I noticed that the device_space function skips filesystems
> that it has seen before, but it seems to go by the device name, not the
> mount point. On my desktop (RedHat 2.4.18-24.7.x kernel), I seem to
> have the root filesystem listed twice with different device names:
>
> rootfs / rootfs rw 0 0
> /dev/root / ext3 rw 0 0
>
> Is this being counted twice?
>
> ~Jason
>
> PS. Should devices with name equal to none also be skipped, like the
> Linux kernel's shared memory fs? From /proc/mounts I have:
>
> none /dev/shm tmpfs rw 0 0
>
> And this filesystem does report some space that might be getting added
> up with all the rest:
>
> none 256816 0 256816 0% /dev/shm
> ----
>
> >
> Federico
>
> Rocks Cluster Group, San Diego Supercomputing Center, CA
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Parasoft
> Error proof Web apps, automate testing & more.
> Download & eval WebKing and get a free book.
> www.parasoft.com/bulletproofapps1
> _______________________________________________
> Ganglia-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ganglia-developers
--
/------------------------------------------------------------------\
| Jason A. Smith Email: [EMAIL PROTECTED] |
| Atlas Computing Facility, Bldg. 510M Phone: (631)344-4226 |
| Brookhaven National Lab, P.O. Box 5000 Fax: (631)344-7616 |
| Upton, NY 11973-5000 |
\------------------------------------------------------------------/
diff -uNr ganglia-monitor-core-2.5.2-dist/gmond/machines/linux.c ganglia-monitor-core-2.5.2/gmond/machines/linux.c
--- ganglia-monitor-core-2.5.2-dist/gmond/machines/linux.c Tue Jan 7 12:05:38 2003
+++ ganglia-monitor-core-2.5.2/gmond/machines/linux.c Mon Mar 3 16:41:49 2003
@@ -919,7 +919,8 @@
or if (it is of type smbfs and its Fs_name starts with `//'). */
return ((strchr(device,':') != 0)
|| (!strcmp(type, "smbfs") && device[0]=='/' && device[1]=='/')
- || (!strcmp(type, "autofs")));
+ || (!strcmp(type, "autofs"))
+ || (!strcmp(type, "afs")));
}
/* --------------------------------------------------------------------------- */