[OpenAFS] Re: Continuing problems with aklog on Mac OS X (rc10), internal state confused?

Marcus Watts mdw@umich.edu
Tue, 04 Apr 2006 05:29:25 -0400


Adam Megacz <megacz@cs.berkeley.edu> (who seems to believe
only spammers send private mail) writes:
> To: openafs-info@openafs.org
> From: Adam Megacz <megacz@cs.berkeley.edu>
> Message-ID:  <x3vetpbuq1.fsf@nowhere.com>
> Subject: [OpenAFS] Re: Continuing problems with aklog on Mac OS X (rc10), internal
>  state confused?
> Date: Tue, 04 Apr 2006 01:39:18 -0700
> 
> 
> Derrick J Brashear <shadow@dementia.org> writes:
> >>> i'd guess you are getting bad afsdb replies, but tcpdump will say for sure
> 
> >> Hrm, but why would restarting OpenAFS change the badness of the DNS
> >> requests I'm getting?
> 
> > Once AFS has bad information I assume it persists until expiry or
> > restart, one bad answer would screw you for a while.
> 
> > I'll admit I'm guessing.
> 
> Hey, better than nothing!
> 
> I've instrumented the hell out of afsconf_GetAfsdbInfo() so I can
> catch it "red handed" next time this happens (I am quite determined to
> figure this out).
> 
> One question, though: what is the preferred method for emitting debug
> info in cellconfig.c on Mac OS X?  fprintf(stderr)?  Where is that
> sent to?
> 
> Thanks,
> 
>   - a

cellconfig.c is only used by user mode code.  fprintf(stderr
or syslog will work.  There is one place where this intersects
with the cache manager -- afsd.  It's likely that afsd's stderr
doesn't point anywhere useful, unless you run it specially.
Since you're only going to use this for debugging that might not
be a problem.

You may instead be wanting to instrument
afs/afs_dynroot.c or afs/afs_cell.c .  This run as part of
the cache manager, nearly always inside the kernel (except
for ms windows).  Inside the kernel, printf or uprintf usually work.
printf would go to the machine console (probably nowhere on macos,
but might show up in syslog); uprintf would go to the user's tty
(same place as writing /dev/tty from userland).  You do Not want
to send much chit-chat this way.

There used to be an "afs_MarinerLog" call for the cache manager; looks
like it's at least some of the logic is still there.  "fs mariner" turns
it on.

				-Marcus