mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-06 05:31:44 +00:00
+1
-1
@@ -225,7 +225,7 @@ struct uwsgi_metric *uwsgi_register_metric_do(char *name, char *oid, uint8_t val
|
||||
}
|
||||
|
||||
metric = uwsgi_calloc(sizeof(struct uwsgi_metric));
|
||||
// always make a copy of the name (se we can use stack for building strings)
|
||||
// always make a copy of the name (so we can use stack for building strings)
|
||||
metric->name = uwsgi_str(name);
|
||||
metric->name_len = strlen(metric->name);
|
||||
|
||||
|
||||
+1
-1
@@ -209,7 +209,7 @@ void manage_snmp(int fd, uint8_t * buffer, int size, struct sockaddr_in *client_
|
||||
|
||||
oid_part[0] = *ptr;
|
||||
|
||||
// old style SNMP metrics
|
||||
// old-style SNMP metrics
|
||||
if (oid_part[0] == 1 || oid_part[0] == 2) {
|
||||
ptr++;
|
||||
|
||||
|
||||
+4
-4
@@ -225,7 +225,7 @@ static struct uwsgi_option uwsgi_base_options[] = {
|
||||
{"vassals-set", required_argument, 0, "automatically set the specified option (via --set) for every vassal", uwsgi_opt_add_string_list, &uwsgi.vassals_set, 0},
|
||||
{"vassal-set", required_argument, 0, "automatically set the specified option (via --set) for every vassal", uwsgi_opt_add_string_list, &uwsgi.vassals_set, 0},
|
||||
|
||||
{"heartbeat", required_argument, 0, "announce healtness to the emperor", uwsgi_opt_set_int, &uwsgi.heartbeat, 0},
|
||||
{"heartbeat", required_argument, 0, "announce healthiness to the emperor", uwsgi_opt_set_int, &uwsgi.heartbeat, 0},
|
||||
|
||||
{"reload-mercy", required_argument, 0, "set the maximum time (in seconds) we wait for workers and other processes to die during reload/shutdown", uwsgi_opt_set_int, &uwsgi.reload_mercy, 0},
|
||||
{"worker-reload-mercy", required_argument, 0, "set the maximum time (in seconds) a worker can take to reload/shutdown (default is 60)", uwsgi_opt_set_int, &uwsgi.worker_reload_mercy, 0},
|
||||
@@ -519,9 +519,9 @@ static struct uwsgi_option uwsgi_base_options[] = {
|
||||
{"metric", required_argument, 0, "add a custom metric", uwsgi_opt_add_string_list, &uwsgi.additional_metrics, UWSGI_OPT_METRICS|UWSGI_OPT_MASTER},
|
||||
{"metric-threshold", required_argument, 0, "add a metric threshold/alarm", uwsgi_opt_add_string_list, &uwsgi.metrics_threshold, UWSGI_OPT_METRICS|UWSGI_OPT_MASTER},
|
||||
{"metric-alarm", required_argument, 0, "add a metric threshold/alarm", uwsgi_opt_add_string_list, &uwsgi.metrics_threshold, UWSGI_OPT_METRICS|UWSGI_OPT_MASTER},
|
||||
{"metrics-dir", required_argument, 0, "exports metrics as text files in the specified directory", uwsgi_opt_set_str, &uwsgi.metrics_dir, UWSGI_OPT_METRICS|UWSGI_OPT_MASTER},
|
||||
{"metrics-dir", required_argument, 0, "export metrics as text files to the specified directory", uwsgi_opt_set_str, &uwsgi.metrics_dir, UWSGI_OPT_METRICS|UWSGI_OPT_MASTER},
|
||||
{"metrics-dir-restore", no_argument, 0, "restore last value taken from the metrics dir", uwsgi_opt_true, &uwsgi.metrics_dir_restore, UWSGI_OPT_METRICS|UWSGI_OPT_MASTER},
|
||||
{"metric-dir", required_argument, 0, "exports metrics as text files in the specified directory", uwsgi_opt_set_str, &uwsgi.metrics_dir, UWSGI_OPT_METRICS|UWSGI_OPT_MASTER},
|
||||
{"metric-dir", required_argument, 0, "export metrics as text files to the specified directory", uwsgi_opt_set_str, &uwsgi.metrics_dir, UWSGI_OPT_METRICS|UWSGI_OPT_MASTER},
|
||||
{"metric-dir-restore", no_argument, 0, "restore last value taken from the metrics dir", uwsgi_opt_true, &uwsgi.metrics_dir_restore, UWSGI_OPT_METRICS|UWSGI_OPT_MASTER},
|
||||
|
||||
{"udp", required_argument, 0, "run the udp server on the specified address", uwsgi_opt_set_str, &uwsgi.udp_socket, UWSGI_OPT_MASTER},
|
||||
@@ -2823,7 +2823,7 @@ unsafe:
|
||||
// set a default request structure (for loading apps...)
|
||||
uwsgi.wsgi_req = &uwsgi.workers[0].cores[0].req;
|
||||
|
||||
// ok, let's inizialize the metrics subsystem
|
||||
// ok, let's initialize the metrics subsystem
|
||||
uwsgi_setup_metrics();
|
||||
|
||||
// cores are allocated, lets allocate logformat (if required)
|
||||
|
||||
@@ -53,7 +53,7 @@ static struct uwsgi_option carbon_options[] = {
|
||||
{"carbon-name-resolve", no_argument, 0, "allow using hostname as carbon server address (default disabled)", uwsgi_opt_true, &u_carbon.resolve_hostname, 0},
|
||||
{"carbon-resolve-names", no_argument, 0, "allow using hostname as carbon server address (default disabled)", uwsgi_opt_true, &u_carbon.resolve_hostname, 0},
|
||||
{"carbon-idle-avg", required_argument, 0, "average values source during idle period (no requests), can be \"last\", \"zero\", \"none\" (default is last)", uwsgi_opt_set_str, &u_carbon.idle_avg, 0},
|
||||
{"carbon-use-metrics", no_argument, 0, "don't compute all statistics, use metrics subsystem data instead (warning! key names will be different", uwsgi_opt_true, &u_carbon.use_metrics, 0},
|
||||
{"carbon-use-metrics", no_argument, 0, "don't compute all statistics, use metrics subsystem data instead (warning! key names will be different)", uwsgi_opt_true, &u_carbon.use_metrics, 0},
|
||||
{0, 0, 0, 0, 0, 0, 0},
|
||||
|
||||
};
|
||||
|
||||
@@ -127,7 +127,7 @@ static void greenlet_init_apps(void) {
|
||||
// map wsgi_req to greenlet object
|
||||
uwsgi.current_wsgi_req = uwsgi_greenlet_current_wsgi_req;
|
||||
|
||||
// blindy call it as the stackless gil engine is already set
|
||||
// blindly call it as the stackless gil engine is already set
|
||||
UWSGI_GET_GIL
|
||||
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ void uwsgi_opt_https2(char *opt, char *value, void *cr) {
|
||||
|
||||
#ifdef UWSGI_SPDY
|
||||
spdyerror:
|
||||
uwsgi_log("unable to inizialize SPDY settings buffers\n");
|
||||
uwsgi_log("unable to initialize SPDY settings buffers\n");
|
||||
exit(1);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ int init_uwsgi_app(int loader, void *arg1, struct wsgi_request *wsgi_req, PyThre
|
||||
PyThreadState_Swap(wi->interpreter);
|
||||
init_pyargv();
|
||||
|
||||
// we need to inizialize an embedded module for every interpreter
|
||||
// we need to initialize an embedded module for every interpreter
|
||||
init_uwsgi_embedded_module();
|
||||
init_uwsgi_vars();
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ static void rrdtool_post_init() {
|
||||
|
||||
if (!u_rrd.create) return;
|
||||
|
||||
// do not waste time if no --rrdtool option is defiend
|
||||
// do not waste time if no --rrdtool option is defined
|
||||
if (!u_rrd.directory) return;
|
||||
|
||||
if (!u_rrd.freq) u_rrd.freq = 300;
|
||||
|
||||
@@ -94,7 +94,7 @@ static void stackless_init_apps(void) {
|
||||
up.gil_release = gil_stackless_release;
|
||||
}
|
||||
|
||||
// blindy call it as the stackless gil engine is already set
|
||||
// blindly call it as the stackless gil engine is already set
|
||||
UWSGI_GET_GIL
|
||||
|
||||
usl.sl = uwsgi_malloc( sizeof(PyTaskletObject *) * uwsgi.async );
|
||||
|
||||
Reference in New Issue
Block a user