DEF(SET_SIZE, config_cache_size),
DEF(SET_BOOL, version_ignore),
DEF(SET_BOOL, shutdown_clients),
+ DEF(SET_BOOL, verbose_proctitle),
SETTING_DEFINE_LIST_END
};
.syslog_facility = "mail",
.config_cache_size = 1024*1024,
.version_ignore = FALSE,
- .shutdown_clients = TRUE
+ .shutdown_clients = TRUE,
+ .verbose_proctitle = FALSE
};
const struct setting_parser_info master_service_setting_parser_info = {
uoff_t config_cache_size;
bool version_ignore;
bool shutdown_clients;
+ bool verbose_proctitle;
};
struct master_service_settings_input {
ssize_t ret;
bool important_update;
+ if ((service->flags & MASTER_SERVICE_FLAG_UPDATE_PROCTITLE) != 0 &&
+ service->set != NULL && service->set->verbose_proctitle) T_BEGIN {
+ unsigned int used_count = service->total_available_count -
+ service->master_status.available_count;
+
+ process_title_set(t_strdup_printf("[%u connections]",
+ used_count));
+ } T_END;
+
important_update = master_status_update_is_important(service);
if (service->master_status.pid == 0 ||
service->master_status.available_count ==
/* Use MASTER_LOGIN_NOTIFY_FD to track login overflow state */
MASTER_SERVICE_FLAG_TRACK_LOGIN_STATE = 0x40,
/* If master sends SIGINT, don't die even if we don't have clients */
- MASTER_SERVICE_FLAG_NO_IDLE_DIE = 0x80
+ MASTER_SERVICE_FLAG_NO_IDLE_DIE = 0x80,
+ /* Show number of connections in process title
+ (only if verbose_proctitle setting is enabled) */
+ MASTER_SERVICE_FLAG_UPDATE_PROCTITLE = 0x100
};
struct master_service_connection {