Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPC uptime #1616

Merged
merged 3 commits into from Jan 25, 2019

Conversation

Projects
5 participants
@guilhermelawless
Copy link
Contributor

commented Jan 22, 2019

Tracks the node uptime in seconds.

Sample

{"action": "uptime"}

{"seconds": "73"}
@wezrule

This comment has been minimized.

Copy link
Collaborator

commented Jan 22, 2019

Thanks, although I'm not sure if this is necessary. Can you give us a scenario where this gives information that can't be supplied by asking the operation system?

@guilhermelawless

This comment has been minimized.

Copy link
Contributor Author

commented Jan 22, 2019

@wezrule i guess it's possible using something like ps -eo pid,etime,args | grep node and parsing that, but having it in the RPC is pretty useful, and makes it consistent.

One use case is node monitors, currently the most used one uses system uptime.

@zhyatt zhyatt added this to the Research for Future Release milestone Jan 22, 2019

@rkeene rkeene added the enhancement label Jan 22, 2019

@zhyatt

This comment has been minimized.

Copy link
Collaborator

commented Jan 22, 2019

The team is considering this but would prefer it as unformatted monotonically increasing seconds instead of sec/min/hr/day splits, so if you get the time to update the PR for that change it would be very helpful.

@guilhermelawless

This comment has been minimized.

Copy link
Contributor Author

commented Jan 22, 2019

Sure thing, done and thanks for considering it!

Left the response field as seconds but can change to something else.

@zhyatt zhyatt requested a review from wezrule Jan 22, 2019

@wezrule
Copy link
Collaborator

left a comment

Thanks, I've suggested a couple of changes

Show resolved Hide resolved nano/node/node.hpp Outdated
Show resolved Hide resolved nano/node/node.cpp Outdated
@wezrule

This comment has been minimized.

Copy link
Collaborator

commented Jan 24, 2019

Haven't tested it, but LGTM. Can you update the description of this PR so it reflects the latest changes (i.e just seconds)?

@guilhermelawless

This comment has been minimized.

Copy link
Contributor Author

commented Jan 24, 2019

Done, thank you!

@zhyatt zhyatt added this to CP 3 (2018-01-23) in V18 Jan 25, 2019

@zhyatt zhyatt requested a review from cryptocode Jan 25, 2019

@zhyatt

This comment has been minimized.

Copy link
Collaborator

commented Jan 25, 2019

@cryptocode Can you give this a quick test and merge if it's working as expected?

@cryptocode
Copy link
Collaborator

left a comment

LGTM

@cryptocode cryptocode merged commit 54c872c into nanocurrency:master Jan 25, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@guilhermelawless guilhermelawless deleted the guilhermelawless:uptime branch Jan 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.