# Uptime

**URL:** <https://www.ruby-forum.com/t/uptime/135925>\
**Category:** Rails\
**Created:** [April 26, 2008, 11:24am UTC](https://www.ruby-forum.com/t/uptime/135925 "2008-04-26T11:24:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![giga](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b9bd4f/32.png) [@giga](https://www.ruby-forum.com/u/giga)\
**Post date:** [April 26, 2008, 11:24am UTC](https://www.ruby-forum.com/t/uptime/135925/1 "2008-04-26T11:24:31Z")

</div>

How to show servers uptime on rails page?

---

<div class="post-metadata">

**Author:** ![giga](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b9bd4f/32.png) [@giga](https://www.ruby-forum.com/u/giga)\
**Post date:** [April 26, 2008, 11:42am UTC](https://www.ruby-forum.com/t/uptime/135925/2 "2008-04-26T11:42:40Z")

</div>

On 26 Apr 2008, at 11:24, Gi Ga wrote:

> 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
