How to monitor who have logged in a number of ubuntu servers?

Soliman Hindy hindy at lovetux.net
Fri May 15 15:47:58 UTC 2015


----- Mail original -----
> De: "Peng Yu" <pengyu.ut at gmail.com>
> À: "ubuntu-server" <ubuntu-server at lists.ubuntu.com>
> Envoyé: Vendredi 15 Mai 2015 16:27:45
> Objet: How to monitor who have logged in a number of ubuntu servers?

Hello,

> I want to check who have logged in a number of ubuntu servers. I could
> do `last` on each server. But this is tedious. Is there any easy way
> to do so? Thanks.

Hello,

You may look at fabric: http://www.fabfile.org/
This a great software for running a bunch of commands on a lot of servers.

In order to running a command on a bunch of servers this will look like the following:
fab -R role cmd

cmd is defined in the fabfile.py:
def cmd():
    run('cat /etc/hosts')


Regards,
-- 
Soliman Hindy




More information about the ubuntu-server mailing list