2018年2月24日土曜日

はじめての ethOS

こんにちは、ドリ助です。
ethOS についていくつか記事を書いているのですが、たまに記事についてコメントやメールをいただけて嬉しく思っています。ありがとうございます。
いただいたメールの中で Win, Mac についてはわかるけど、Linux はちょっとというメールをいただいたので ethOS の設定箇所、設定方法がよくわかないってメールをいただいたので、設定ポイントについてまとめてみようかと思います。

ネットワークの設定

まずは、何はともあれネットワークの設定でしょう。静的なものか、動的ななものかは使用しているルーターの設定によりますが、大抵の環境では動的なものでしょう。というわけで、動的なルーターを基準に書きたいと思います。
まずは ethOS の右側のターミナルに以下のコマンドを打ちます。
# sudo gedit /etc/network/interfaces
このコマンドを打つと Win のメモ帳のようなプログラムが立ち上がり、GUI を使った編集保存が出来るかと思います。先頭の sudo は管理者権限で実行するというコマンドです。ネットワークの設定には管理者権限が必要なので、書き込む際にはこのコマンドをつける必要があります。
ファイルには以下のように書き込んで、保存します。すると動的ネットワークの設定ができるかと思います。
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
モバイルルーターなどで、 USB 経由でネットワークをつないでいる場合は以下のように eth0 の場所を usb0 にして追記してください。
auto usb0
iface usb0 inet dhcp
この後再起動します。再起動を行うと、自動でネットワークがつながるかとおもいます。

設定をしても繋がらないとき

画面の左上に IP アドレスが出るかと思いますが、もし出ないようでしら、ルーターに割り振りをもらう必要があります。 そのときは以下のコマンドを打ってみてください。
# sudo dhclient -v
こちらはルータの DHCP から IP アドレスを取得するコマンドです。
/home/ethos/custom.sh の中の exit 0 の前の行に以下のように書き込むと、起動時に勝手にやってくれるようになります。
sudo dhclient -v

exit 0

local.conf の設定

続いて local.conf の設定を行います。 local.conf は自分のビデオカードによって変わります。 私は GTX 1070 しかもっていないので、その設定を書いておきます。
以下のコマンドで、local.conf を開きます。
# gedit local.conf
<wallet> には自分の ETH, ZEC の wallet を入れてください。

ETH の場合

maxgputemp 85
stratumproxy enabled
proxywallet <wallet>
proxypool1 pool-asia.ethosdistro.com:5001
proxypool2 pool-eu.ethosdistro.com:5001
globalmem 4500
globalpowertune 125
globalfan 75

ZEC の場合

<worker> には自分の worker 名を入れます。
miner <worker> ewbf-zcash
maxgputemp 85
stratumproxy enabled
proxywallet  <wallet>
proxypool1 zec-jp1.nanopool.org:6666
proxypool2 zec-asia1.nanopool.org:6666
globalfan 75
globalpowertune 130
globalcore 1900
globalmem 4000
この設定を保存して再起動すると、再起動後5分ほどで、マイニングが始まると思います。正直設定箇所の少なさにびっくりするかもしれません。
以上です。

2018年2月18日日曜日

リグの安定運用のための cron

こんにちはドリ助です。
私のリグには7枚の玄人志向の GPU が刺さっているのですが、7枚中1枚の GPU が外れの GPU らしく、たまに確認するとその1枚だけ動いていないことがあります。再起動するとまたちゃんと動くので、壊れているというわけではないのですが、当たり外れはどうにもならないですね。
ただ、このままだと毎日リグがちゃんと動いているのを確認して、動いていないときは再起動をかけてあげないと6枚で動かしている時間が長くなり、思った通りの運用ができません。
また、毎日リグを確認して動いているかどうか確かめるのは正直面倒です。理想は GPU が一枚動かなくなったのを検知したら、勝手に再起動して復旧するのが理想です。
ただまぁそこまでするのも大変そうだったので、1日1回勝手に再起動してくれれば1日5分ほど動いていない時間ができますが、ほぼ7枚フルで動くかなと思い、1日1回再起動するように設定することにします。

cron について

1日1回なんかしてほしいというものを探していたら、cron というものを見つけたのでこれで設定することにします。
以下は引用です

cron とは

cron とは、ジョブ(スクリプト)を自動実行するためのデーモンプロセスです。そして、Linux システムの管理を行なう場合、ログのローテートや、バックアップなど、定期的に自動実行したいジョブが数多くあります。特に、バックアップなどは、システムへの負荷が大きいため、通常は、ユーザからのアクセスが少ない、深夜や早朝に行なわれます。
このように、定期的に実行されるジョブは、crond というデーモンによって、自動的に行なうように管理することができます。そこで、今回は、cron の設定を行なうために必要なコマンドや、設定ファイルについて説明していきたいと思います。

cron の設定方法

1日1回再起動すればいいと考えていましたが、minestop というコマンドを使えばリグ自体を再起動しなくても GPU のみを再起動すできるようなので一日一回 minestop コマンドが動くようにします。
以下のコマンドを打って cron のエディタを開きます。
# crontab -e
cron の設定は以下のように書けばいいので
分 時 日 月 曜日 <実行コマンド>
実際に書く内容は以下になります。
0 10 * * * minestop
この意味は毎日 10 時に minestop コマンドを実行するという意味です。
これで無事毎日 10 時に再起動するようになりました。 実際にこれを使って運用を始めましたが、たまに確認しても大体の時間フルで動いているようです。たまに6枚になっているようですが、次の日には復活してるようなので許容範囲かなと。
以上です。

2018年2月3日土曜日

[ethOS] 1.2.9 release

こんにちは、ドリ助です。
マイニング専用 OS の ethOS の 1.2.9 がリリースされました。 1.2.8 は欠番のようです。テスト中に不具合が見つかったとかなのかな?もしくは2チームで作業していてたまたま同時にに作業が終わったとか?まぁ何にせよ使い勝手がよくなったりハッシュレートが上がるのは大歓迎ですね。
また、私の残念な英語読解能力で解読してみました。間違っていたら指摘していただけると嬉しいです。
全体を見てみると NVIDIA 関連の不具合修正がいくつかあります。GTX 系を使っている人は今すぐupdate!
update 方法はこちら。

ethOS 1.2.9 更新履歴 (2018年1月6日リリース)

大きな変更点

  • ethOS のサイズを 8G から 5G にしました。
  • より信頼できる GPU が報告したパラメータを集めるために、カスタムツールを実装しました。
  • すべてのマイナーとそれに伴うパッケージをアップデートしました。
  • claymore-xmr を最新の安定版にアップデート。
  • ethminer で最新の GPU を使うと遅い不具合を修正。
  • 750MB の不必要なパッケージを削除
  • worker 名を使わない pool に globalname, [worker] を使用しない ethOS config オプションを追加
  • ethOS config の pool or wallet が変更されたとき、明示的に再起動、再始動しなくても自動的に再始動するように変更
  • すべての claymore 設定を flag option とともに ethOS conf に移動
  • ethOS が disk への書き込みを監視、抑制して boot disk の寿命をのばすように変更

不具合修正

  • worker 名が不要なピリオドをつける不具合を修正 (@ 1.2.8)
  • NVIDIA 関連のハッシュレートが ethOS-smi 設定の誤ったメモリクロックによって下げられるのを修正 (@ 1.2.8)
  • iGPU が NVIDIA GPU 数を誤って計算する不具合を修正 (@ 1.2.8)
  • ethOS config の再起動設定をちゃんと動くように
  • いくつかの ethOS config オプションが適切にコメントになっていないのを修正
  • ethOS local.conf の異なる改行コードによって適切に動かないことがあるのを修正
  • dstm-zcash とすべての claymore マイナーが ssl:// pool URL を使える機能を追加
  • alt-tab キーでブラウザ、ターミナル間のフォーカスを変更できるように
  • miner が、ethOS config を変更しても変わらないことがあるのを修正
  • ccminer のハッシュレートが 0 として報告される不具合を修正
  • ethOS リグが ethOS stats パネルに update 報告を送れない不具合を修正
  • dstm-zcash 実行中の rigpool1, rigpool2 の順序指定を修正
  • ethOS stats パネルの表示が正しくないのを修正
  • update-miner に終了時 update script を入れることでより便利に
まぁたいした修正でもないようなので、以降の訳は気が向いたら。。

表面的な変更とクリーンアップ

  • Added total GPU count to ethosdistro.com
  • Added rig counts, separated by driver, to ethosdistro.com/versions
  • Added documentation about removing worker names for pools that don't support them to the ethOS Knowledge Base.
  • Added best-effort stats collection to continue to report to ethOS stats panel despite unforseen conditions.
  • Added GPU crash detection to report crashed GPUs on the ethOS desktop.
  • Made ethOS motd (helpme) slightly smaller.
  • Fixed the order of core and memory clocks to continue to report properly when an NVIDIA GPU crashes.
  • Added remove-teamviewer for users who wish to remove teamveiwer packages.
  • Prompted users who have ethOS installations with known malware (from torrents) to reimage to a legitimate gpuShack version of ethOS.
  • Added nano guide to ethOS knowledge base.
  • Listed more possible parameters that ethos-readconf can accept.
  • Added a notification to ethOS stats panel and ethOS desktop when NVIDIA GPUs do not have all PCI-E power cables connected properly.
  • Made ethOS stats panel webserver perform more reliably.
  • Added documentation to regarding poolemail rigpool1 rigpool2 poolpass1 poolpass2 to the sample config.
以下原文のまま

ethOS 1.2.9 changelog (released January 6th 2018)

Major Changes

  • Resized ethOS live image from 8 gigabytes to 5 gigabytes, to reduce the imaging time by 35%.
  • Built a custom tool for gathering GPU-reported parameters more reliably.
  • Updated all installed miners to their latest versions and added packages necessary to support them.
  • Updated claymore-xmr to its latest stable version (fix for ethOS 1.2.8).
  • Fixed an issue that caused the last GPU to mine slowly when using ethminer.
  • Removed 750 megabytes of cruft by cleaning up unnecessary packages.
  • Added ethOS config options globalname disabled and name [worker] disabled for pools that don't use worker names.
  • Allowed miner to restart automatically if pool or wallet changes in ethOS config, without requiring manual restart or reboot.
  • Removed all claymore stubs, claymore confs moved to ethOS conf with flags option (now remote.conf is possible with claymore).
  • Audited and prevented more ethOS disk writes, thereby increasing the longevity of the boot drive.

Bug Fixes

  • Fixed a bug that caused some worker names to have an extra period (fix for ethOS 1.2.8).
  • Fixed an NVIDIA-related hashrate decrease caused by ethOS-smi setting an incorrect memory clock (fix for ethOS 1.2.8).
  • Fixed an issue that caused iGPU to count NVIDIA GPUs incorrectly (fix for ethOS 1.2.8).
  • Made ethOS config reboots (reb) work more reliably.
  • Fixed cases where some ethOS config options did not honor comments (#) properly.
  • Forced cleanup of foreign line-breaks in ethOS local.conf which prevented it from working properly.
  • Added ability for dstm-zcash and all claymore miners to support and accept ssl:// pool URLs.
  • Allowed alt-tab to switch focus between browser, ethOS terminal, and ethOS fullscreen terminal without using a mouse.
  • Fixed cases where certain miners did not switch properly after changing ethOS config.
  • Fixed hashrate collection bugs that caused ccminer to report hashrates as "0".
  • Fixed cases where ethOS rigs failed to send updates to ethOS stats panel.
  • Fixed ordering of rigpool1 and rigpool2 when running dstm-zcash.
  • Fixed a problem associated with ethOS stats panel reporting live mining instances inaccurately.
  • Allowed update-miner to be more robust by supporting post-update scripts.

Cosmetic Changes and Cleanup

  • Added total GPU count to ethosdistro.com
  • Added rig counts, separated by driver, to ethosdistro.com/versions
  • Added documentation about removing worker names for pools that don't support them to the ethOS Knowledge Base.
  • Added best-effort stats collection to continue to report to ethOS stats panel despite unforseen conditions.
  • Added GPU crash detection to report crashed GPUs on the ethOS desktop.
  • Made ethOS motd (helpme) slightly smaller.
  • Fixed the order of core and memory clocks to continue to report properly when an NVIDIA GPU crashes.
  • Added remove-teamviewer for users who wish to remove teamveiwer packages.
  • Prompted users who have ethOS installations with known malware (from torrents) to reimage to a legitimate gpuShack version of ethOS.
  • Added nano guide to ethOS knowledge base.
  • Listed more possible parameters that ethos-readconf can accept.
  • Added a notification to ethOS stats panel and ethOS desktop when NVIDIA GPUs do not have all PCI-E power cables connected properly.
  • Made ethOS stats panel webserver perform more reliably.
  • Added documentation to regarding poolemail rigpool1 rigpool2 poolpass1 poolpass2 to the sample config.
以上です。