Uptime

How to show servers uptime on rails page?

def uptime

uptime

end

If you are working on Linux or MacOS X that is. You can then parse the result using regex if needed, which is something like ā€œ11:40:31 up 72 days, 9:27, 1 user, load average: 0.02, 0.15, 0.26\nā€.

Best regards

Peter De Berdt