The os.uptime function returns wrong values on some machines. I am using NodeJS 10 on Ubuntu 16.04 via the nodesource repository. The system's uptime command returns 07:36:53 up 36 days, 11:51. But require("os").uptime() / 3600 / 24 yields about 77 days. The system is a virtual server. The virtualization software used by the provider is Virtuozzo (I think).
I tried the same on a bare metal machine at home with Ubuntu 18.04, but the returned time is correct there. I get the feeling that the virtualization has something to do with it. Anyway, I believe this should be fixed.
The
os.uptimefunction returns wrong values on some machines. I am using NodeJS 10 on Ubuntu 16.04 via the nodesource repository. The system'suptimecommand returns07:36:53 up 36 days, 11:51. Butrequire("os").uptime() / 3600 / 24yields about 77 days. The system is a virtual server. The virtualization software used by the provider is Virtuozzo (I think).I tried the same on a bare metal machine at home with Ubuntu 18.04, but the returned time is correct there. I get the feeling that the virtualization has something to do with it. Anyway, I believe this should be fixed.