• Stars
    star
    205
  • Rank 191,264 (Top 4 %)
  • Language
    C
  • License
    MIT License
  • Created over 3 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Graphs the activity of a chia harvester in a linux terminal.

Chia Harvest Graph

Monitor for Chia Harvesting

screenshot

Introduction

The chiaharvestgraph tool will graph Chia Harvesting activity in a linux terminal. Use a 24-bit colour terminal, like xterm or gnome-terminal.

Building

$ git clone https://github.com/stolk/chiaharvestgraph.git

$ cd chiaharvestgraph

$ make

Launching

To use it:

Set the loglevel for Chia to INFO by editting ~/.chia/mainnet/config/config.yaml and make sure you have log_level: INFO set.

Then do:

$ ./chiaharvestgraph ~/.chia/mainnet/log

Leave the tool running, as it keeps checking the log. More pixels will scroll in from the right, plotting top to bottom.

PRO TIP: Don't scale your terminal higher than 25 lines, because the image will get noisy due to small time-bins. Terminal of 15 lines or so is best, in my experience.

Rationale

Much can go wrong when harvesting Chia. The full node may lose connection to peers, the farmer could not be talking to the full node, the harvester could not be talking to the farmer, or maybe just spotty Internet connection?

That's why it is important to keep an eye on the INFO log. When challenged, the harvester will (on behalf of a farmer) look for proof. It will look for that in the plots that pass the plot-filter. (Every plot has a 1:512 chance of passing, by the way.)

The debug log will contain lines that look like:

0 plots were eligible for farming 3c91c49224... Found 0 proofs. Time: 0.00383 s. Total 39 plots

A properly working harvester should be outputting that line every 10 seconds or so to the log file (provided the log level is INFO.)

This tool will look for those lines in the logs.

Function

A Chia Harvester will get challenged every 10 seconds or so, to look for proof in its plots. This tool will identify those lines, and register the time-stamps for those. If there are not enough of those time-stamps within any given period, the harvester is under-harvesting, or even not harvesting. This is colour coded on the graph.

The graph spans from the right of the terminal (NOW) to the left of the terminal (PAST) and every shaded band represents one hour, and every vertical line, one quarter of an hour.

Depending on the vertical resolution of the terminal, every plot pixel represents a number of seconds, 15 minutes from top to bottom.

On the top of the screen, the average and worst-case response times to eligible harvests are shown. If your harvester takes more than 5 seconds to respond to a challenge, it is designated as too slow.

NOTE: You can see more days of the week by simply resizing your terminal to be wider.

NOTE: First time users should not be alarmed by a lot of grey colour on the left side of the screen. Chia logs are at most 7 x 20MB, and because a full node spams a lot, there are only a few hrs of info in there. On a dedicated harvester, there can be weeks of info, because it logs less. Regardless.... if you leave the tool runnining, it will hold onto the stats, up to a week's worth.

Colours

A yellow colour means that the harvest frequency is nominal for that time span.

An orange colour means that it was under harvested.

A red colour means that there was no harvesting at those time slots.

A white colour means that there was a bit more than expected harvesting, due to fluctuations.

Dark Grey means that the log did not go far enough back for that time period.

And for the incredibly lucky... a blue pixel represents a found proof! Yeehaw! Better check your wallet!

Keys

Press ESCAPE or Q to exit chiaharvestgraph.

Environment Variables

If you have trouble seeing the standard colourmap, you can select a different one:

$ CMAP_VIRIDIS=1 ./chiaharvestgraph ~/.chia/mainnet/logs
$ CMAP_MAGMA=1 ./chiaharvestgraph ~/.chia/mainnet/logs
$ CMAP_PLASMA=1 ./chiaharvestgraph ~/.chia/mainnet/logs

If you have more than 8 recycled debug.log files, then you can tell the tool to read more of them:

$ NUM_DEBUG_LOGS=15 ./chiaharvestgraph ~/.chia/mainnet/logs

Running from Docker

First, build it

docker build -t chiaharvestgraph:latest .

Then run it


```bash
docker run -v ~/.chia/mainnet/log:/.chia/mainnet/log:ro --name=chiaharvestgraph -it chiaharvestgraph:latest bash

Did you know that...

Donations

Chia Harvest Graph is a tool by Bram Stolk, who is on Twitter as: @BramStolk where he mostly tweets about game development.

If you find this tool useful, donations can go to XCH wallet: xch1zfgqfqfdse3e2x2z9lscm6dx9cvd5j2jjc7pdemxjqp0xp05xzps602592

Known issues

  • Shows garbage on terminals that do not support 24 bit colour.
  • Missing manual page.
  • It looks weird when going through older versions of putty, so upgrade putty.
  • If your terminal lacks 24-bit support, and can't switch to xterm or another 24-bit terminal, run the tool through tmux.

Copyright

chiaharvestgraph is (c)2021 by Bram Stolk and licensed under the MIT license.

More Repositories

1

GPGOAP

General Purpose Goal Oriented Action Planning
C
556
star
2

imcat

Show any image in a terminal window.
C
322
star
3

diskgraph

Graphs the disk IO in a linux terminal.
C
197
star
4

sotrace

Traces the shared-object dependencies of a binary, and graphs them.
Python
161
star
5

energygraph

Graphs the energy use of a host inside a text terminal, using intel-rapl data from the /sys filesystem.
C
124
star
6

ThreadTracer

Lightweight inline profiler that measures wall-time, cpu-time and premptive context switches for threads.
C
72
star
7

ifgraph

Network Interface Grapher.
C
67
star
8

chiaplotgraph

Chia Plot Graph
C
55
star
9

forvor

Fortune's Voronoi Generator
C
31
star
10

sino

sino - a Simplex Noise implementation in C.
C
30
star
11

freqtop

Monitor for the CPU Frequency Scaling under Linux.
C
29
star
12

dutch-blunt

Low poly font rendering system. Uses triangles not textures, for always sharp edges.
C
17
star
13

icmp_watch

Send batch requests for ICMP and show results in a console window to monitor availability of hosts.
C
14
star
14

turboledz

Daemon for Turbo LEDz devices.
C
12
star
15

chiaheightgraph

Graphs the progress of block height in your Chia Full Node.
C
9
star
16

ip2ensign

Converts an IP number to a flag image in a texture atlas.
Python
8
star
17

GBase

Minimalistic Basis for Game Development.
C++
8
star
18

MinimalVulkanCompute

Minimal code to do vulkan compute.
C
6
star
19

allrgb

My entry for the allRGB challenge: image where each 24b colour is used for one pixel, and one pixel only.
C
6
star
20

hidscan

Scan for HID devices, and print out their usages.
C
5
star
21

little_kiss_fft

A port of KISS FFT that targets ฮผcontrollers.
C
4
star
22

objsplitv

Splits Wavefront OBJ vertices that suffer from inappropriate sharing.
Python
4
star
23

hsvbench

Benchmarking HSV to RGB conversions.
C
3
star
24

no-noise-android

Filters out the noisiest spam from the device log of Android devices.
Python
2
star
25

colourfactory

Generates distinct colours.
Python
2
star
26

Blocher

WEBGL visualization of quantum gates operating on the Bloch Sphere.
JavaScript
2
star
27

airQplot

CO2 meter
C++
1
star
28

NBody

N-Body simulation, 2D.
C
1
star
29

osino

Open Simplex Noise for Enoki/CUDA
C
1
star
30

twinprimetest

Test the twin primes like Thomas Nicely did, but on AVX.
C
1
star
31

vmtest

Demonstrate that virtual memory is cheap.
C
1
star
32

ZeroToSnake

Zero To Snake in 3600 seconds.
Python
1
star
33

gbmtest

Test program to see which formats can be used by libgbm.
C
1
star