forked from papampi/nvOC_by_fullzero_Community_Release
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path3main
1136 lines (1012 loc) · 34.9 KB
/
3main
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/bash
##########################################################################
##########################################################################
################# nvOC v0019-2.0 - Community Release #################
############## by papampi, Stubo and leenoox ##############
########## Based on the original nvOC v0019-1.4 by fullzero ##########
##########################################################################
##########################################################################
# 3main for v0019-2.0
#
# Dev Mod Log:
#
# v=0001 : papampi and Stubo:
# bug fixes, code clean-up, optimizations and split into 2 files: 3main and 0miner
#
# v=0002 : leenoox
# bug fix - $pwr_lim_daggerhashimoto5 > $pwr_lim_daggerhashimoto
# bug fix - INDIVIDUAL settings were applied to GPU's 0-13 only. Fixed to work with 0-18
# code optimization
#
# v=0003 : leenoox
# added GPU LED Logo brightness control
#
# v=0004 : papampi
# Telegram Changes
#
# v=0005 : papampi
# Minor change on miner launch and output
#
# v=0006 : papampi
# Changes local watchdog and temp control start and guake output
# v=0007 : papampi
# Revert local miner to screen
# DEV_VERSION=0006
source /home/m1/1bash
nvOC_ver="nvOC v0019-2.0 - Community Release" # Do not edit this
nvOC_3main_ver="v0019-2.0.006" # Do not edit this
#########################################################################
#########################################################################
#########################################################################
#########################################################################
echo ""
echo " $nvOC_ver "
echo ""
echo ""
sudo ldconfig /usr/local/cuda/lib64
GPUS=$(nvidia-smi -i 0 --query-gpu=count --format=csv,noheader,nounits)
NVD=nvidia-settings
SALFTER="NO"
if [ $COIN == "SALFTER_NICEHASH_PROFIT_SWITCHING" ]
then
SALFTER="YES"
fi
if [ $COIN == "SALFTER_MPH_PROFIT_SWITCHING" ]
then
SALFTER="YES"
fi
if [ $CLEAR_LOGS_ON_BOOT == "YES" ]
then
sudo bash '/home/m1/clear_logs'
fi
if [ $LOG_ROTATE == "YES" ]
then
HCD='/home/m1/log_rotate'
running=$(ps -ef | awk '$NF~"log_rotate" {print $2}')
if [ "$running" == "" ]
then
guake -n $HCD -r LOG_ROTATE -e "bash /home/m1/log_rotate"
running=""
fi
fi
if [ $SALFTER == "NO" ]
then
pkill -e miner
fi
if [ $LOCALorREMOTE == "REMOTE" ]
then
export DISPLAY=:0
fi
___1050_or_1050ti="NO"
NORMAL="NO"
P106_100="NO"
nvidia-smi -L > /tmp/tempa
if grep -q "1050" /tmp/tempa;
then
___1050_or_1050ti="YES"
fi
if grep -q "P106-100" /tmp/tempa;
then
___1050_or_1050ti="YES"
P106_100="YES"
fi
if grep -q -E '1060|1070|1080' /tmp/tempa;
then
NORMAL="YES"
fi
rm /tmp/tempa
XORG="FAIL"
if grep -q "28800" /etc/X11/xorg.conf;
then
XORG="OK"
fi
# dev note by leenoox:
# I don't see the relevance of this code, if the previous check for 28800 fails, but this one passes, it
# will mistakenly set XORG="OK" even though the check for 28800 failed. This needs to be revisited
if [ $P106_100 == "YES" ]
then
XORG="OK"
fi
# dev note by leenoox:
# we need to create function for this:
if [ $SLOW_USB_KEY_MODE == "YES" ]
then
sleep 6
fi
if [ $XORG == "FAIL" ]
then
sudo cp '/etc/X11/xorg.conf.backup' '/etc/X11/xorg.conf'
echo ""
echo "Xorg PROBLEM DETECTED"
echo ""
echo "Restoring Xorg"
echo ""
echo "Rebooting in 5 seconds"
sleep 5
sudo reboot
fi
IP=$(ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p')
# Set MINER_PWD if unset
if [ -z ${MINER_PWD+x} ]
then
MINER_PWD="x"
fi
echo ""
echo ""
echo "rig IP: $IP"
echo ""
echo ""
echo "rig MAC: $MAC"
if [ $SLOW_USB_KEY_MODE == "YES" ]
then
sleep 6
fi
echo ""
echo ''
lspci | grep VGA
if [ $SLOW_USB_KEY_MODE == "YES" ]
then
sleep 6
fi
echo ""
echo ''
nvidia-smi
echo ""
if [ $SLOW_USB_KEY_MODE == "YES" ]
then
sleep 6
fi
if [ $USE_ENVIRONMENTAL_VARIBLES == "YES" ]
then
export GPU_FORCE_64BIT_PTR="0"
export GPU_MAX_HEAP_SIZE="100"
export GPU_USE_SYNC_OBJECTS="1"
export GPU_MAX_ALLOC_PERCENT="100"
echo ""
echo ENVIRONMENTAL VARIBLES SET
fi
if [ $CONTROL_GPU_LED == "YES" ]
then
${NVD} -a GPULogoBrightness=$LED_BRIGHTNESS
fi
if [ $POWERLIMIT == "YES" ]
then
sudo nvidia-smi -pl $POWERLIMIT_WATTS
fi
if [ $INDIVIDUAL_POWERLIMIT == "YES" ]
then
sudo nvidia-smi -i 0 -pl $INDIVIDUAL_POWERLIMIT_0
sudo nvidia-smi -i 1 -pl $INDIVIDUAL_POWERLIMIT_1
sudo nvidia-smi -i 2 -pl $INDIVIDUAL_POWERLIMIT_2
sudo nvidia-smi -i 3 -pl $INDIVIDUAL_POWERLIMIT_3
sudo nvidia-smi -i 4 -pl $INDIVIDUAL_POWERLIMIT_4
sudo nvidia-smi -i 5 -pl $INDIVIDUAL_POWERLIMIT_5
sudo nvidia-smi -i 6 -pl $INDIVIDUAL_POWERLIMIT_6
sudo nvidia-smi -i 7 -pl $INDIVIDUAL_POWERLIMIT_7
sudo nvidia-smi -i 8 -pl $INDIVIDUAL_POWERLIMIT_8
sudo nvidia-smi -i 9 -pl $INDIVIDUAL_POWERLIMIT_9
sudo nvidia-smi -i 10 -pl $INDIVIDUAL_POWERLIMIT_10
sudo nvidia-smi -i 11 -pl $INDIVIDUAL_POWERLIMIT_11
sudo nvidia-smi -i 12 -pl $INDIVIDUAL_POWERLIMIT_12
sudo nvidia-smi -i 13 -pl $INDIVIDUAL_POWERLIMIT_13
sudo nvidia-smi -i 14 -pl $INDIVIDUAL_POWERLIMIT_14
sudo nvidia-smi -i 15 -pl $INDIVIDUAL_POWERLIMIT_15
sudo nvidia-smi -i 16 -pl $INDIVIDUAL_POWERLIMIT_16
sudo nvidia-smi -i 17 -pl $INDIVIDUAL_POWERLIMIT_17
sudo nvidia-smi -i 18 -pl $INDIVIDUAL_POWERLIMIT_18
fi
if [ $TEAMVIEWER == "YES" ]
then
running=$(ps -ef | awk '$NF~"teamviewer" {print $2}')
if [ "$running" == "" ]
then
sudo teamviewer --daemon enable
sleep 2
guake -n teamviewer -r teamviewer -e "teamviewer"
running=""
fi
fi
if [ $TEAMVIEWER == "NO" ]
then
running=$(ps -ef | awk '$NF~"teamviewer" {print $2}')
if [ "$running" != "" ]
then
sudo teamviewer --daemon disable
sleep 2
running=""
fi
fi
if [ $SSH == "YES" ]
then
sudo cp '/etc/init/ssh.conf-on' '/etc/init/ssh.conf'
fi
if [ $SSH == "NO" ]
then
sudo cp '/etc/init/ssh.conf-off' '/etc/init/ssh.conf'
fi
if [ $SRR == "YES" ]
then
sleep 2
HCD='SRR'
running=$(ps -ef | awk '$NF~"SRR" {print $2}')
if [ "$running" == "" ]
then
guake -n $HCD -r SRR -e "bash /home/m1/SRR"
running=""
fi
fi
if [ $plusCPU == "YES" ] && [ $AUTO_START_MINER == "YES" ]
then
HCD='/home/m1/cpuOPT/cpuminer'
XMRADDR="$XMR_ADDRESS.$XMR_WORKER"
echo ""
echo ""
echo "LAUNCHING: plusCPU"
if [[ `ps -ef |grep cpuminer |grep -v grep |wc -l` -eq 0 ]]
then
if [ $LOCALorREMOTE == "LOCAL" ]
then
guake -n $HCD -r plusCPU -e "$HCD -a cryptonight -o stratum+tcp://$XMR_POOL:$XMR_PORT -u $XMRADDR -p x -t $threadCOUNT"
else
screen -dmS plusCPU $HCD -a cryptonight -o stratum+tcp://$XMR_POOL:$XMR_PORT -u $XMRADDR -p x -t $threadCOUNT
fi
echo ""
echo "plusCPU process in guake terminal Tab (f12)"
echo ""
running=""
fi
fi
if [ $AUTO_REBOOT == "YES" ]
then
HCD='/home/m1/reboot'
running=$(ps -ef | awk '$NF~"reboot" {print $2}')
if [ "$running" == "" ]
then
guake -n $HCD -r AUTO_REBOOT -e "bash /home/m1/reboot"
running=""
fi
fi
if [ $_Parallax_MODE == "YES" ]
then
HCD='/home/m1/upPASTE'
running=$(ps -ef | awk '$NF~"upPASTE" {print $2}')
if [ "$running" == "" ]
then
echo ""
echo ""
echo "LAUNCHING: _Parallax_and_lost_post_upPASTE"
echo ""
echo "process in guake terminal Tab (f12)"
echo ""
guake -n $HCD -r PX_LP_upPASTE -e "bash /home/m1/upPASTE"
running=""
fi
fi
sleep 2
if [ $MINER_TEMP_CONTROL == "YES" ]
then
reup=0
running=$(ps -ef | awk '$NF~"6tempcontrol" {print $2}')
if [ "$running" != "" ]
then
target=$(ps -ef | awk '$NF~"6tempcontrol" {print $2}')
kill $target
reup=1
fi
sleep 2
echo ""
HCD='/home/m1/6tempcontrol'
running=$(ps -ef | awk '$NF~"6tempcontrol" {print $2}')
if [ "$running" == "" ]
then
echo "LAUNCHING: MINER TEMPCONTROL"
if [ $LOCALorREMOTE == "LOCAL" ]
then
#guake -n $HCD -r MINER_TEMP_CONTROL -e "bash /home/m1/6tempcontrol"
echo ""
echo "process in screen temp, guake terminal Tab (f12), ~/nvOC temp-log"
screen -c /home/m1/screenrc-tempcontrol -dmSL temp bash /home/m1/6tempcontrol
#if guake tab is already showing temp control output dont open a new one
if [[ -z $(ps ax | grep "tail -f /home/m1/nvoc_logs/tempcontrol-screenlog.0" |grep -v grep) ]];then
guake -n /home/m1/6tempcontrol -r MINER_TEMP_CONTROL -e "tail -f /home/m1/nvoc_logs/tempcontrol-screenlog.0 "
fi
echo ""
running=""
elif [ $LOCALorREMOTE == "REMOTE" ]
then
screen -c /home/m1/screenrc-tempcontrol -dmSL temp bash /home/m1/6tempcontrol
echo ""
echo "process in screen temp; ~/nvOC temp-log"
echo ""
running=""
fi
fi
fi
if [ $MINER_WATCHDOG == "YES" ] && [ $AUTO_START_MINER == "YES" ] && [ $SALFTER == "YES" ]
then
HCD='/home/m1/5watchdog'
echo ""
sleep 2
running=$(ps -ef | awk '$NF~"5watchdog" {print $2}')
if [ "$running" == "" ]
then
echo "LAUNCHING: MINER WATCHDOG"
if [ $LOCALorREMOTE == "LOCAL" ]
then
echo ""
echo "process in screen wdog, guake terminal Tab (f12), ~/nvOC wdog-log"
screen -c /home/m1/screenrc-watchdog -dmSL wdog bash /home/m1/5watchdog
#guake -n $HCD -r MINER_WATCHDOG -e "bash /home/m1/5watchdog"
#if guake tab is already showing watchdog output dont open a new one
if [[ -z $(ps ax | grep "tail -f /home/m1/nvoc_logs/watchdog-screenlog.0" |grep -v grep) ]];then
guake -n /home/m1/5watchdog -r MINER_WATCHDOG -e "tail -f /home/m1/nvoc_logs/watchdog-screenlog.0 "
fi
echo ""
running=""
elif [ $LOCALorREMOTE == "REMOTE" ]
then
screen -c /home/m1/screenrc-watchdog -dmSL wdog bash /home/m1/5watchdog
echo ""
echo "process in screen wdog; ~/nvOC wdog-log"
echo ""
running=""
fi
fi
elif [ $MINER_WATCHDOG == "YES" ] && [ $AUTO_START_MINER == "NO" ] && [ $SALFTER == "YES" ]
then
echo " "
echo " "
echo "Auto start miner is set to NO, Watchdog is not starting"
echo " "
echo " "
fi
if [ $TELEGRAM_MESSAGES == "YES" ]
then
HCD='/home/m1/7telegram'
running=$(ps -ef | awk '$NF~"7telegram" {print $2}')
if [ "$running" == "" ]
then
guake -n $HCD -r TELEGRAM_MESSAGES -e "bash /home/m1/7telegram"
running=""
fi
fi
if [ "$FAN_SPEED" -lt "40" ]
then
FAN_SPEED=40
fi
if [[ $WTM_PROFIT_CHECK == "YES" ]] && [[ $WTM_AUTO_SWITCH == "NO" ]]
then
echo ""
echo "LAUNCHING: WTM PROFIT CHECK "
echo ""
cat <<EOF >/home/m1/WTM.json
{
"WTM_URL": "$WTM_AUTO_SWITCH_URL",
"WTM_COINS": "$WTM_AUTO_SWITCH_COINS",
"WTM_MIN_DIFFERENCE": "$WTM_MIN_DIFFERENCE",
"currency":"$WTM_CURRENCY"
}
EOF
HCD='/home/m1/8wtm_profit_check'
running=$(ps -ef | awk '$NF~"8wtm_profit_check" {print $2}')
if [ "$running" == "" ]
then
guake -n $HCD -r WTM_PROFIT_CHECK -e "bash /home/m1/8wtm_profit_check"
running=""
fi
fi
if [ $COIN == "SALFTER_NICEHASH_PROFIT_SWITCHING" ] && [ $AUTO_START_MINER == "YES" ]
then
HOSTEDIT="YES"
if grep -q "api.nicehash.com" /etc/hosts;
then
HOSTEDIT="NO"
fi
if [ $HOSTEDIT == "YES" ]
then
sudo -- sh -c -e "echo '' >> /etc/hosts";
sudo -- sh -c -e "echo '104.20.158.21 api.nicehash.com' >> /etc/hosts";
echo UPDATED HOSTS FILE WITH IPv6 FIX
echo ""
echo ""
fi
sleep 2
cd /home/m1
if [ "$INDIVIDUAL_CLOCKS" == "YES" ]
then
gpu_clks_daggerhashimoto="[$__CORE_OVERCLOCK_0,$__CORE_OVERCLOCK_1,$__CORE_OVERCLOCK_2,$__CORE_OVERCLOCK_3,$__CORE_OVERCLOCK_4,$__CORE_OVERCLOCK_5,$__CORE_OVERCLOCK_6,$__CORE_OVERCLOCK_7,$__CORE_OVERCLOCK_8,$__CORE_OVERCLOCK_9,$__CORE_OVERCLOCK_10,$__CORE_OVERCLOCK_11,$__CORE_OVERCLOCK_12,$__CORE_OVERCLOCK_13,$__CORE_OVERCLOCK_14,$__CORE_OVERCLOCK_15,$__CORE_OVERCLOCK_16,$__CORE_OVERCLOCK_17,$__CORE_OVERCLOCK_18]"
mem_clks_daggerhashimoto="[$MEMORY_OVERCLOCK_0,$MEMORY_OVERCLOCK_1,$MEMORY_OVERCLOCK_2,$MEMORY_OVERCLOCK_3,$MEMORY_OVERCLOCK_4,$MEMORY_OVERCLOCK_5,$MEMORY_OVERCLOCK_6,$MEMORY_OVERCLOCK_7,$MEMORY_OVERCLOCK_8,$MEMORY_OVERCLOCK_9,$MEMORY_OVERCLOCK_10,$MEMORY_OVERCLOCK_11,$MEMORY_OVERCLOCK_12,$MEMORY_OVERCLOCK_13,$MEMORY_OVERCLOCK_14,$MEMORY_OVERCLOCK_15,$MEMORY_OVERCLOCK_16,$MEMORY_OVERCLOCK_17,$MEMORY_OVERCLOCK_18]"
gpu_clks_equihash=$gpu_clks_daggerhashimoto
mem_clks_equihash=$mem_clks_daggerhashimoto
gpu_clks_neoscrypt=$gpu_clks_daggerhashimoto
mem_clks_neoscrypt=$mem_clks_daggerhashimoto
gpu_clks_lyra2rev2=$gpu_clks_daggerhashimoto
mem_clks_lyra2rev2=$mem_clks_daggerhashimoto
gpu_clks_lbry=$gpu_clks_daggerhashimoto
mem_clks_lbry=$mem_clks_daggerhashimoto
else
gpu_clks_daggerhashimoto="$__daggerhashimoto_CORE_OVERCLOCK"
mem_clks_daggerhashimoto="$daggerhashimoto_MEMORY_OVERCLOCK"
gpu_clks_equihash="$__equihash_CORE_OVERCLOCK"
mem_clks_equihash="$equihash_MEMORY_OVERCLOCK"
gpu_clks_neoscrypt="$__neoscrypt_CORE_OVERCLOCK"
mem_clks_neoscrypt="$neoscrypt_MEMORY_OVERCLOCK"
gpu_clks_lyra2rev2="$__lyra2rev2_CORE_OVERCLOCK"
mem_clks_lyra2rev2="$lyra2rev2_MEMORY_OVERCLOCK"
gpu_clks_lbry="$__lbry_CORE_OVERCLOCK"
mem_clks_lbry="$lbry_MEMORY_OVERCLOCK"
fi
if [ "$INDIVIDUAL_POWERLIMIT" == "YES" ]
then
pwr_lim_daggerhashimoto="[$INDIVIDUAL_POWERLIMIT_0,$INDIVIDUAL_POWERLIMIT_1,$INDIVIDUAL_POWERLIMIT_2,$INDIVIDUAL_POWERLIMIT_3,$INDIVIDUAL_POWERLIMIT_4,$INDIVIDUAL_POWERLIMIT_5,$INDIVIDUAL_POWERLIMIT_6,$INDIVIDUAL_POWERLIMIT_7,$INDIVIDUAL_POWERLIMIT_8,$INDIVIDUAL_POWERLIMIT_9,$INDIVIDUAL_POWERLIMIT_10,$INDIVIDUAL_POWERLIMIT_11,$INDIVIDUAL_POWERLIMIT_12,$INDIVIDUAL_POWERLIMIT_13,$INDIVIDUAL_POWERLIMIT_14,$INDIVIDUAL_POWERLIMIT_15,$INDIVIDUAL_POWERLIMIT_16,$INDIVIDUAL_POWERLIMIT_17,$INDIVIDUAL_POWERLIMIT_18]"
pwr_lim_equihash=$pwr_lim_daggerhashimoto
pwr_lim_neoscrypt=$pwr_lim_daggerhashimoto
pwr_lim_lyra2rev2=$pwr_lim_daggerhashimoto
pwr_lim_lbry=$pwr_lim_daggerhashimoto
else
pwr_lim_daggerhashimoto=$daggerhashimoto_POWERLIMIT_WATTS
pwr_lim_equihash=$equihash_POWERLIMIT_WATTS
pwr_lim_neoscrypt=$neoscrypt_POWERLIMIT_WATTS
pwr_lim_lyra2rev2=$lyra2rev2_POWERLIMIT_WATTS
pwr_lim_lbry=$lbry_POWERLIMIT_WATTS
fi
cat <<EOF >/home/m1/conf.json
{
"currency": "$CURRENCY",
"pwrcost": $POWER_COST,
"min_profit": $MINIMUM_PROFIT,
"payment_addr": "$PAYMENT_ADDRESS",
"miner_name": "$WORKER_NAME",
"performance":
{
"daggerhashimoto": {
"speed": 0.087, "power": 0.397,
"power_limit": $pwr_lim_daggerhashimoto, "gpu_oc": $gpu_clks_daggerhashimoto, "mem_oc": $mem_clks_daggerhashimoto, "fan": 0,
"cmd": "/home/m1/eth/ethminer_12dev2/ethminer -SP 2 -S daggerhashimoto.usa.nicehash.com:3353 -O {ADDR}.{MINER}:x -U"
},
"equihash": {
"speed": 0.000001140, "power": 0.397,
"power_limit": $pwr_lim_equihash, "gpu_oc": $gpu_clks_equihash, "mem_oc": $mem_clks_equihash, "fan": 0,
"cmd": "/home/m1/zec/v3_4/miner --eexit 3 --fee 0 --pec --server equihash.usa.nicehash.com --user {ADDR}.{MINER} --pass z --port 3357"
},
"neoscrypt": {
"speed": 0.002160, "power": 0.397,
"power_limit": $pwr_lim_neoscrypt, "gpu_oc": $gpu_clks_neoscrypt, "mem_oc": $mem_clks_neoscrypt, "fan": 0,
"cmd": "/home/m1/KTccminer/ccminer -a neoscrypt -o stratum+tcp://neoscrypt.usa.nicehash.com:3341 -u {ADDR}.{MINER} -p x"
},
"lyra2rev2": {
"speed": 0.081, "power": 0.386,
"power_limit": $pwr_lim_lyra2rev2, "gpu_oc": $gpu_clks_lyra2rev2, "mem_oc": $mem_clks_lyra2rev2, "fan": 0,
"cmd": "/home/m1/SPccminer/ccminer -a lyra2v2 -o stratum+tcp://lyra2rev2.usa.nicehash.com:3347 -u {ADDR}.{MINER} -p x"
},
"lbry": {
"speed": 0.639, "power": 0.392,
"power_limit": $pwr_lim_lbry, "gpu_oc": $gpu_clks_lbry, "mem_oc": $mem_clks_lbry, "fan": 0,
"cmd": "/home/m1/SPccminer/ccminer -a lbry -o stratum+tcp://lbry.usa.nicehash.com:3356 -u {ADDR}.{MINER} -p x"
}
}
}
EOF
echo "LAUNCHING: SALFTER_NICEHASH_PROFIT_SWITCHING "
echo ""
python2.7 '/home/m1/switch' /home/m1/conf.json
if [ $LOCALorREMOTE == "LOCAL" ]
then
guake -n 1 -r SALFTER_NICEHASH_PROFIT_SWITCHING -e "screen -r miner"
fi
while true
do
echo ""
cat current-profit
echo ""
if [ $LOCALorREMOTE == "LOCAL" ]
then
guake -r SALFTER_NICEHASH_PROFIT_SWITCHING -e "screen -r miner"
echo ""
echo "mining process in Guake Tab"
echo ""
sleep $PROFIT_CHECK_TIMEOUT
python2.7 '/home/m1/switch' /home/m1/conf.json
fi
if [ $LOCALorREMOTE == "REMOTE" ]
then
echo "ENTER:"
echo ""
echo "screen -r miner"
echo ""
echo "in a terminal to view mining process"
sleep $PROFIT_CHECK_TIMEOUT
python2.7 '/home/m1/switch' /home/m1/conf.json
fi
done
elif [ $COIN == "SALFTER_NICEHASH_PROFIT_SWITCHING" ] && [ $AUTO_START_MINER == "NO" ]
then
echo " "
echo " "
echo "Auto Start Miner is set to NO"
echo " "
echo "Miner is not starting"
echo " "
echo " "
fi
if [ $COIN == "SALFTER_MPH_PROFIT_SWITCHING" ] && [ $AUTO_START_MINER == "YES" ]
then
cd /home/m1
if [ "$INDIVIDUAL_CLOCKS" == "YES" ]
then
gpu_clks_daggerhashimoto="[$__CORE_OVERCLOCK_0,$__CORE_OVERCLOCK_1,$__CORE_OVERCLOCK_2,$__CORE_OVERCLOCK_3,$__CORE_OVERCLOCK_4,$__CORE_OVERCLOCK_5,$__CORE_OVERCLOCK_6,$__CORE_OVERCLOCK_7,$__CORE_OVERCLOCK_8,$__CORE_OVERCLOCK_9,$__CORE_OVERCLOCK_10,$__CORE_OVERCLOCK_11,$__CORE_OVERCLOCK_12,$__CORE_OVERCLOCK_13,$__CORE_OVERCLOCK_14,$__CORE_OVERCLOCK_15,$__CORE_OVERCLOCK_16,$__CORE_OVERCLOCK_17,$__CORE_OVERCLOCK_18]"
mem_clks_daggerhashimoto="[$MEMORY_OVERCLOCK_0,$MEMORY_OVERCLOCK_1,$MEMORY_OVERCLOCK_2,$MEMORY_OVERCLOCK_3,$MEMORY_OVERCLOCK_4,$MEMORY_OVERCLOCK_5,$MEMORY_OVERCLOCK_6,$MEMORY_OVERCLOCK_7,$MEMORY_OVERCLOCK_8,$MEMORY_OVERCLOCK_9,$MEMORY_OVERCLOCK_10,$MEMORY_OVERCLOCK_11,$MEMORY_OVERCLOCK_12,$MEMORY_OVERCLOCK_13,$MEMORY_OVERCLOCK_14,$MEMORY_OVERCLOCK_15,$MEMORY_OVERCLOCK_16,$MEMORY_OVERCLOCK_17,$MEMORY_OVERCLOCK_18]"
gpu_clks_equihash=$gpu_clks_daggerhashimoto
mem_clks_equihash=$mem_clks_daggerhashimoto
gpu_clks_neoscrypt=$gpu_clks_daggerhashimoto
mem_clks_neoscrypt=$mem_clks_daggerhashimoto
gpu_clks_lyra2rev2=$gpu_clks_daggerhashimoto
mem_clks_lyra2rev2=$mem_clks_daggerhashimoto
gpu_clks_lbry=$gpu_clks_daggerhashimoto
mem_clks_lbry=$mem_clks_daggerhashimoto
__Blake_Vanilla_CORE_OVERCLOCK=$gpu_clks_daggerhashimoto
Blake_Vanilla_MEMORY_OVERCLOCK=$mem_clks_daggerhashimoto
__Cryptonight_CORE_OVERCLOCK=$gpu_clks_daggerhashimoto
Cryptonight_MEMORY_OVERCLOCK=$mem_clks_daggerhashimoto
__Groestl_CORE_OVERCLOCK=$gpu_clks_daggerhashimoto
Groestl_MEMORY_OVERCLOCK=$mem_clks_daggerhashimoto
__Keccak_CORE_OVERCLOCK=$gpu_clks_daggerhashimoto
Keccak_MEMORY_OVERCLOCK=$mem_clks_daggerhashimoto
__Myriad_Groestl_CORE_OVERCLOCK=$gpu_clks_daggerhashimoto
Myriad_Groestl_MEMORY_OVERCLOCK=$mem_clks_daggerhashimoto
__Qubit_CORE_OVERCLOCK=$gpu_clks_daggerhashimoto
Qubit_MEMORY_OVERCLOCK=$mem_clks_daggerhashimoto
__Scrypt_CORE_OVERCLOCK=$gpu_clks_daggerhashimoto
Scrypt_MEMORY_OVERCLOCK=$mem_clks_daggerhashimoto
__Sia_CORE_OVERCLOCK=$gpu_clks_daggerhashimoto
Sia_MEMORY_OVERCLOCK=$mem_clks_daggerhashimoto
__Skein_CORE_OVERCLOCK=$gpu_clks_daggerhashimoto
Skein_MEMORY_OVERCLOCK=$mem_clks_daggerhashimoto
__X11_CORE_OVERCLOCK=$gpu_clks_daggerhashimoto
X11_MEMORY_OVERCLOCK=$mem_clks_daggerhashimoto
else
gpu_clks_daggerhashimoto="$__daggerhashimoto_CORE_OVERCLOCK"
mem_clks_daggerhashimoto="$daggerhashimoto_MEMORY_OVERCLOCK"
gpu_clks_equihash="$__equihash_CORE_OVERCLOCK"
mem_clks_equihash="$equihash_MEMORY_OVERCLOCK"
gpu_clks_neoscrypt="$__neoscrypt_CORE_OVERCLOCK"
mem_clks_neoscrypt="$neoscrypt_MEMORY_OVERCLOCK"
gpu_clks_lyra2rev2="$__lyra2rev2_CORE_OVERCLOCK"
mem_clks_lyra2rev2="$lyra2rev2_MEMORY_OVERCLOCK"
gpu_clks_lbry="$__lbry_CORE_OVERCLOCK"
mem_clks_lbry="$lbry_MEMORY_OVERCLOCK"
fi
if [ "$INDIVIDUAL_POWERLIMIT" == "YES" ]
then
pwr_lim_daggerhashimoto="[$INDIVIDUAL_POWERLIMIT_0,$INDIVIDUAL_POWERLIMIT_1,$INDIVIDUAL_POWERLIMIT_2,$INDIVIDUAL_POWERLIMIT_3,$INDIVIDUAL_POWERLIMIT_4,$INDIVIDUAL_POWERLIMIT_5,$INDIVIDUAL_POWERLIMIT_6,$INDIVIDUAL_POWERLIMIT_7,$INDIVIDUAL_POWERLIMIT_8,$INDIVIDUAL_POWERLIMIT_9,$INDIVIDUAL_POWERLIMIT_10,$INDIVIDUAL_POWERLIMIT_11,$INDIVIDUAL_POWERLIMIT_12,$INDIVIDUAL_POWERLIMIT_13,$INDIVIDUAL_POWERLIMIT_14,$INDIVIDUAL_POWERLIMIT_15,$INDIVIDUAL_POWERLIMIT_16,$INDIVIDUAL_POWERLIMIT_17,$INDIVIDUAL_POWERLIMIT_18]"
pwr_lim_equihash=$pwr_lim_daggerhashimoto
pwr_lim_neoscrypt=$pwr_lim_daggerhashimoto
pwr_lim_lyra2rev2=$pwr_lim_daggerhashimoto
pwr_lim_lbry=$pwr_lim_daggerhashimoto
Blake_Vanilla_POWERLIMIT_WATTS=$pwr_lim_daggerhashimoto
Cryptonight_POWERLIMIT_WATTS=$pwr_lim_daggerhashimoto
Groestl_POWERLIMIT_WATTS=$pwr_lim_daggerhashimoto
Keccak_POWERLIMIT_WATTS=$pwr_lim_daggerhashimoto
Myriad_Groestl_POWERLIMIT_WATTS=$pwr_lim_daggerhashimoto
Qubit_POWERLIMIT_WATTS=$pwr_lim_daggerhashimoto
Scrypt_POWERLIMIT_WATTS=$pwr_lim_daggerhashimoto
Sia_POWERLIMIT_WATTS=$pwr_lim_daggerhashimoto
Skein_POWERLIMIT_WATTS=$pwr_lim_daggerhashimoto
X11_POWERLIMIT_WATTS=$pwr_lim_daggerhashimoto5
else
pwr_lim_daggerhashimoto=$daggerhashimoto_POWERLIMIT_WATTS
pwr_lim_equihash=$equihash_POWERLIMIT_WATTS
pwr_lim_neoscrypt=$neoscrypt_POWERLIMIT_WATTS
pwr_lim_lyra2rev2=$lyra2rev2_POWERLIMIT_WATTS
pwr_lim_lbry=$lbry_POWERLIMIT_WATTS
fi
cat <<EOF >/home/m1/mph_conf.json
{
"user_name": "$MPH_USERNAME",
"miner_name": "$WORKER_NAME",
"card_type": "nvidia",
"currency": "$CURRENCY",
"pwrcost": $POWER_COST,
"min_profit": $MINIMUM_PROFIT,
"miners":
{
"Blake-Vanilla":
{
"bin": "/home/m1/SPccminer/ccminer -a vanilla -o stratum+tcp://{HOST}:{PORT} -u {NAME}.{MINER} -p x",
"power_limit": $Blake_Vanilla_POWERLIMIT_WATTS, "gpu_oc": $__Blake_Vanilla_CORE_OVERCLOCK, "mem_oc": $Blake_Vanilla_MEMORY_OVERCLOCK, "fan": 0,
"speed": 12.3, "power": 0.389
},
"Cryptonight":
{
"bin": "/home/m1/KTccminer-cryptonight/ccminer -o stratum+tcp://{HOST}:{PORT} -u {NAME}.{MINER} -p x",
"power_limit": $Cryptonight_POWERLIMIT_WATTS, "gpu_oc": $__Cryptonight_CORE_OVERCLOCK, "mem_oc": $Cryptonight_MEMORY_OVERCLOCK, "fan": 0,
"speed": 0.000002, "power": 0.325
},
"Equihash":
{
"bin": "/home/m1/zec/v3_4/miner --eexit 3 --fee 0 --pec --server {HOST} --user {NAME}.{MINER} --pass z --port {PORT}",
"power_limit": $pwr_lim_equihash, "gpu_oc": $gpu_clks_equihash, "mem_oc": $mem_clks_equihash, "fan": 0,
"speed": 0.000001140, "power": 0.397
},
"Ethash":
{
"bin": "/home/m1/eth/ethminer_12dev2/ethminer -S {HOST}:{PORT} -O {NAME}.{MINER}:x -U",
"power_limit": $pwr_lim_daggerhashimoto, "gpu_oc": $gpu_clks_daggerhashimoto, "mem_oc": $mem_clks_daggerhashimoto, "fan": 0,
"speed": 0.087, "power": 0.397
},
"Groestl":
{
"bin": "/home/m1/SPccminer/ccminer -a groestl -o stratum+tcp://{HOST}:{PORT} -u {NAME}.{MINER} -p x",
"power_limit": $Groestl_POWERLIMIT_WATTS, "gpu_oc": $__Groestl_CORE_OVERCLOCK, "mem_oc": $Groestl_MEMORY_OVERCLOCK, "fan": 0,
"speed": 0.0853, "power": 0.392
},
"Keccak":
{
"bin": "/home/m1/SPccminer/ccminer -a keccak -o stratum+tcp://{HOST}:{PORT} -u {NAME}.{MINER} -p x",
"power_limit": $Keccak_POWERLIMIT_WATTS, "gpu_oc": $__Keccak_CORE_OVERCLOCK, "mem_oc": $Keccak_MEMORY_OVERCLOCK, "fan": 0,
"speed": 1.45, "power": 0.391
},
"Lyra2RE2":
{
"bin": "/home/m1/SPccminer/ccminer -a lyra2v2 -o stratum+tcp://{HOST}:{PORT} -u {NAME}.{MINER} -p x",
"power_limit": $pwr_lim_lyra2rev2, "gpu_oc": $gpu_clks_lyra2rev2, "mem_oc": $mem_clks_lyra2rev2, "fan": 0,
"speed": 0.081, "power": 0.386
},
"Myriad-Groestl":
{
"bin": "/home/m1/SPccminer/ccminer -a myr-gr -o stratum+tcp://{HOST}:{PORT} -u {NAME}.{MINER} -p x",
"power_limit": $Myriad_Groestl_POWERLIMIT_WATTS, "gpu_oc": $__Myriad_Groestl_CORE_OVERCLOCK, "mem_oc": $Myriad_Groestl_MEMORY_OVERCLOCK, "fan": 0,
"speed": 0.158, "power": 0.391
},
"NeoScrypt":
{
"bin": "/home/m1/KTccminer/ccminer -a neoscrypt -o stratum+tcp://{HOST}:{PORT} -u {NAME}.{MINER} -p x",
"power_limit": $pwr_lim_neoscrypt, "gpu_oc": $gpu_clks_neoscrypt, "mem_oc": $mem_clks_neoscrypt, "fan": 0,
"speed": 0.002160, "power": 0.397
},
"Qubit":
{
"bin": "/home/m1/SPccminer/ccminer -a qubit -o stratum+tcp://{HOST}:{PORT} -u {NAME}.{MINER} -p x",
"power_limit": $Qubit_POWERLIMIT_WATTS, "gpu_oc": $__Qubit_CORE_OVERCLOCK, "mem_oc": $Qubit_MEMORY_OVERCLOCK, "fan": 0,
"speed": 0.0509, "power": 0.382
},
"Scrypt":
{
"bin": "/home/m1/SPccminer/ccminer -a scrypt -o stratum+tcp://{HOST}:{PORT} -u {NAME}.{MINER} -p x",
"power_limit": $Scrypt_POWERLIMIT_WATTS, "gpu_oc": $__Scrypt_CORE_OVERCLOCK, "mem_oc": $Scrypt_MEMORY_OVERCLOCK, "fan": 0,
"speed": 0.00224, "power": 0.403
},
"Sia":
{
"bin": "/home/m1/SPccminer/ccminer -a sia -o stratum+tcp://{HOST}:{PORT} -u {NAME}.{MINER} -p x",
"power_limit": $Sia_POWERLIMIT_WATTS, "gpu_oc": $__Sia_CORE_OVERCLOCK, "mem_oc": $Sia_MEMORY_OVERCLOCK, "fan": 0,
"speed": 3.700, "power": 0.403
},
"Skein":
{
"bin": "/home/m1/ASccminer/ccminer -a skein -o stratum+tcp://{HOST}:{PORT} -u {NAME}.{MINER} -p x",
"power_limit": $Skein_POWERLIMIT_WATTS, "gpu_oc": $__Skein_CORE_OVERCLOCK, "mem_oc": $Skein_MEMORY_OVERCLOCK, "fan": 0,
"speed": 0.835, "power": 0.383
},
"X11":
{
"bin": "/home/m1/TPccminer/ccminer -a x11 -o stratum+tcp://{HOST}:{PORT} -u {NAME}.{MINER} -p x",
"power_limit": $X11_POWERLIMIT_WATTS, "gpu_oc": $__X11_CORE_OVERCLOCK, "mem_oc": $X11_MEMORY_OVERCLOCK, "fan": 0,
"speed": 0.0327, "power": 0.403
}
}
}
EOF
echo "LAUNCHING: SALFTER_MPH_PROFIT_SWITCHING "
echo ""
python2.7 '/home/m1/mph_switch' /home/m1/mph_conf.json
if [ $LOCALorREMOTE == "LOCAL" ]
then
guake -n 1 -r SALFTER_MPH_PROFIT_SWITCHING -e "screen -r miner"
fi
while true
do
echo ""
cat current-profit
echo ""
if [ $LOCALorREMOTE == "LOCAL" ]
then
guake -r SALFTER_MPH_PROFIT_SWITCHING -e "screen -r miner"
echo ""
echo "mining process in Guake Tab"
echo ""
sleep $PROFIT_CHECK_TIMEOUT
python2.7 '/home/m1/mph_switch' /home/m1/mph_conf.json
fi
if [ $LOCALorREMOTE == "REMOTE" ]
then
echo "ENTER:"
echo ""
echo "screen -r miner"
echo ""
echo "in a terminal to view mining process"
sleep $PROFIT_CHECK_TIMEOUT
python2.7 '/home/m1/mph_switch' /home/m1/mph_conf.json
fi
done
elif [ $COIN == "SALFTER_MPH_PROFIT_SWITCHING" ] && [ $AUTO_START_MINER == "NO" ]
then
echo " "
echo " "
echo "Auto Start Miner is set to NO"
echo " "
echo "Miner is not starting"
echo " "
echo " "
fi
if [ $SALFTER == "NO" ]
then
if [ $INDIVIDUAL_CLOCKS == "YES" ]
then
__CORE_OVERCLOCK[0]=$__CORE_OVERCLOCK_0
MEMORY_OVERCLOCK[0]=$MEMORY_OVERCLOCK_0
__CORE_OVERCLOCK[1]=$__CORE_OVERCLOCK_1
MEMORY_OVERCLOCK[1]=$MEMORY_OVERCLOCK_1
__CORE_OVERCLOCK[2]=$__CORE_OVERCLOCK_2
MEMORY_OVERCLOCK[2]=$MEMORY_OVERCLOCK_2
__CORE_OVERCLOCK[3]=$__CORE_OVERCLOCK_3
MEMORY_OVERCLOCK[3]=$MEMORY_OVERCLOCK_3
__CORE_OVERCLOCK[4]=$__CORE_OVERCLOCK_4
MEMORY_OVERCLOCK[4]=$MEMORY_OVERCLOCK_4
__CORE_OVERCLOCK[5]=$__CORE_OVERCLOCK_5
MEMORY_OVERCLOCK[5]=$MEMORY_OVERCLOCK_5
__CORE_OVERCLOCK[6]=$__CORE_OVERCLOCK_6
MEMORY_OVERCLOCK[6]=$MEMORY_OVERCLOCK_6
__CORE_OVERCLOCK[7]=$__CORE_OVERCLOCK_7
MEMORY_OVERCLOCK[7]=$MEMORY_OVERCLOCK_7
__CORE_OVERCLOCK[8]=$__CORE_OVERCLOCK_8
MEMORY_OVERCLOCK[8]=$MEMORY_OVERCLOCK_8
__CORE_OVERCLOCK[9]=$__CORE_OVERCLOCK_9
MEMORY_OVERCLOCK[9]=$MEMORY_OVERCLOCK_9
__CORE_OVERCLOCK[10]=$__CORE_OVERCLOCK_10
MEMORY_OVERCLOCK[10]=$MEMORY_OVERCLOCK_10
__CORE_OVERCLOCK[11]=$__CORE_OVERCLOCK_11
MEMORY_OVERCLOCK[11]=$MEMORY_OVERCLOCK_11
__CORE_OVERCLOCK[12]=$__CORE_OVERCLOCK_12
MEMORY_OVERCLOCK[12]=$MEMORY_OVERCLOCK_12
__CORE_OVERCLOCK[13]=$__CORE_OVERCLOCK_13
MEMORY_OVERCLOCK[13]=$MEMORY_OVERCLOCK_13
__CORE_OVERCLOCK[14]=$__CORE_OVERCLOCK_14
MEMORY_OVERCLOCK[14]=$MEMORY_OVERCLOCK_14
__CORE_OVERCLOCK[15]=$__CORE_OVERCLOCK_15
MEMORY_OVERCLOCK[15]=$MEMORY_OVERCLOCK_15
__CORE_OVERCLOCK[16]=$__CORE_OVERCLOCK_16
MEMORY_OVERCLOCK[16]=$MEMORY_OVERCLOCK_16
__CORE_OVERCLOCK[17]=$__CORE_OVERCLOCK_17
MEMORY_OVERCLOCK[17]=$MEMORY_OVERCLOCK_17
__CORE_OVERCLOCK[18]=$__CORE_OVERCLOCK_18
MEMORY_OVERCLOCK[18]=$MEMORY_OVERCLOCK_18
fi
if [ $INDIVIDUAL_CLOCKS == "NO" ]
then
__CORE_OVERCLOCK[0]=$__CORE_OVERCLOCK
MEMORY_OVERCLOCK[0]=$MEMORY_OVERCLOCK
__CORE_OVERCLOCK[1]=$__CORE_OVERCLOCK
MEMORY_OVERCLOCK[1]=$MEMORY_OVERCLOCK
__CORE_OVERCLOCK[2]=$__CORE_OVERCLOCK
MEMORY_OVERCLOCK[2]=$MEMORY_OVERCLOCK
__CORE_OVERCLOCK[3]=$__CORE_OVERCLOCK
MEMORY_OVERCLOCK[3]=$MEMORY_OVERCLOCK
__CORE_OVERCLOCK[4]=$__CORE_OVERCLOCK
MEMORY_OVERCLOCK[4]=$MEMORY_OVERCLOCK
__CORE_OVERCLOCK[5]=$__CORE_OVERCLOCK
MEMORY_OVERCLOCK[5]=$MEMORY_OVERCLOCK
__CORE_OVERCLOCK[6]=$__CORE_OVERCLOCK
MEMORY_OVERCLOCK[6]=$MEMORY_OVERCLOCK
__CORE_OVERCLOCK[7]=$__CORE_OVERCLOCK
MEMORY_OVERCLOCK[7]=$MEMORY_OVERCLOCK
__CORE_OVERCLOCK[8]=$__CORE_OVERCLOCK
MEMORY_OVERCLOCK[8]=$MEMORY_OVERCLOCK
__CORE_OVERCLOCK[9]=$__CORE_OVERCLOCK
MEMORY_OVERCLOCK[9]=$MEMORY_OVERCLOCK
__CORE_OVERCLOCK[10]=$__CORE_OVERCLOCK
MEMORY_OVERCLOCK[10]=$MEMORY_OVERCLOCK
__CORE_OVERCLOCK[11]=$__CORE_OVERCLOCK
MEMORY_OVERCLOCK[11]=$MEMORY_OVERCLOCK
__CORE_OVERCLOCK[12]=$__CORE_OVERCLOCK
MEMORY_OVERCLOCK[12]=$MEMORY_OVERCLOCK
__CORE_OVERCLOCK[13]=$__CORE_OVERCLOCK
MEMORY_OVERCLOCK[13]=$MEMORY_OVERCLOCK
__CORE_OVERCLOCK[14]=$__CORE_OVERCLOCK
MEMORY_OVERCLOCK[14]=$MEMORY_OVERCLOCK
__CORE_OVERCLOCK[15]=$__CORE_OVERCLOCK
MEMORY_OVERCLOCK[15]=$MEMORY_OVERCLOCK
__CORE_OVERCLOCK[16]=$__CORE_OVERCLOCK
MEMORY_OVERCLOCK[16]=$MEMORY_OVERCLOCK
__CORE_OVERCLOCK[17]=$__CORE_OVERCLOCK
MEMORY_OVERCLOCK[17]=$MEMORY_OVERCLOCK
__CORE_OVERCLOCK[18]=$__CORE_OVERCLOCK
MEMORY_OVERCLOCK[18]=$MEMORY_OVERCLOCK
fi
TI="3"
if [ $___1050_or_1050ti == "YES" ]
then
TI="2"
if [ $NORMAL == "YES" ]
then
TI="2 3"
fi
fi
if [ $SLOW_USB_KEY_MODE == "YES" ]
then
sleep 6
fi
if [ $P106_100_FULL_HEADLESS_MODE == "NO" ]
then
gpu=0
while [ $gpu -lt $GPUS ]
do
for j in $TI
do
CORE=${__CORE_OVERCLOCK[${gpu}]}
MEM=${MEMORY_OVERCLOCK[${gpu}]}
${NVD} -a [gpu:$gpu]/GPUGraphicsClockOffset[${j}]=$CORE
${NVD} -a [gpu:$gpu]/GPUMemoryTransferRateOffset[${j}]=$MEM
done
gpu=$(($gpu+1))
done
if [[ $MANUAL_FAN == "YES" && $MINER_TEMP_CONTROL == "NO" ]]
then
gpu=0
while [ $gpu -lt $GPUS ]
do
${NVD} -a [gpu:$gpu]/GPUFanControlState=1
${NVD} -a [fan:$gpu]/GPUTargetFanSpeed=${FAN_SPEED}
gpu=$(($gpu+1))
done
fi
if [[ $MANUAL_FAN == "NO" && $MINER_TEMP_CONTROL == "NO" ]]
then
gpu=0
while [ $gpu -lt $GPUS ]
do
${NVD} -a [gpu:$gpu]/GPUFanControlState=0
gpu=$(($gpu+1))
done
fi
fi
UPDATE="YES"
if [ $P106_100_FULL_HEADLESS_MODE == "YES" ]
then
if grep -q "XORG_UPDATED" /home/m1/xorg_flag;
then
sleep 2
UPDATE="NO"
fi
if [ $UPDATE == "YES" ]
then
sudo nvidia-xconfig --enable-all-gpus --cool-bits=12
cd /home/m1
echo XORG_UPDATED > '/home/m1/xorg_flag'
sleep 4