Feb-13-2017, 01:33 PM
Hi,
I am trying to write an applet that scans a number of servers, and returns the number of logged in users per server.
Background : I have a cirtix environment, and we have instances that allow up to 30 users per machine.
I have started to get somewhere with the "getpass" function.
>>> import getpass
>>> getpass.getuser()
'UserXYZ'
Basically what i intend to do is write an applet that counts how many users are logged in (by counting usernames possibly?)
How do I query a remote machine using python, to retrieve the list of logged in users?
I am trying to write an applet that scans a number of servers, and returns the number of logged in users per server.
Background : I have a cirtix environment, and we have instances that allow up to 30 users per machine.
I have started to get somewhere with the "getpass" function.
>>> import getpass
>>> getpass.getuser()
'UserXYZ'
Basically what i intend to do is write an applet that counts how many users are logged in (by counting usernames possibly?)
How do I query a remote machine using python, to retrieve the list of logged in users?
Say NO to TROLLs!! **naughty**