26 #include <sys/types.h>
31 #define SOCAT "/usr/bin/socat"
35 #define SOCAT_INPUT "set weight https/s%d %d\r\n"
53 int dev_null = open(
"/dev/null", O_WRONLY);
54 dup2(dev_null, STDOUT_FILENO);
72 waitpid(pid, &status, 0);
77 #define N_QLEN_SAMPLES 10
107 n_reads[i] = -offset;
126 if (n_reads[i] >= 0) {
struct dfg_scheduling scheduling
Information about where an MSU is scheduled.
struct dfg_msu * instances[512]
Each instance of this MSU type.
int id
Unique identifier for the runtime.
Logging of status messages to the terminal.
struct dfg_runtime * runtime
The runtime on which an MSU is running.
#define log_error(fmt,...)
int runtime_fd(unsigned int runtime_id)
#define WEBSERVER_READ_MSU_TYPE_ID
void set_haproxy_weights(int rt_id, int offset)
int reweight_haproxy(int server, int weight)
int n_instances
The number of instances of this MSU type.
struct dfg_msu_type * get_dfg_msu_type(unsigned int id)
Returns the MSU type with the given ID.
#define MAX_RUNTIMES
The maximum number of runtimes that may be present in the DFG.