*
env,
const char* arg,
const char* val)
57e_s =
env&& *
env? strlen(
env) + 1 : 0;
58a_s = arg && *arg ? strlen(arg) + 1 : 0;
59v_s = a_s &&
val? strlen(
val) + 1 : 0;
60 size=
sizeof(*host_info) + hinfo_size;
64memcpy((
char*) host_info +
sizeof(*host_info), hinfo, hinfo_size);
65s = (
char*) host_info +
size;
67host_info->
env= (
const char*) memcpy(s,
env, e_s);
71host_info->
arg= (
const char*) memcpy(s, arg, a_s);
75host_info->
val= (
const char*) memcpy(s,
val, v_s);
85 returnhost_info->
addr;
124memset(memusage, 0, 5 *
sizeof(memusage[0]));
134memset(params, 0,
sizeof(*params));
144memset(ports, 0,
count*
sizeof(ports[0]));
154memset(lavg, 0, 2 *
sizeof(lavg[0]));
164memset(status, 0, 2 *
sizeof(status[0]));
175 returnhost_info->
env;
183 returnhost_info->
arg;
191 returnhost_info->
val;
const char * HINFO_AffinityArgvalue(const HOST_INFO host_info)
Obtain the affinity argument's value that has keyed the service selection (if argument affinities hav...
int HINFO_LoadAverage(const HOST_INFO host_info, double lavg[2])
Obtain host load averages.
int HINFO_Memusage(const HOST_INFO host_info, double memusage[5])
Get memory usage data.
unsigned int HINFO_HostAddr(const HOST_INFO host_info)
Get the official host address.
int HINFO_CpuUnits(const HOST_INFO host_info)
Get physical CPU count (number of physical cores, not packages).
int HINFO_CpuCount(const HOST_INFO host_info)
Get CPU count (number of logical cores, hyper-threaded included).
const char * HINFO_AffinityArgument(const HOST_INFO host_info)
Obtain the affinity argument that has keyed the service selection (if argument affinities have been u...
double HINFO_CpuClock(const HOST_INFO host_info)
Get CPU clock rate.
int HINFO_Status(const HOST_INFO host_info, double status[2])
Obtain LB host availability status.
int HINFO_TaskCount(const HOST_INFO host_info)
Get task count.
int HINFO_PortUsage(const HOST_INFO host_info, SHINFO_PortUsage ports[], size_t count)
Obtain host port usage (currently only 4 first ports are published).
const char * HINFO_Environment(const HOST_INFO host_info)
Obtain and return LB host environment.
int HINFO_MachineParams(const HOST_INFO host_info, SHINFO_Params *params)
Get host parameters.
const struct ncbi::grid::netcache::search::fields::SIZE size
HOST_INFO HINFO_Create(unsigned int addr, const void *hinfo, size_t hinfo_size, const char *env, const char *arg, const char *val)
int LBSM_HINFO_Status(const HOST_INFO hinfo, double status[2])
double LBSM_HINFO_CpuClock(const HOST_INFO hinfo)
int LBSM_HINFO_PortUsage(const HOST_INFO hinfo, SHINFO_PortUsage ports[], size_t count)
int LBSM_HINFO_Memusage(const HOST_INFO hinfo, double memusage[5])
int LBSM_HINFO_TaskCount(const HOST_INFO hinfo)
int LBSM_HINFO_LoadAverage(const HOST_INFO hinfo, double lavg[2])
int LBSM_HINFO_CpuCount(const HOST_INFO hinfo)
int LBSM_HINFO_CpuUnits(const HOST_INFO hinfo)
int LBSM_HINFO_MachineParams(const HOST_INFO hinfo, SHINFO_Params *p)
voidp calloc(uInt items, uInt size)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4