def check_user_load(self):
        try:
            self.sessions = []
            output = self.node.ssh_run_command(["Quser"])
            for line in output.split('\n'):
                fields = split("(\S+) +(\d+) +(Disc) +([none]*[\d+\+]*[\. ]*[\d*\:\d* ]*[\d ]*) (\d*/\d*/\d*) +(\d*\:\d* +[AM]*[PM]*)",line)
                if (len(fields) > 1):
                    user = dict()
                    for i,value in enumerate(fields):
                        if(i == 1):
                            user["username"] = string.rstrip(value)
                        if(i == 2):
                            user["sessionid"] = string.rstrip(value)
                        if(i == 3):
                            user["state"] = string.rstrip(value)
                        if(i == 4):
                            user["idletime"] = string.rstrip(value)
                        if(i == 5):
                            user["logondate"] = string.rstrip(value)
                        if(i == 6):
                            user["logontime"] = string.rstrip(value)
                    if (len(user) == 6):
                        self.sessions.append(user)

                else:
                    fields = split("(\S+) +(\S+) +(\d+) +(Active) +([none]*[\d+\+]*[\. ]*[\d*\:\d* ]*[\d ]*) (\d*/\d*/\d*) +(\d*\:\d* +[AM]*[PM]*)",line)
                    user = dict()
                    for i,value in enumerate(fields):
                        if(i == 1):
                            user["username"] = string.rstrip(value)
                        if(i == 2):
                            user["sessionname"] = string.rstrip(value)
                        if(i == 3):
                            user["sessionid"] = string.rstrip(value)
                        if(i == 4):
                            user["state"] = string.rstrip(value)
                        if(i == 5):
                            user["idletime"] = string.rstrip(value)
                        if(i == 6):
                            user["logondate"] = string.rstrip(value)
                        if(i == 7):
                            user["logontime"] = string.rstrip(value)
                    if (len(user) == 7):
                        self.sessions.append(user)
            return self.sessions 
        except HostNotConnectableError:
            return False
dataset/ETHPy150Open bmbouter/Opus/opus/lib/osutils/windows.py/Windows.check_user_load/original