Skip to content

os.uptime returns the wrong value #36244

Closed
@davedodo

Description

@davedodo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    libuvIssues and PRs related to the libuv dependency or the uv binding.osIssues and PRs related to the os subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions