1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

param: add "smbd profiling level" option

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2014-10-09 12:56:28 +00:00 committed by Jeremy Allison
parent cfb12b11ce
commit 66173dd987
4 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,16 @@
<samba:parameter name="smbd profiling level"
context="G"
type="enum"
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
<description>
<para>
This parameter allows the administrator to enable profiling support.
</para>
<para>
Possible values are <constant>off</constant>,
<constant>count</constant> and <constant>on</constant>.
</para>
</description>
<value type="default">off</value>
<value type="example">on</value>
</samba:parameter>

View File

@ -2634,6 +2634,8 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
lpcfg_do_global_parameter(lp_ctx, "keepalive", "300");
lpcfg_do_global_parameter(lp_ctx, "smbd profiling level", "off");
lpcfg_do_global_parameter(lp_ctx, "winbind cache time", "300");
lpcfg_do_global_parameter(lp_ctx, "level2 oplocks", "yes");

View File

@ -174,6 +174,10 @@ static const struct enum_list enum_config_backend[] = {
{-1, NULL}
};
static const struct enum_list enum_smbd_profiling_level[] = {
{0, "off"}, {1, "count"}, {2, "on"}, {-1, NULL}
};
/* ADS kerberos ticket verification options */
@ -1509,6 +1513,15 @@ struct parm_struct parm_table[] = {
.enum_list = NULL,
.flags = FLAG_ADVANCED,
},
{
.label = "smbd profiling level",
.type = P_ENUM,
.p_class = P_GLOBAL,
.offset = GLOBAL_VAR(smbd_profiling_level),
.special = NULL,
.enum_list = enum_smbd_profiling_level,
.flags = FLAG_ADVANCED,
},
{
.label = "profile acls",
.type = P_BOOL,

View File

@ -688,6 +688,7 @@ static void init_globals(struct loadparm_context *lp_ctx, bool reinit_globals)
Globals.passwd_chat_timeout = 2; /* 2 second default. */
Globals.nt_pipe_support = true; /* Do NT pipes by default. */
Globals.nt_status_support = true; /* Use NT status by default. */
Globals.smbd_profiling_level = 0;
Globals.stat_cache = true; /* use stat cache by default */
Globals.max_stat_cache_size = 256; /* 256k by default */
Globals.restrict_anonymous = 0;