mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
rndc trace now takes an optional level parameter.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: server.h,v 1.50 2001/01/29 07:08:41 marka Exp $ */
|
||||
/* $Id: server.h,v 1.51 2001/02/07 00:50:43 bwelling Exp $ */
|
||||
|
||||
#ifndef NAMED_SERVER_H
|
||||
#define NAMED_SERVER_H 1
|
||||
@@ -141,4 +141,10 @@ ns_server_dumpstats(ns_server_t *server);
|
||||
isc_result_t
|
||||
ns_server_dumpdb(ns_server_t *server);
|
||||
|
||||
/*
|
||||
* Change or increment the server debug level.
|
||||
*/
|
||||
isc_result_t
|
||||
ns_server_setdebuglevel(ns_server_t *server, char *args);
|
||||
|
||||
#endif /* NAMED_SERVER_H */
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: omapi.c,v 1.31 2001/02/06 23:57:13 bwelling Exp $ */
|
||||
/* $Id: omapi.c,v 1.32 2001/02/07 00:50:40 bwelling Exp $ */
|
||||
|
||||
/*
|
||||
* Principal Author: DCL
|
||||
@@ -114,9 +114,7 @@ control_setvalue(omapi_object_t *handle, omapi_string_t *name,
|
||||
ns_server_dumpdb(ns_g_server);
|
||||
result = ISC_R_SUCCESS;
|
||||
} else if (omapi_string_strcmp(name, NS_OMAPI_COMMAND_TRACE) == 0) {
|
||||
ns_g_debuglevel++;
|
||||
isc_log_setdebuglevel(ns_g_lctx, ns_g_debuglevel);
|
||||
result = ISC_R_SUCCESS;
|
||||
result = ns_server_setdebuglevel(ns_g_server, args);
|
||||
} else if (omapi_string_strcmp(name, NS_OMAPI_COMMAND_NOTRACE) == 0) {
|
||||
ns_g_debuglevel = 0;
|
||||
isc_log_setdebuglevel(ns_g_lctx, ns_g_debuglevel);
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: server.c,v 1.288 2001/02/01 21:29:41 marka Exp $ */
|
||||
/* $Id: server.c,v 1.289 2001/02/07 00:50:41 bwelling Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -2459,3 +2459,29 @@ ns_server_dumpdb(ns_server_t *server) {
|
||||
(void)isc_stdio_close(fp);
|
||||
return (result);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
ns_server_setdebuglevel(ns_server_t *server, char *args) {
|
||||
char *ptr;
|
||||
char *levelstr;
|
||||
char *endp;
|
||||
unsigned int newlevel;
|
||||
|
||||
/* Skip the command name. */
|
||||
ptr = next_token(&args, " \t");
|
||||
if (ptr == NULL)
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
|
||||
/* Look for the new level name. */
|
||||
levelstr = next_token(&args, " \t");
|
||||
if (levelstr == NULL)
|
||||
ns_g_debuglevel++;
|
||||
else {
|
||||
newlevel = strtol(levelstr, &endp, 10);
|
||||
if (*endp != '\0' || newlevel < 0 || newlevel > 99)
|
||||
return (ISC_R_RANGE);
|
||||
ns_g_debuglevel = newlevel;
|
||||
}
|
||||
isc_log_setdebuglevel(ns_g_lctx, ns_g_debuglevel);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rndc.c,v 1.39 2001/02/06 23:57:16 bwelling Exp $ */
|
||||
/* $Id: rndc.c,v 1.40 2001/02/07 00:50:44 bwelling Exp $ */
|
||||
|
||||
/*
|
||||
* Principal Author: DCL
|
||||
@@ -271,6 +271,7 @@ command is one of the following:\n\
|
||||
stop Save pending updates to master files and stop the server.\n\
|
||||
halt Stop the server without saving pending updates.\n\
|
||||
trace Increment debugging level by one.\n\
|
||||
trace level Change the debugging level.\n\
|
||||
notrace Set debugging level to 0.\n\
|
||||
*status Display ps(1) status of named.\n\
|
||||
*restart Restart the server.\n\
|
||||
|
Reference in New Issue
Block a user