2

How does one log all an Antminer's statistics (temperature, hashrate, etc.) to a file?

I can log in to an Antminer via SSH, so I should be able to turn on some option for cgminer to log everything, no?

Geremia
  • 4,469
  • 4
  • 37
  • 75
  • It seems like it would just be a matter of redirecting the output to a file, right? Or is there something I'm missing? – Nick ODell Apr 17 '15 at 04:31
  • @NickODell Yes, but it's complicated by its being a daemon… And I'm not even sure `cgminer` logs temperature or anything else outside the the "Pools" pane of the "Miner Status" page. Maybe I should look into the webserver and see where it's getting the data. – Geremia Apr 17 '15 at 06:06

1 Answers1

3

I looked at /www/pages/cgi-bin/minerStatus.cgi, and it parses

cgminer-api -o
cgminer-api -o pools
cgminer-api -o stats
Geremia
  • 4,469
  • 4
  • 37
  • 75
  • But what is `cgminer-api`, and where can I find it? I found [some Ruby API on GitHub](https://github.com/code-lever/cgminer-api), but that doesn't seem to be the same as the `cgminer-api` executable on AntMiners. – Geremia Apr 17 '15 at 06:52
  • 2
    It's compiled from [here](https://github.com/ckolivas/cgminer/blob/67161b82148e9df74e9757424e5d215667f9e39b/api-example.c), but those three commands draw data from https://github.com/ckolivas/cgminer/blob/78b1b603ca483ecb8b2177f4a456cfd88e783e6f/api.c#L2577, https://github.com/ckolivas/cgminer/blob/78b1b603ca483ecb8b2177f4a456cfd88e783e6f/api.c#L2481, and https://github.com/ckolivas/cgminer/blob/78b1b603ca483ecb8b2177f4a456cfd88e783e6f/api.c#L4068. – Nick ODell Apr 17 '15 at 08:01
  • @NickODell: Thank you. Now I can compile it and run it as a cronjob to make periodic logs. – Geremia Apr 17 '15 at 20:15