>>> On 11/24/2008 at 3:47 PM, in message <[EMAIL PROTECTED]>, Ofer Inbar <[EMAIL PROTECTED]> wrote: >> > I tried feeding one of my custom metrics by hand: >> > [root ~]$ gmetric --name net_smtp_fin_wait2_out --value 0 --type uint8 >> > --units >> > 'connections' >> > /etc/ganglia/gmond.conf:94: failed to determine the temp dir >> > Parse error for '/etc/ganglia/gmond.conf' >> > >> > Then, I cd'ed over to a filesystem that is still in read/write mode: >> > [root /otherfilesys]$ gmetric --name net_smtp_fin_wait2_out --value 0 >> > --type > uint8 >> > --units 'connections' >> > >> > No error, and it worked. >> > >> > What's the dependency that causes gmetric to require that the >> > filesystem the CWD is on be writeable? Does it really need that >> > dependency? It's great that Ganglia is so robust in the face of >> > failures, but it'd be even better if gmetric were also as robust. > > Someone wrote me to suggest running it with strace, which is an > obvious thing to do but unfortunately I didn't think of it at the time > of the failure (it was late at night). However, Brad knows the answer: > > Brad Nicholes <[EMAIL PROTECTED]> wrote: >> Both gmetric and gmond read the same .conf file. If the .conf file >> has an include() statement that specifies a wildcard file path, >> processing the wildcard path requires a temp directory. If you > > Removing the wildcard doesn't seem ideal, since it's something one > might want to use and it's part of the standard config, so removing > it and then forgetting that seems like a likely cause of confusion. > Also, most people would never think to investigate something that's > in the supplied conf file and doesn't seem to cause harm. If we want > robustness in the face of failure, having gmetric and gmond able to > run without having to write to disk sounds like a better goal. Is > it doable? > > Why does it need to write to a temp directory to process a wildcard? > > Are there any other parts of gmond or gmetric that depend on being > able to write to disk? It seems that both of these programs should be > able to avoid writing to disk entirely (except for swap/paging space > on a memory-starved host). > -- Cos
It needs a temp directory to get around some issues with libconfuse. Libconfuse doesn't actually support wildcard paths or files. A libconfuse include statement must have a full path to the file that it is going include. So gmond makes up for this problem by creating a temp file, resolving all of the file paths and names and then writing them as separate includes in a temp file. Then it tells libconfuse to include the temp file directly. Without the ability to resolve the wildcard paths and write them to a temp file, the wildcarding feature of gmond wouldn't work. To solve the problem that you are describing, we would have to actually add wildcard capability to libconfuse. Brad ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ganglia-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ganglia-general

