This shell command will give you how long the system has been booted:
ssh hostname uptime
To automate it, you will want to add the public ssh key to the .ssh/authorized_keys file on the host.
With boto, this will probably be something like this (although I did not use boto): s = boto.manage.cmdshell.SSHClient(hostname, uname='root') s.run('uptime')
See the link to the boto control module
source share