Skip to content
This repository has been archived by the owner on Apr 24, 2022. It is now read-only.

Improved console output #164

Closed
wants to merge 8 commits into from
Closed

Conversation

evilny0
Copy link
Contributor

@evilny0 evilny0 commented Jul 18, 2017

I added hashrate per card, and colors for accepted/refused shares. Only tested it on CUDA & Nicehash, so I hope I did not miss anything.

@evilny0 evilny0 mentioned this pull request Jul 18, 2017
@@ -81,6 +81,31 @@ inline std::ostream& operator<<(std::ostream& _out, WorkingProgress _p)
return _out;
}

struct FarmWorkingProgress
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like splitting this single struct into two. Can we keep it as one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@derubm
Copy link

derubm commented Jul 23, 2017

if you guys work on the console output, can you eventually add

  1. a mh/s on "Submitted and accepted", and
  2. showing the Nonce in Hexadecimal, not in decimal ?

for .1 (in -v 1 mode ethminer only shows information and errors) but on submit at least i ´d like to know onwhat hashing speed the card was working)
for .2 Nonce is shown in the blockbrowser as hexadecimal, in ethminer as decimal)
image

@LeRoyJulian
Copy link

When will this be merged ?

@EoD
Copy link
Contributor

EoD commented Jul 28, 2017

@derubm
Copy link

derubm commented Jul 29, 2017

i can not see any colored output on that .. ? (Win 10 / DOS)

@evilny0
Copy link
Contributor Author

evilny0 commented Jul 29, 2017

I added colors, but colors are not supported on Windows version, so it only works on Linux.

I could try to look at how to implement colors on Windows terminal (or powershell)... but I could only test on a VM, so no GPU to run the miner on !

@derubm
Copy link

derubm commented Jul 29, 2017

that would work on windows:
` HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
for(int k = 1; k < 255; k++)

{
SetConsoleTextAttribute(hConsole, k);

cout << k << " Colors! " << endl;

}`

edit: if the DOS window is ANSI Format (Windows 10),
esc character works (sample:)
first character is esc character 27
�[1;33m would be yellow for example

image

@evilny0
Copy link
Contributor Author

evilny0 commented Aug 5, 2017

I added colors for ANSI terminals on Windows.

I tried to add it for non-ANSI terminals, and succeeded to some extent... when we write logs directly to the console. However, the vast majority of logs are first built, and written to the console later on. Which mean changing the color when the logs are built has no effect on the console output. Changing this probably means a major rework of the logs, and I'm not going to do that :).

@Blacksuu
Copy link

Blacksuu commented Aug 5, 2017

@evilny0 well that last try what you done with "Fixed missing static keyword." it generate bunch of "m" from time to time aka it mess thing :) noo colour change only a extra field line like total ... gpu0 value ... i test if under Windows 7 Service Pack 1 (6.1.7601) 64bit

@evilny0
Copy link
Contributor Author

evilny0 commented Aug 5, 2017

Yes, I noticed. I did a few tries on Linux with no problem before commit, but now I have issues. I'll fix it.

@evilny0
Copy link
Contributor Author

evilny0 commented Aug 5, 2017

About colors, as I said it's only if the terminal supports ANSI escape codes. On Windows, it basically means Windows 10 only. And it doesn't seem to be all versions, since on the VM I have, it's not supported... it works in Powershell (Win10) though.

@Blacksuu
Copy link

Blacksuu commented Aug 5, 2017

yup last build you done noo more bunch of "m", noo colour on win7 but i undestend reading previos comment no biggie, my sugestion if is possible to be add a total share counter like:
ETH - Total Speed: X Mh/s, Total Shares: X, Rejected: X, Stale: X <
cheers
p.s. this is how it look under win 7 http://i.imgur.com/p5YggVy.png

@evilny0
Copy link
Contributor Author

evilny0 commented Aug 5, 2017

I'm not sure I understand. It's already there. Shares are here : [A2+0:R0+0:F0], and total is on the next line. Example :

m 00:36:25|ethminer Mining on #b04b76ab… [A2+0:R0+0:F0]
m 00:36:25|ethminer Total: 145.43MH/s GPU0: 24.96MH/s GPU1: 24.71MH/s GPU2: 24.20MH/s GPU3: 24.20MH/s GPU4: 23.69MH/s GPU5: 23.69MH/s

@Blacksuu
Copy link

Blacksuu commented Aug 5, 2017

my sugestion was to add a counter what to end like this:
m 00:36:25|ethminer Total: 145.43MH/s, Total Shares: 200, Rejected: 5, Stale: 2, GPU0: 24.96MH/s GPU1: 24.71MH/s GPU2: 24.20MH/s GPU3: 24.20MH/s GPU4: 23.69MH/s GPU5: 23.69MH/s

@evilny0
Copy link
Contributor Author

evilny0 commented Aug 5, 2017

I'll split this PR to several. Colors for windows & hashrate per GPU should be in a different one.

@evilny0 evilny0 closed this Aug 5, 2017
@evilny0
Copy link
Contributor Author

evilny0 commented Aug 6, 2017

I created #225 & #226 instead of this one.

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

Successfully merging this pull request may close these issues.

6 participants