# Somebody already has a GPU rig?

**URL:** <https://forum.zcashcommunity.com/t/somebody-already-has-a-gpu-rig/1410>\
**Category:** Mining\
**Created:** [August 31, 2016, 5:13pm UTC](https://forum.zcashcommunity.com/t/somebody-already-has-a-gpu-rig/1410 "2016-08-31T17:13:37Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![zawy](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/zawy/32/11892_2.png) [@zawy](https://forum.zcashcommunity.com/u/zawy)\
**Post date:** [September 3, 2016, 8:14am UTC](https://forum.zcashcommunity.com/t/somebody-already-has-a-gpu-rig/1410/13 "2016-09-03T08:14:20Z")

</div>

Here is some code to record difficulty. I posted it a month ago, but this is a better version. I copy and past this output to a spreadsheet to get the difficulty chart. The recorded time to get a block is as it arrives to your node which will have some error. It can have up to an additional 10 seconds of error. The official data can be found at [https://explorer.testnet.z.cash](https://explorer.testnet.z.cash) Maybe there’s some way to get the data in a chartable format from there.

When difficulty says “1” it appears to be the previous difficulty, not actually 1. For example, it takes the same amount of time to solve d=1400 as d=1 when it is switching back and forth between the two. I never could get the devs to comment on that except to say going back to 1 will not exist in version 1.0.

```
#!/bin/bash
    # WARNING: this may slow your miner
    # Logs time, "apparent" secs to get block, block num, and difficulty
    # Execute this file log.sh with "bash log.sh". 
    # Assumes zcash folder is in home folder.
    # Output is to terminal and to log.txt   
    echo "Time, seconds, blocknum, difficulty" | tee -a log.txt
    c=1
    prevblock=$(~/zcash/src/zcash-cli getblockcount)
    prevseconds=$(date +"%s") # seconds since 1970
    until [$c -gt 5760]; do # do for 10 days 
        block=$(~/zcash/src/zcash-cli getblockcount)
        if [$block != $prevblock]; then
            prevblock=$block
            let c=c+1
            mytime=$(date +"%T")
            myseconds=$(date +"%s") # seconds since 1970
            let myseconds=myseconds-prevseconds # seconds since 1970
            prevseconds=$(date +"%s")
            difficulty=$(~/zcash/src/zcash-cli getdifficulty)
            difficulty=${difficulty:0:5} 
            echo "$mytime $myseconds $block $difficulty" | tee -a log.txt
        fi
        sleep 10 # seconds
    done

```

---

_[View the full topic](https://forum.zcashcommunity.com/t/somebody-already-has-a-gpu-rig/1410)._
