Example #1
0
def get_system_users():
    retlist = []
    rawlist = _psutil_bsd.get_system_users()
    for item in rawlist:
        user, tty, hostname, tstamp = item
        if tty == '~':
            continue  # reboot or shutdown
        nt = nt_user(user, tty or None, hostname, tstamp)
        retlist.append(nt)
    return retlist
Example #2
0
def get_system_users():
    retlist = []
    rawlist = _psutil_bsd.get_system_users()
    for item in rawlist:
        user, tty, hostname, tstamp = item
        if tty == '~':
            continue  # reboot or shutdown
        nt = nt_user(user, tty or None, hostname, tstamp)
        retlist.append(nt)
    return retlist
Example #3
0
def get_system_users():
    retlist = []
    rawlist = _psutil_bsd.get_system_users()
    for item in rawlist:
        user, tty, hostname, tstamp = item
        if tty == '~':
            continue  # reboot or shutdown
        abstty = os.path.join("/dev", tty)
        if os.path.exists(abstty):
            tty = abstty
        nt = ntuple_user(user, tty, hostname, tstamp)
        retlist.append(nt)
    return retlist
Example #4
0
def get_system_users():
    retlist = []
    rawlist = _psutil_bsd.get_system_users()
    for item in rawlist:
        user, tty, hostname, tstamp = item
        if tty == '~':
            continue  # reboot or shutdown
        abstty = os.path.join("/dev", tty)
        if os.path.exists(abstty):
            tty = abstty
        nt = ntuple_user(user, tty, hostname, tstamp)
        retlist.append(nt)
    return retlist