def METHOD_NAME(self, kernel, name):
    known_sysctls = {
        "hostname": "hostname",
        "nisdomainname": "domainname",
    }
    var_str = ""
    if name in known_sysctls:
        var_name = known_sysctls[name]
        try:
            var_array = kernel.object_from_symbol(symbol_name=var_name)
        except exceptions.SymbolError:
            var_array = None
        if var_array is not None:
            var_str = utility.array_to_string(var_array)
    return var_str