diff -ru zabbix-2.4.5/src/zabbix_server/escalator/escalator.c zabbix-2.4.5-patched/src/zabbix_server/escalator/escalator.c --- zabbix-2.4.5/src/zabbix_server/escalator/escalator.c 2015-04-22 03:56:00.000000000 -0400 +++ zabbix-2.4.5-patched/src/zabbix_server/escalator/escalator.c 2015-06-10 20:37:41.862282218 -0400 @@ -41,6 +41,7 @@ } ZBX_USER_MSG; +extern int CONFIG_ESCALATOR_FORKS; extern unsigned char process_type, daemon_type; extern int server_num, process_num; @@ -1382,7 +1383,7 @@ zabbix_log(LOG_LEVEL_DEBUG, "End of %s()", __function_name); } -static int process_escalations(int now, int *nextcheck) +static int process_escalations(int now, int *nextcheck, int procnum, int proccount) { const char *__function_name = "process_escalations"; DB_RESULT result; @@ -1401,7 +1402,8 @@ result = DBselect( "select escalationid,actionid,triggerid,eventid,r_eventid,nextcheck,esc_step,status,itemid" " from escalations" - " order by actionid,triggerid,itemid,escalationid"); + " where MOD(escalationid,%d)=%d" + " order by actionid,triggerid,itemid,escalationid", proccount, procnum - 1); *nextcheck = now + CONFIG_ESCALATOR_FREQUENCY; memset(&escalation, 0, sizeof(escalation)); @@ -1604,12 +1606,12 @@ { if (0 != sleeptime) { - zbx_setproctitle("%s [processed %d escalations in " ZBX_FS_DBL " sec, processing escalations]", + zbx_setproctitle("%s #%d [processed %d escalations in " ZBX_FS_DBL " sec, processing escalations]", get_process_type_string(process_type), old_escalations_count, old_total_sec); } sec = zbx_time(); - escalations_count += process_escalations(time(NULL), &nextcheck); + escalations_count += process_escalations(time(NULL), &nextcheck, process_num, CONFIG_ESCALATOR_FORKS); total_sec += zbx_time() - sec; sleeptime = calculate_sleeptime(nextcheck, CONFIG_ESCALATOR_FREQUENCY); @@ -1620,14 +1622,14 @@ { if (0 == sleeptime) { - zbx_setproctitle("%s [processed %d escalations in " ZBX_FS_DBL + zbx_setproctitle("%s #%d [processed %d escalations in " ZBX_FS_DBL " sec, processing escalations]", get_process_type_string(process_type), - escalations_count, total_sec); + process_num, escalations_count, total_sec); } else { - zbx_setproctitle("%s [processed %d escalations in " ZBX_FS_DBL " sec, idle %d sec]", - get_process_type_string(process_type), escalations_count, total_sec, + zbx_setproctitle("%s #%d [processed %d escalations in " ZBX_FS_DBL " sec, idle %d sec]", + get_process_type_string(process_type), process_num, escalations_count, total_sec, sleeptime); old_escalations_count = escalations_count; diff -ru zabbix-2.4.5/src/zabbix_server/server.c zabbix-2.4.5-patched/src/zabbix_server/server.c --- zabbix-2.4.5/src/zabbix_server/server.c 2015-04-22 03:56:00.000000000 -0400 +++ zabbix-2.4.5-patched/src/zabbix_server/server.c 2015-06-10 20:37:46.549336241 -0400 @@ -455,6 +455,8 @@ PARM_OPT, 0, 1000}, {"StartJavaPollers", &CONFIG_JAVAPOLLER_FORKS, TYPE_INT, PARM_OPT, 0, 1000}, + {"StartEscalators", &CONFIG_ESCALATOR_FORKS, TYPE_INT, + PARM_OPT, 1, 1000}, {"JavaGateway", &CONFIG_JAVA_GATEWAY, TYPE_STRING, PARM_OPT, 0, 0}, {"JavaGatewayPort", &CONFIG_JAVA_GATEWAY_PORT, TYPE_INT,