[erlang-questions] Get Erlang node uptime and way to test it is working

Mithun B mithunb@REDACTED
Thu Jun 22 06:37:40 CEST 2017


Hi Rickard Green,

     Thanks for your valuable reply and will consider your suggestion of 
using erlang:convert_time_unit/3 instead of assuming nanoseconds.

Regards,
Mithun B

On Tuesday 20 June 2017 04:26 PM, Rickard Green wrote:
>
> tis 20 juni 2017 kl. 09:21 skrev Mithun B <mithunb@REDACTED 
> <mailto:mithunb@REDACTED>>:
>
>     Hi all,
>
>     We are using "erlang:statistics(wall_clock)" to get the Erlang node up
>     time in millisecond.
>
>     It works fine till 49 days, but on 49th day it will role back to start
>     from 0 millisecond.
>
>     I need to know two things here, First of all, a different method
>     for how
>     to test it, I don't want to wait for 49+ days to see it works or not.
>
>     Secondly, I need to know a method which gives proper up time even
>     after
>     49+ days. How about following:
>
>     "(erlang:monotonic_time() - erlang:system_info(start_time)) div
>     1000000000"
>
>
> Apart from the assumption of nanosecond native time unit this is the 
> way to do it. Use erlang:convert_time_unit() instead. There are Erlang 
> systems not using nanoseconds as native time unit.
>
> Regards,
> Rickard Green, Erlang/OTP
>
>
>     If any one having more insight on this, please shed some light on
>     these
>     topics.
>
>     Thanks and regards,
>
>     Mithun B
>
>     _______________________________________________
>     erlang-questions mailing list
>     erlang-questions@REDACTED <mailto:erlang-questions@REDACTED>
>     http://erlang.org/mailman/listinfo/erlang-questions
>
> -- 
> Rickard Green, Erlang/OTP, Ericsson AB


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170622/05e98e0d/attachment.htm>


More information about the erlang-questions mailing list