<p>I looked at <code>/www/pages/cgi-bin/minerStatus.cgi</code>, and it parses</p>

<pre><code>cgminer-api -o
cgminer-api -o pools
cgminer-api -o stats
</code></pre>

CC BY-SA 3.0
2015-04-17T06:52:34.887Z
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
CC BY-SA 3.0
2015-04-17T08:01:57.637Z
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
CC BY-SA 3.0
2015-04-17T20:15:28.610Z
@NickODell: Thank you. Now I can compile it and run it as a cronjob to make periodic logs.
Geremia
CC BY-SA 3.0
2015-04-17T06:45:36.940Z
2015-04-17T06:45:36.940Z
Geremia
<p>How does one log all an Antminer's statistics (temperature, hashrate, etc.) to a file?</p>

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

CC BY-SA 3.0
2015-04-17T04:31:11.950Z
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
CC BY-SA 3.0
2015-04-17T06:06:41.633Z
@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
<cgminer><antminer><logging>
Logging Antminer Statuses
Geremia
# Logging Antminer Statuses

(Asked by: username_0 on 2015-04-17)

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?

**Tags:** cgminer, antminer, logging

> **Comments:**
> **username_1**: It seems like it would just be a matter of redirecting the output to a file, right? Or is there something I'm missing?  
> **username_0**: @username_1 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.  

---

## 1 answers

### Answer by username_0 on 2015-04-17. Score: 3 | Accepted answer

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

```
cgminer-api -o
cgminer-api -o pools
cgminer-api -o stats

```

> **Comments:**
> **username_0**: 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.  
> **username_1**: 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.  
> **username_0**: @username_1: Thank you. Now I can compile it and run it as a cronjob to make periodic logs.  

---

