func testMetricCPU() {
	var response cpmserverapi.MetricCPUResponse
	var err error
	request := &cpmserverapi.MetricCPURequest{}
	response, err = cpmserverapi.MetricCPUClient("http://192.168.0.106:10001", request)
	if err != nil {
		fmt.Println(err.Error())
	}
	fmt.Println("returned " + response.Output)
}
//last minute load average of all cpu(s)
//range returned is 0.00 - 0.99
func Collectcpu(serverName string) (Metric, error) {
	values := Metric{}
	var err error
	values.Timestamp = time.Now()
	values.MetricType = "cpu"

	var response cpmserverapi.MetricCPUResponse
	request := &cpmserverapi.MetricCPURequest{}
	var url = "http://" + serverName + ":10001"
	response, err = cpmserverapi.MetricCPUClient(url, request)
	if err != nil {
		logit.Error.Println("cpu metric error:" + err.Error())
		return values, err
	}

	var output = strings.TrimSpace(response.Output)

	values.Value, err = strconv.ParseFloat(output, 64)
	if err != nil {
		logit.Error.Println("parseFloat error in cpu metric " + err.Error())
	}

	return values, err
}