func check(checker, ip string, port int) (state steward.ServiceState,
	logs string, err error) {

	_, logs, ret, err := system.System("timeout", timeout, checker, "chk", ip,
		fmt.Sprintf("%d", port))

	state = parseState(ret)
	if state != steward.StatusUnknown {
		err = nil
	}

	return
}
func get(checker, ip string, port int, cred string) (flag, logs string,
	state steward.ServiceState, err error) {

	flag, logs, ret, err := system.System("timeout", timeout, checker, "get", ip,
		fmt.Sprintf("%d", port), cred)

	state = parseState(ret)
	if state != steward.StatusUnknown {
		err = nil
	}

	flag = strings.Trim(flag, " \n")

	return
}
func put(checker, ip string, port int, flag string) (cred, logs string,
	state steward.ServiceState, err error) {

	cred, logs, ret, err := system.System("timeout", timeout, checker, "put", ip,
		fmt.Sprintf("%d", port), flag)

	state = parseState(ret)
	if state != steward.StatusUnknown {
		err = nil
	}

	cred = strings.Trim(cred, " \n")

	return
}
func sshCheck(host, checker, ip string, port int) (state steward.ServiceState,
	logs string, err error) {

	_, logs, ret, err := system.System("ssh",
		"-o", "ConnectTimeout="+connectTimeout,
		"-o", "ConnectionAttempts="+connectionAttempts,
		host, "timeout", timeout, checker,
		"chk", ip, fmt.Sprintf("%d", port))

	state = parseState(ret)
	if state != steward.StatusUnknown {
		err = nil
	}

	return
}
func sshPut(host, checker, ip string, port int, flag string) (cred, logs string,
	state steward.ServiceState, err error) {

	cred, logs, ret, err := system.System("ssh",
		"-o", "ConnectTimeout="+connectTimeout,
		"-o", "ConnectionAttempts="+connectionAttempts,
		host, "timeout", timeout, checker,
		"put", ip, fmt.Sprintf("%d", port), flag)

	state = parseState(ret)
	if state != steward.StatusUnknown {
		err = nil
	}

	cred = strings.Trim(cred, " \n")

	return
}