mashlol / mintr

A simple unix monitor
MIT License
31 stars 9 forks source link

Uptime reporting is wrong #4

Closed Calinou closed 9 months ago

Calinou commented 9 years ago

The uptime reports 8 days and 7 minutes (at the time of posting), yet the actual uptime is about 1 day and a few hours.

http://mt.nerdpol.ovh:3000/

mashlol commented 9 years ago

I'm using os.uptime() (https://nodejs.org/api/os.html#os_os_uptime) for this, so if it's wrong, I would think it's either nodes fault, or somehow what you're using to determine the uptime is incorrect? Are you just using uptime?

Calinou commented 9 years ago

uptime says right now:

08:01:42 up 1 day, 20:47,  1 user,  load average: 0,27, 0,22, 0,19

…while Mintr reports 9 days and 9 minutes uptime.

swetoast commented 9 years ago

i got a simular problem mine keeps resetting each hour

http://progressive-attitude.com

is it something that i missed to install ?

mashlol commented 9 years ago

This is what the uptime monitor does: https://github.com/mashlol/mintr/blob/master/monitors/uptime.js

It just calls node's built in os.uptime() (https://nodejs.org/api/os.html#os_os_uptime) function, so I don't see what could be the problem here.

Maybe I'll just make it parse uptime instead...should be more reliable.

mashlol commented 9 years ago

Ok I've tried a different method of determining uptime now, let me know if that is working better.

swetoast commented 9 years ago

UPTIME INFORMATION 14 hours, 32 minutes, 57 seconds

works :) wondering if you mind adding swap usage if possible