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

[API] Device total hashrates please.... #167

Closed
unsivilaudio opened this issue Oct 11, 2018 · 9 comments
Closed

[API] Device total hashrates please.... #167

unsivilaudio opened this issue Oct 11, 2018 · 9 comments
Labels

Comments

@unsivilaudio
Copy link

First off thanks for all the hard work you put into this miner. I'm currently working on an implementation on EthOS and am facing challenges when trying to get gpu hashrates from your miner. I would love you forever if you would add device totals to the json api. Please...it just doesn't seem practical in any other way. I've mentioned this on the xmr-stak github before but the devs didnt seem receptive. Again, please, this would one-up you on those guys. :)

Thanks again and keep up the great work.

@xmrig
Copy link
Owner

xmrig commented Oct 11, 2018

Probably you looking for GET /1/threads.
Thank you.

@unsivilaudio
Copy link
Author

Thanks for the response. Unfortunately no, this isn't what I'm looking for, I'm looking for actual device totals in the api, not individual threads due to the nature of how varying they are based on user.

@xmrig
Copy link
Owner

xmrig commented Oct 11, 2018

If you talking about double threads you can use index field and sum hashrate, it should not big deal.

Example 4 threads and 2 GPUs (without unnecessary fields):

{
    "threads": [
        {
            "index": 0,
             ...
            "hashrate": [
                250.0,
                0.0,
                0.0
            ]
        },
        {
            "index": 0,
             ...
            "hashrate": [
                260.0,
                0.0,
                0.0
            ]
        },
        {
            "index": 1,
             ...
            "hashrate": [
                512.0,
                0.0,
                0.0
            ]
        },
        {
            "index": 1,
             ...
            "hashrate": [
                500.0,
                0.0,
                0.0
            ]
        }
    ]
}

It can be transformed to:

{
    "gpus": [
        {
            "index": 0,
             ...
            "hashrate": [
                510.0,
                0.0,
                0.0
            ]
        },
        {
            "index": 1,
             ...
            "hashrate": [
                1012.0,
                0.0,
                0.0
            ]
        }
    ]
}

@unsivilaudio
Copy link
Author

Sorry, I just dabble in code. Not a developer by any means, but if I can figure out how to do this, I can definitely get your miner on all Ethos rigs.

@unsivilaudio
Copy link
Author

unsivilaudio commented Oct 12, 2018

So I am making progress with this, however it looks like there is a bug in the API its not being reported correctly. I purposely unbalanced the cards to be sure I was getting correct values on it (one thread in the 500's and another thread in the 400's). The api continues to report only the first thread values on both threads, which as you can imagine was confusing the hell out of me.

@xmrig
Copy link
Owner

xmrig commented Oct 12, 2018

Yep it was a bug, fixed in dev branch.
Thank you.

@unsivilaudio
Copy link
Author

unsivilaudio commented Oct 12, 2018 via email

@xmrig
Copy link
Owner

xmrig commented Oct 18, 2018

Fixed in v2.8.2.

@xmrig xmrig closed this as completed Oct 18, 2018
@unsivilaudio
Copy link
Author

Just a followup to my original question for anyone digging this up later. Here's my noob php code for calculating gpu totals.
http://paste.ethosdistro.com/aqeqegiyol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants