From bf46cfd1870ade3982c2ce2cfbae1299e1fda8d0 Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Mon, 15 Aug 2005 08:05:29 +0000 Subject: [PATCH] * libamu/xutil.c: debug_flags should be unsigned. (dbg_opt): fix comments for updated debug_flags, add "defaults". (debug_option): Don't allow "immutable" (D_IMMUTABLE) flags to be changed, because they could mess Amd's state and only make sense to be set once when Amd starts. Currently these immutable flags are "daemon," "fork," "amq," and "mtab." If Amd not compiled with debugging, set default "control" options (daemon,fork,amq). (unregister_amq): proper use of D_AMQ. * include/am_utils.h: define new D_BASIC, D_CONTROL, D_DEFAULT, D_IMMUTABLE, and D_MASK. Updated definitions of D_ALL and D_TEST. debug_flags extern should be unsigned. * scripts/amd.conf-sample (debug_options): mention new "defaults" option. * scripts/amd.conf.5,doc/am-utils.texi: document new debug option "defaults" and properly explain the corrected meanings of "daemon," "fork," "amq," and their "no" inversions. Better explain "all" and "test" too. Correct default debug_mtab file to /tmp/mtab. * hlfsd/stubs.c (nfsproc_readlink_2_svc): proper use of D_FORK. * hlfsd/homedir.c (homedir): proper use of D_FORK. * hlfsd/hlfsd.c (main, hlfsd_init, cleanup): proper use of D_DAEMON. * amd/nfs_start.c (mount_automounter): proper use of D_AMQ. * amd/amd.h (DEBUG_MNTTAB_FILE): change default to /tmp/mtab, which is more common on more systems (instead of /tmp/mnttab). * amd/amd.c (main): properly use D_DAEMON. --- ChangeLog | 38 +++++++++++++++++++++++++ NEWS | 47 ++++++++++++++++++++++++++++--- amd/amd.c | 2 +- amd/amd.h | 2 +- amd/nfs_start.c | 8 +++--- doc/am-utils.texi | 34 ++++++++++++----------- hlfsd/hlfsd.c | 22 +++++++-------- hlfsd/homedir.c | 5 ++-- hlfsd/stubs.c | 7 +++-- include/am_utils.h | 61 +++++++++++++++++++++++++---------------- libamu/xutil.c | 42 +++++++++++++++++++++------- scripts/amd.conf-sample | 4 +-- scripts/amd.conf.5 | 7 +++-- 13 files changed, 199 insertions(+), 80 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4065f1d..f9137ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,41 @@ +2005-08-15 Erez Zadok + + * libamu/xutil.c: debug_flags should be unsigned. + (dbg_opt): fix comments for updated debug_flags, add "defaults". + (debug_option): Don't allow "immutable" (D_IMMUTABLE) flags to be + changed, because they could mess Amd's state and only make sense + to be set once when Amd starts. Currently these immutable flags + are "daemon," "fork," "amq," and "mtab." If Amd not compiled with + debugging, set default "control" options (daemon,fork,amq). + (unregister_amq): proper use of D_AMQ. + + * include/am_utils.h: define new D_BASIC, D_CONTROL, D_DEFAULT, + D_IMMUTABLE, and D_MASK. Updated definitions of D_ALL and D_TEST. + debug_flags extern should be unsigned. + + * scripts/amd.conf-sample (debug_options): mention new "defaults" + option. + + * scripts/amd.conf.5,doc/am-utils.texi: document new debug option + "defaults" and properly explain the corrected meanings of + "daemon," "fork," "amq," and their "no" inversions. Better + explain "all" and "test" too. Correct default debug_mtab file to + /tmp/mtab. + + * hlfsd/stubs.c (nfsproc_readlink_2_svc): proper use of D_FORK. + + * hlfsd/homedir.c (homedir): proper use of D_FORK. + + * hlfsd/hlfsd.c (main, hlfsd_init, cleanup): proper use of + D_DAEMON. + + * amd/nfs_start.c (mount_automounter): proper use of D_AMQ. + + * amd/amd.h (DEBUG_MNTTAB_FILE): change default to /tmp/mtab, + which is more common on more systems (instead of /tmp/mnttab). + + * amd/amd.c (main): properly use D_DAEMON. + 2005-08-14 Erez Zadok * libamu/xutil.c (xlog_opt): define new pseudo log_option named diff --git a/NEWS b/NEWS index a02b2d9..5ef533b 100644 --- a/NEWS +++ b/NEWS @@ -1,8 +1,18 @@ *** Notes specific to am-utils version 6.2a1 +XXX: Ezk: does it compile and run w/o --with-debug, with all of the new +"daemonize" stuff? + XXX: Dan, document sun_map_syntax flag in more detail in am-utils.texi and (more briefly) in amd.conf.5. And in this NEWS file, also briefly. +Amd now understands a new log_option called "defaults" which is synonymous +with "fatal,error,user,warning,info" (and is also what logging happens by +default). + +Amd now understands a new debug_option called "defaults" which is synonymous +with "all,nohrtime,nomtab,noxdrtrace". + Changed slightly how Amd behaves when you try to change log_options after Amd started (options can be turned on/off via "amq -x ARG"). It used to be that Amd won't let you turn off options which were on when Amd started. @@ -14,9 +24,38 @@ remain small, but they are important to keep on, so Amd can report serious problems (including errors relating to incorrectly setting other log options). -Amd now understands a new log_option called "defaults" which is synonymous -with "fatal,error,user,warning,info" (and is also what logging happens by -default). +Changed the misleading inverted logic of certain debug_options: + +1. "xdrtrace" is included in "all" because "all" (as the name implies), + *all* options, not just a subset. If you want the old behavior of "all" + then use "defaults" (all only adds "xdrtrace" which can be chatty only + some systems). + +2. Certain debug options are hereby declared immutable: they may not be + changed by "amq -D" after Amd starts, because it doesn't make much sense + to change them after Amd starts, and it could really mess up Amd. These + immutable flags are currently "daemon," "fork," "amq," and "mtab." + +3. the debug option "daemon" *will* cause Amd to daemonize. Before, it was + causing Amd NOT to daemonize. This was greatly confusing, especially + since the code, documentation, and comments often conflicted with each + other. If you don't want Amd to daemonize, which is useful for debugging + it, then use the debug option "nodaemon" -- it makes a lot more sense. + +4. Similarly, the "fork" option *will* cause Hlfsd to fork. Use "nofork" if + you don't want Hlfsd to fork. This option is only applicable to Hlfsd. + +5. Similarly, the "amq" option, which is now on by default, will cause Amd + to register itself with the RPC portmapper (for Amq), as is done + normally. If you don't want Amd to register with the portmapper, use + "noamq" -- this naming convention makes more sense. This was also + confusingly documented and coded in places. + + Note: unfortunately, these changes to the "daemon," "fork," and "amq" + debug options may be incompatible with people's previous use of Amd. + Sorry, but we have to fix those old problems sooner or later. However, + if you never set any debug_options, or you used to "all," then you won't + be affected by the change in meaning of these three flags. *** Notes specific to am-utils version 6.1.1 @@ -224,7 +263,7 @@ version (10.3.x) than uname(3) reports. Useful with firewalls and NAT'ed environments. - new amd.conf option "debug_mtab_file". Allows user to define the mtab - file during debug-mtab mode. The default path is "/tmp/mnttab". + file during debug-mtab mode. The default path is "/tmp/mtab". - new function selector xhost(ARG) which will match ARG against the current host name. This works even if ARG is a CNAME (unlike the host==ARG diff --git a/amd/amd.c b/amd/amd.c index 0c2bdf9..3231444 100644 --- a/amd/amd.c +++ b/amd/amd.c @@ -542,7 +542,7 @@ main(int argc, char *argv[]) } #endif /* HAVE_MAP_NIS */ - if (!amuDebug(D_DAEMON)) + if (amuDebug(D_DAEMON)) ppid = daemon_mode(); /* diff --git a/amd/amd.h b/amd/amd.h index 790321f..f115fa0 100644 --- a/amd/amd.h +++ b/amd/amd.h @@ -54,7 +54,7 @@ * that support mtab on file. */ #ifdef MOUNT_TABLE_ON_FILE -# define DEBUG_MNTTAB_FILE "/tmp/mnttab" +# define DEBUG_MNTTAB_FILE "/tmp/mtab" #endif /* MOUNT_TABLE_ON_FILE */ /* Max line length that info services can handle */ diff --git a/amd/nfs_start.c b/amd/nfs_start.c index 193bb7f..04b458f 100644 --- a/amd/nfs_start.c +++ b/amd/nfs_start.c @@ -374,8 +374,8 @@ mount_automounter(int ppid) } sprintf(pid_fsname, "%s:(pid%ld,port%u)", am_get_hostname(), (long) am_mypid, nfs_port); - /* security: if user sets -D amq, don't even create listening socket */ - if (!amuDebug(D_AMQ)) { + /* security: if user sets -D noamq, don't even create listening socket */ + if (amuDebug(D_AMQ)) { ret = create_amq_service(&udp_soAMQ, &udp_amqp, &udp_amqncp, @@ -418,11 +418,11 @@ mount_automounter(int ppid) return 0; } - if (!amuDebug(D_AMQ)) { + if (amuDebug(D_AMQ)) { /* * Complete registration of amq (first TCP service then UDP) */ - unregister_amq(); + unregister_amq(); /* unregister leftover Amd, if any, just in case */ ret = amu_svc_register(tcp_amqp, get_amd_program_number(), AMQ_VERSION, amq_program_1, IPPROTO_TCP, tcp_amqncp); diff --git a/doc/am-utils.texi b/doc/am-utils.texi index 73e7277..2eb32aa 100644 --- a/doc/am-utils.texi +++ b/doc/am-utils.texi @@ -2948,13 +2948,17 @@ can be prefixed with @samp{no} to turn it off. @table @code @item all -all ``reasonable'' options (currently trace|str|full|mem|info|readdir) +all options (excluding hrtime and mtab) +@item defaults +``sensible'' default options (all--excluding hrtime, mtab, and xdrtrace) +@item test +full debug options plus mtab,nodaemon,nofork,noamq @item amq -do not register for amq +register @i{Amd} with the RPC portmapper, for @i{Amq} @item daemon -do not enter daemon mode +enter daemon mode @item fork -do not fork child worker (hlfsd only) +fork child worker (hlfsd only) @item full program trace @item hrtime @@ -2965,16 +2969,14 @@ print high resolution time stamps (only if @b{syslog}(3) is not used) info service specific debugging (hesiod, nis, etc.) In the case of hesiod maps, turns on the hesiod RES_DEBUG internal debugging option. @item mem -trace memory allocations. Needs to be explicitly enabled at compile +trace memory allocations. Needs to be explicitly enabled at compile time with --enable-debug=mem. @item mtab -use local @file{./mtab} file +use local mount-table file (defaults to @file{/tmp/mtab}, @pxref{debug_mtab_file Parameter}) @item readdir show readdir progress @item str debug string munging -@item test -full debug but no daemon @item trace trace RPC protocol and NFS mount arguments @item xdrtrace @@ -4410,14 +4412,14 @@ remain in the cache. (type=string, default no cluster). Same as the @code{-C} option to @i{Amd}. Specifies the alternate HP-UX cluster to use. -@c ---------------------------------------------------------------- -@node debug_mtab_file Parameter, debug_options Parameter, cluster Parameter, Global Parameters -@comment node-name, next, previous, up -@subsection @t{debug_mtab_file} Parameter -@cindex debug_mtab_file Parameter +@c ---------------------------------------------------------------- +@node debug_mtab_file Parameter, debug_options Parameter, cluster Parameter, Global Parameters +@comment node-name, next, previous, up +@subsection @t{debug_mtab_file} Parameter +@cindex debug_mtab_file Parameter -(type=string, default="/tmp/mnttab"). Path to mtab file that is used -by @i{Amd} to store a list of mounted file systems during debug-mtab mode. +(type=string, default="/tmp/mtab"). Path to mtab file that is used +by @i{Amd} to store a list of mounted file systems during debug-mtab mode. This option only applies to systems that store mtab information on disk. @c ---------------------------------------------------------------- @@ -5113,7 +5115,7 @@ restart_mounts = yes auto_dir = /n log_file = /var/log/amd log_options = all -#debug_options = all +#debug_options = defaults plock = no selectors_in_defaults = yes # config.guess picks up "sunos5" and I don't want to edit my maps yet diff --git a/hlfsd/hlfsd.c b/hlfsd/hlfsd.c index 8a164ba..eb510a2 100644 --- a/hlfsd/hlfsd.c +++ b/hlfsd/hlfsd.c @@ -438,10 +438,10 @@ main(int argc, char *argv[]) #endif /* not HAVE_SIGACTION */ /* - * In the parent, if -D daemon, we don't need to + * In the parent, if -D nodaemon, we don't need to * set this signal handler. */ - if (!amuDebug(D_DAEMON)) { + if (amuDebug(D_DAEMON)) { s = -99; while (stoplight != SIGUSR2) { plog(XLOG_INFO, "parent waits for child to setup (stoplight=%d)", stoplight); @@ -615,10 +615,10 @@ main(int argc, char *argv[]) plog(XLOG_INFO, "hlfsd ready to serve"); /* - * If asked not to fork a daemon (-D daemon), then hlfsd_init() + * If asked not to fork a daemon (-D nodaemon), then hlfsd_init() * will not run svc_run. We must start svc_run here. */ - if (amuDebug(D_DAEMON)) { + if (!amuDebug(D_DAEMON)) { plog(XLOG_DEBUG, "starting no-daemon debugging svc_run"); svc_run(); } @@ -645,9 +645,9 @@ hlfsd_init(void) hlfsd_init_filehandles(); /* - * If not -D daemon then we must fork. + * If -D daemon then we must fork. */ - if (!amuDebug(D_DAEMON)) + if (amuDebug(D_DAEMON)) child = fork(); if (child < 0) @@ -740,11 +740,11 @@ hlfsd_init(void) gettimeofday((struct timeval *) ((void *)&startup), (struct timezone *) NULL); /* - * If not -D daemon, then start serving here in the child, - * and the parent will exit. But if -D daemon, then + * If -D daemon, then start serving here in the child, + * and the parent will exit. But if -D nodaemon, then * skip this code and make sure svc_run is entered elsewhere. */ - if (!amuDebug(D_DAEMON)) { + if (amuDebug(D_DAEMON)) { /* * Dissociate from the controlling terminal */ @@ -832,7 +832,7 @@ cleanup(int signum) clock_valid = 0; /* invalidate logging clock */ - if (!amuDebug(D_DAEMON)) { + if (amuDebug(D_DAEMON)) { if (getpid() != masterpid) return; @@ -858,7 +858,7 @@ cleanup(int signum) break; } - if (!amuDebug(D_DAEMON)) { + if (amuDebug(D_DAEMON)) { plog(XLOG_INFO, "cleanup(): killing processes and terminating"); kill(masterpid, SIGKILL); kill(serverpid, SIGKILL); diff --git a/hlfsd/homedir.c b/hlfsd/homedir.c index 9a33e63..bef1d5a 100644 --- a/hlfsd/homedir.c +++ b/hlfsd/homedir.c @@ -135,9 +135,10 @@ homedir(int userid, int groupid) } /* - * only run this forking code if did not ask for -D fork + * Only run this forking code if ask for -D fork (default). + * Disable forking using -D nofork. */ - if (!amuDebug(D_FORK)) { + if (amuDebug(D_FORK)) { /* fork child to process request if none in progress */ if (found->child && kill(found->child, 0)) found->child = 0; diff --git a/hlfsd/stubs.c b/hlfsd/stubs.c index 0f1894f..28870a0 100644 --- a/hlfsd/stubs.c +++ b/hlfsd/stubs.c @@ -375,14 +375,15 @@ nfsproc_readlink_2_svc(am_nfs_fh *argp, struct svc_req *rqstp) retval = 0; /* - * If asked for -D fork, then must return the value, + * If asked for -D nofork, then must return the value, * NOT exit, or else the main hlfsd server exits. + * If -D fork (default), then we do want to exit from the process. * Bug: where is that status information being collected? */ if (amuDebug(D_FORK)) + exit(retval); + else return &res; - - exit(retval); } diff --git a/include/am_utils.h b/include/am_utils.h index 6d06244..badb9cd 100644 --- a/include/am_utils.h +++ b/include/am_utils.h @@ -396,30 +396,32 @@ extern int unregister_autofs_service(char *autofs_conftype); #ifdef DEBUG -# define D_ALL (~(D_MTAB|D_HRTIME|D_XDRTRACE|D_DAEMON|D_FORK|D_AMQ)) -# define D_DAEMON 0x0001 /* Don't enter daemon mode */ +# define D_DAEMON 0x0001 /* Enter daemon mode */ # define D_TRACE 0x0002 /* Do protocol trace */ # define D_FULL 0x0004 /* Do full trace */ # define D_MTAB 0x0008 /* Use local mtab */ -# define D_AMQ 0x0010 /* Don't register amq program */ +# define D_AMQ 0x0010 /* Register amq program */ # define D_STR 0x0020 /* Debug string munging */ # ifdef DEBUG_MEM # define D_MEM 0x0040 /* Trace memory allocations */ # else /* not DEBUG_MEM */ # define D_MEM 0x0000 /* Dummy */ # endif /* not DEBUG_MEM */ -# define D_FORK 0x0080 /* Don't fork server */ - /* info service specific debugging (hesiod, nis, etc) */ -# define D_INFO 0x0100 +# define D_FORK 0x0080 /* Fork server (hlfsd only) */ +# define D_INFO 0x0100 /* info service specific debugging (hesiod, nis, etc) */ # define D_HRTIME 0x0200 /* Print high resolution time stamps */ # define D_XDRTRACE 0x0400 /* Trace xdr routines */ # define D_READDIR 0x0800 /* Show browsable_dir progress */ - -/* - * Test mode is test mode: don't daemonize, don't register amq, don't fork, - * don't touch system mtab, etc. - */ -# define D_TEST (~(D_MEM|D_STR|D_XDRTRACE)) +/* debug option compositions */ +# define D_MASK 0x0fff /* mask of known flags */ +# define D_BASIC (D_TRACE|D_FULL|D_STR|D_MEM|D_INFO|D_XDRTRACE|D_READDIR) +# define D_CONTROL (D_DAEMON|D_AMQ|D_FORK) +/* immutable flags: cannot be changed via "amq -D" */ +# define D_IMMUTABLE (D_MTAB | D_CONTROL) +# define D_ALL (D_BASIC | D_CONTROL) +# define D_DEFAULT (D_MASK & D_ALL & ~D_XDRTRACE) +/* test mode: nodaemon, noamq, nofork, (local) mtab */ +# define D_TEST (D_BASIC | D_MTAB) # define amuDebug(x) (debug_flags & (x)) # define dlog if (amuDebug(D_FULL)) dplog @@ -451,27 +453,40 @@ extern void dplog(const char *fmt, ...) #else /* not DEBUG */ +/* set dummy flags to zero */ +# define D_DAEMON 0x0001 /* Enter daemon mode */ +# define D_TRACE 0x0000 /* dummy: Do protocol trace */ +# define D_FULL 0x0000 /* dummy: Do full trace */ +# define D_MTAB 0x0000 /* dummy: Use local mtab */ +# define D_AMQ 0x0010 /* Register amq program */ +# define D_STR 0x0000 /* dummy: Debug string munging */ +# define D_MEM 0x0000 /* dummy: Trace memory allocations */ +# define D_FORK 0x0080 /* Fork server (hlfsd only) */ +# define D_INFO 0x0000 /* dummy: info service debugging */ +# define D_HRTIME 0x0000 /* dummy: hi-res time stamps */ +# define D_XDRTRACE 0x0000 /* dummy: Trace xdr routines */ +# define D_READDIR 0x0000 /* dummy: browsable_dir progress */ +# define D_CONTROL (D_DAEMON|D_AMQ|D_FORK) +# define amuDebug(x) (debug_flags & (x)) /* * If not debugging, then also reset the pointer. * It's safer -- and besides, free() should do that anyway. */ -# define XFREE(x) do { free((voidp)x); x = NULL;} while (0) - -#define amuDebug(x) (0) +# define XFREE(x) do { free((voidp)x); x = NULL;} while (0) -#ifdef __GNUC__ -#define dlog(fmt...) -#else /* not __GNUC__ */ +# ifdef __GNUC__ +# define dlog(fmt...) +# else /* not __GNUC__ */ /* this define means that we CCP leaves code behind the (list,of,args) */ -#define dlog -#endif /* not __GNUC__ */ +# define dlog +# endif /* not __GNUC__ */ -#define print_nfs_args(nap, nfs_version) -#define debug_option(x) (1) +# define print_nfs_args(nap, nfs_version) +# define debug_option(x) (1) #endif /* not DEBUG */ -extern int debug_flags; /* Debug options */ +extern u_int debug_flags; /* Debug options */ extern struct opt_tab dbg_opt[]; /**************************************************************************/ diff --git a/libamu/xutil.c b/libamu/xutil.c index f28d09e..68fa153 100644 --- a/libamu/xutil.c +++ b/libamu/xutil.c @@ -59,7 +59,11 @@ static char am_hostname[MAXHOSTNAMELEN] = "unknown"; /* Hostname */ pid_t am_mypid = -1; /* process ID */ serv_state amd_state; /* amd's state */ int foreground = 1; /* 1 == this is the top-level server */ -int debug_flags = 0; +#ifdef DEBUG +u_int debug_flags = 0; +#else /* not DEBUG */ +u_int debug_flags = D_CONTROL; /* default when not compiled with debugging */ +#endif /* not DEBUG */ #ifdef HAVE_SYSLOG int syslogging; @@ -90,20 +94,20 @@ static void real_plog(int lvl, const char *fmt, va_list vargs) struct opt_tab dbg_opt[] = { {"all", D_ALL}, /* All non-disruptive options */ - {"amq", D_AMQ}, /* Don't register for AMQ program */ - {"daemon", D_DAEMON}, /* Don't enter daemon mode */ - {"fork", D_FORK}, /* Don't fork server */ + {"defaults", D_DEFAULT}, /* Default options */ + {"test", D_TEST}, /* Full debug - no daemon, no fork, no amq, local mtab */ + {"amq", D_AMQ}, /* Register for AMQ program */ + {"daemon", D_DAEMON}, /* Enter daemon mode */ + {"fork", D_FORK}, /* Fork server (hlfsd only) */ {"full", D_FULL}, /* Program trace */ #ifdef HAVE_CLOCK_GETTIME {"hrtime", D_HRTIME}, /* Print high resolution time stamps */ #endif /* HAVE_CLOCK_GETTIME */ - /* info service specific debugging (hesiod, nis, etc) */ - {"info", D_INFO}, + {"info", D_INFO}, /* info service specific debugging (hesiod, nis, etc) */ {"mem", D_MEM}, /* Trace memory allocations */ {"mtab", D_MTAB}, /* Use local mtab file */ {"readdir", D_READDIR}, /* Check on browsable_dirs progress */ {"str", D_STR}, /* Debug string munging */ - {"test", D_TEST}, /* Full debug - no daemon, no amq, local mtab */ {"trace", D_TRACE}, /* Protocol trace */ {"xdrtrace", D_XDRTRACE}, /* Trace xdr routines */ {NULL, 0} @@ -387,7 +391,25 @@ show_time_host_and_name(int lvl) int debug_option(char *opt) { - return cmdoption(opt, dbg_opt, &debug_flags); + u_int dl = debug_flags; + int rc = cmdoption(opt, dbg_opt, &dl); + + if (rc) /* if got any error, don't update debug flags */ + return EINVAL; + + /* + * Don't allow "immutable" flags to be changed, because they could mess + * Amd's state and only make sense to be set once when Amd starts. + */ + if (debug_flags != 0 && + (dl & D_IMMUTABLE) != (debug_flags & D_IMMUTABLE)) { + plog(XLOG_ERROR, "cannot change immutable debug flags"); + /* undo any attempted change to an immutable flag */ + dl = (dl & ~D_IMMUTABLE) | (debug_flags & D_IMMUTABLE); + } + debug_flags = dl; + + return rc; } @@ -651,7 +673,7 @@ switch_option(char *opt) * we must always be able to report on flag re/setting errors. */ if ((xl & XLOG_MANDATORY) != XLOG_MANDATORY) { - plog(XLOG_ERROR, "cannot turn of mandatory logging options"); + plog(XLOG_ERROR, "cannot turn off mandatory logging options"); xl |= XLOG_MANDATORY; } if (xlog_level != xl) @@ -832,7 +854,7 @@ switch_to_logfile(char *logfile, int old_umask, int truncate_log) void unregister_amq(void) { - if (!amuDebug(D_AMQ)) + if (amuDebug(D_AMQ)) /* find which instance of amd to unregister */ pmap_unset(get_amd_program_number(), AMQ_VERSION); } diff --git a/scripts/amd.conf-sample b/scripts/amd.conf-sample index a280694..ae491c1 100644 --- a/scripts/amd.conf-sample +++ b/scripts/amd.conf-sample @@ -58,8 +58,8 @@ nis_domain = nisDom-CS.columbia.edu # (amd -x) log_options = fatal,error,user,warn,info,map,stats,all # (amd -D) -debug_options = all,amq,daemon,fork,full,hrtime,info,mem,mtab,\ - str,readdir,test,trace,xdrtrace +debug_options = all,defaults,test,amq,daemon,fork,\ + full,hrtime,info,mem,mtab,str,readdir,trace,xdrtrace # path for mtab file during mtab debug mode debug_mtab_file = /tmp/mnttab # (amd -S) diff --git a/scripts/amd.conf.5 b/scripts/amd.conf.5 index 53568ca..e5d517f 100644 --- a/scripts/amd.conf.5 +++ b/scripts/amd.conf.5 @@ -256,7 +256,9 @@ meaning. You can get the list of supported debugging options by running Amd \-H. Possible values are: .nf -\fBall\fR all options +\fBall\fR all options (excludes hrtime and mtab) +\fBdefaults\fR "sensible" default options (all--excluding hrtime, mtab, and xdrtrace) +\fBtest\fR full debug options plus mtab,nodaemon,nofork,noamq \fBamq\fR register for amq \fBdaemon\fR enter daemon mode \fBfork\fR fork server @@ -264,10 +266,9 @@ meaning. You can get the list of supported debugging options by running Amd \fBhrtime\fR print high resolution time stamps (only if syslog(3) is not used) \fBinfo\fR info service specific debugging (hesiod, nis, etc.) \fBmem\fR trace memory allocations -\fBmtab\fR use local "./mtab" file +\fBmtab\fR use local "/tmp/mtab" file \fBreaddir\fR show browsable_dirs progress \fBstr\fR debug string munging -\fBtest\fR full debug but no daemon \fBtrace\fR trace protocol and NFS mount arguments \fBxdrtrace\fR trace XDR routines .fi -- 2.43.0