Did I find the right examples for you? yes no

All Samples(14)  |  Call(14)  |  Derive(0)  |  Import(0)
Return users currently connected on the system as a list of
namedtuples including the following attributes.

 - user: the name of the user
 - terminal: the tty or pseudo-tty associated with the user, if any.
 - host: the host name associated with the entry, if any.
 - started: the creation time as a floating point number expressed in
   seconds since the epoch.

        def get_users():
    """Return users currently connected on the system as a list of
    namedtuples including the following attributes.

     - user: the name of the user
     - terminal: the tty or pseudo-tty associated with the user, if any.
     - host: the host name associated with the entry, if any.
     - started: the creation time as a floating point number expressed in
       seconds since the epoch.
    """
    return _psplatform.get_system_users()
        


src/p/s/psutil-HEAD/examples/who.py   psutil(Download)
def main():
    users = psutil.get_users()
    for user in users:
        print_("%-15s %-15s %s  (%s)" % \
            (user.name,

src/p/s/psdash-0.3.0/psdash/web.py   psdash(Download)
def get_users():
    users = []
    for u in psutil.get_users():
        dt = datetime.fromtimestamp(u.started)
        user = {

src/p/s/psdash-HEAD/psdash/web.py   psdash(Download)
def get_users():
    users = []
    for u in psutil.get_users():
        dt = datetime.fromtimestamp(u.started)
        user = {

src/n/e/newRHELic-HEAD/newrelic.py   newRHELic(Download)
            self.metric_data['Component/System Information/Process Count[process]'] = len(psutil.get_pid_list())
            self.metric_data['Component/System Information/Core Count[core]'] = psutil.NUM_CPUS
            self.metric_data['Component/System Information/Active Sessions[session]'] = len(psutil.get_users())
        except Exception, e:
            loging.exception(e)

src/h/t/HTPC-Manager-HEAD/modules/stats.py   HTPC-Manager(Download)
        rr = None
        try:
            for user in psutil.get_users():
                duser = user._asdict()
                td = datetime.now() - datetime.fromtimestamp(duser['started'])

src/s/a/salt-HEAD/salt/modules/ps.py   salt(Download)
    '''
    try:
        recs = psutil.get_users()
        return [dict(x._asdict()) for x in recs]
    except AttributeError:

src/s/a/salt-thin-HEAD/salt/modules/ps.py   salt-thin(Download)
    '''
    try:
        recs = psutil.get_users()
        return [dict(x._asdict()) for x in recs]
    except AttributeError:

src/p/y/pysysbot-0.1.3/pysysbot/pysysbot.py   pysysbot(Download)
    def who(self, mess, args):
        """Information about users who are currently logged in."""
        users = psutil.get_users()
        who = '\n'
        for user in users:

src/s/a/salt-2014.1.3/salt/modules/ps.py   salt(Download)
    '''
    try:
        recs = psutil.get_users()
        return [dict(x._asdict()) for x in recs]
    except AttributeError:

src/s/i/sillyfacter-0.3.2.2/sillyfacter/user.py   sillyfacter(Download)
    l.info("Gathering logged in users...")
    host_users = []
    for item in psutil.get_users():
        user = item[0]
        term = item[1]

  1 | 2  Next