There is new much better and more efficient option to create chia plots - using chia plot manager.

Plotting with PowerShell script

Download script

If you use Chia GUI for plotting, sometimes processes gets stuck, and there is no easy possibility to kill the process. Sometimes even whole GUI gets freezed, so that you actually don't really know, what plotters are currently doing, and how much progress they made.

To solve this problem you have to create your plots using chia CLI in your terminal or powershell. But if you want to do so, then it can become very tiring, if you want to run multiple queues, and the also stagger them with particular timeout.

So I came to the idea to write a "master" PowerShell script, which starts your queues with particular delay, or all at the same time, if you wish. As this is a PowerShell script, it sure works only on Windows OS. But in general you are definitely able to create similar script for linux OS.

You can simply download it here. After downloading you have to define your queues, and then simply right click on your script, and run it in powershell, you are done! If you are scared to download something from this site, then simply continue to read =)

How it works

It's dead simple. Before you run it, you have to configure it! There is a function GetPlotterCmd, which generates a string for multiple commands to execute: go to chia CLI folder, rename window name, wait before start, if delay was defined, run plotter. The output of plotter is displayed in PowerShell window, but is also stored to a default logs folder: C:\Users\%USER_NAME%\.chia\mainnet\plotter. After you made some plots, you are free to upload your logs and get some simple stats of your plotting process.

Script listing

############ Update these variables to match your environment ############ $appVersion = "1.1.3" ############ function GetPlotterCmd { Param ( [string] $t, [string] $t2, [string] $d, [int] $r = 2, [int] $b = 3400, [int] $n = 1, [int] $afterMin = 0 ) $logFilename = Get-Date -Format "yyyy-MM-dd_HH-mm-ss-ff" $startingTime = (Get-Date).AddMinutes($afterMin).toString("dd.MM.yyyy HH:mm:ss") return "cmd /c start powershell -NoExit -Command {cd '$home\AppData\Local\chia-blockchain\app-$appVersion\resources\app.asar.unpacked\daemon';`$host.ui.RawUI.WindowTitle = 'Plotter $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') | $n plots | $t -> $d'; 'I will start to create plots at $startingTime'; start-sleep $($afterMin * 60) ; .\chia.exe plots create -k 32 -b $b -u 128 -r $r -t $t -2 $t2 -d $d -n $n 2>&1 | %{ `"`$_`" } | Tee-Object -FilePath '$home\.chia\mainnet\plotter\${logFilename}_sleep-${afterMin}.txt'; Read-Host -Prompt 'press enter to exit'}" } ########################################################################## # PLOTTERS # define here how much parallel queues you would like to run and with which settings # -t, -d, -r, -b and -n params are the same as for `chia plots create` command # -afterMin defines when queue should start # # EXAMPLE - run 4 parallel queues on different disks, each queue create 4 plots # GetPlotterCmd -t 'D:\' -t2 'D:\' -d 'G:\' -r 3 -b 3500 -n 4 -afterMin 0 | invoke-expression # GetPlotterCmd -t 'D:\' -t2 'D:\' -d 'G:\' -r 3 -b 3500 -n 4 -afterMin 90 | invoke-expression # GetPlotterCmd -t 'C:\chia_tmp' -t2 'C:\chia_tmp' -d 'F:\' -r 3 -b 3500 -n 4 -afterMin 0 | invoke-expression # GetPlotterCmd -t 'C:\chia_tmp' -t2 'C:\chia_tmp' -d 'F:\' -r 3 -b 3500 -n 4 -afterMin 120 | invoke-expression ########################################################################## # for debug purposes you can uncomment following line, so root process don't exits automatically #Read-Host -Prompt 'press enter to exit'

Lets us break down the generated command

  • cmd /c start powershell -NoExit -Command {...} Run a new powershell window which runs the command defined in curly braces
  • cd '$home\AppData\Local\chia-blockchain\app-$appVersion\resources\app.asar.unpacked\daemon'; Navigate to chia CLI location
  • `$host.ui.RawUI.WindowTitle = 'Plotter $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') | $n plots | $t -> $d'; Change the name of powershell window
  • 'I will start to create plots at $startingTime'; Print in the powershell terminal, when current queue is about to start
  • start-sleep $($afterMin * 60) ; Define how many seconds process should wait
  • .\chia.exe plots create -k 32 -b $b -u 128 -r $r -t $t -2 $t2 -d $d -n $n Finally run plotter
  • 2>&1 | %{ `"`$_`" } | Tee-Object -FilePath '$home\.chia\mainnet\plotter\${logFilename}_sleep-${afterMin}.txt'; Redirect error stream of plotter (additional log information is printed there) to stdout stream, pipe it to %{ `"`$_`" } (to prevent powershell from throwing errors) and pipe output also to log file
  • Read-Host -Prompt 'press enter to exit' Wait for user interaction, so when pipe is done, you can look at what was going on

So and the end you should define how many queues you would like to run and with which delay by using GetPlotterCmd function.

Have fun while plotting, and feel free to upload your logs when you have some =)