[dsc] Out of disk space errors on collector
Duane Wessels
wessels at measurement-factory.com
Thu Feb 19 17:47:42 UTC 2009
On Thu, 19 Feb 2009, Duane Wessels wrote:
> Meanwhile I'll poke around on linux and see if I can figure out
> what might be happening.
I did find a problem. Looks like I assumed some things were already
64 bits when they were not. This patch should help:
Index: daemon.c
===================================================================
--- daemon.c (revision 10726)
+++ daemon.c (working copy)
@@ -108,12 +108,12 @@
struct statvfs s;
if (statvfs(".", &s) < 0)
return 0; /* assume not */
- avail_bytes = s.f_frsize*s.f_bavail;
+ avail_bytes = (uint64_t) s.f_frsize * (uint64_t) s.f_bavail;
#else
struct statfs s;
if (statfs(".", &s) < 0)
return 0; /* assume not */
- avail_bytes = s.f_bsize*s.f_bavail;
+ avail_bytes = (uint64_t) s.f_bsize * (uint64_t) s.f_bavail;
#endif
if (avail_bytes < minfree_bytes)
return 1;
More information about the dsc
mailing list