Example #1
0
void submit_disk_stats (cJSON* root, container_t* container) {
	unsigned long read = 0, write = 0;
	get_disk_stats (root, &write, &read, OPS);
	submit_derive2 ("disk_ops", (derive_t) read, (derive_t) write, container);
	
	get_disk_stats (root, &write, &read, BYTES);
	submit_derive2 ("disk_octets", (derive_t) read, (derive_t) write, container);
}
Example #2
0
static int	VFS_DEV_READ_OPERATIONS(const char *devname, AGENT_RESULT *result)
{
	zbx_uint64_t	value;

	if (SYSINFO_RET_OK != get_disk_stats(devname, NULL, NULL, &value, NULL))
		return SYSINFO_RET_FAIL;

	SET_UI64_RESULT(result, value);

	return SYSINFO_RET_OK;
}