https://wiki.archlinux.org/api.php?action=feedcontributions&user=Chrisguk&feedformat=atomArchWiki - User contributions [en]2024-03-29T15:20:10ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Poclbm&diff=262024Poclbm2013-06-09T19:06:55Z<p>Chrisguk: </p>
<hr />
<div>[[Category:Applications]]<br />
[[Category:Arch Bitcoin mining with Poclbm]]<br />
= Arch Bitcoin mining with Poclbm =<br />
<br />
Poclbm (Python OpenCL Bitcoin miner) is a python program/script made by m0mchil on Github (https://github.com/m0mchil/poclbm), it mines Bitcoins using an OpenCL capable device. Here's how to install and use it as a systemd service.<br />
<br />
== Introduction ==<br />
<br />
Mining Bitcoins is a process that uses your computer hardware i.e. GPU/CPU to generate "blocks" which are used to verify transactions in the Bitcoin network. Currently a generated block will give you 50 BTC. However it will drop to 25 BTC by the end of November 2012.<br />
<br />
As more blocks get generated difficulty increases, and today (as of November 2012) the estimated time to generate a block on an average gaming computer is over 2 years. Therefore it's not really worth the electricity trying to generate a block. Also note that it's random and sometimes you may get lucky and still (despite the difficulty and stuff) generate a block using your standard gaming computer. However it is very unlikely and not worth the risk of waiting months. you'll probably end up stopping it and paying your enormous electricity bill without having generated anything. But there is a solution to that which is called '''Pool Mining'''.<br />
<br />
A pool is a network of computers mining together to generate a block, and the total reward is shared between all the people that contributed to generate the block, so when using a pool you'll get smaller but regular incomes and using the appropriate hardware (see below) it may be actually a profitable business.<br />
<br />
When mining, the CPU isn't ideal and even a low-end graphics card will beat your high-end CPU so we're only using the GPU for mining, so with a correct configuration the machine used for mining can be used for something else, for example a web server, and if you're only mining then you may want to use a low-end single-core CPU and a low-end motherboard, and RAM isn't used either so 2GB of RAM is more than enough.<br />
<br />
{{Note|NVIDIA cards aren't ideal for mining and you'll waste more money (on electricity) than you'll generate, even when using a pool, so unless you do it for experimentation/fun, or if you use your computer as a heat source (i use mine in my bedroom and it's producing more heat than my usual electric heater) it's not worth it.}}<br />
<br />
{{Note|ATI/AMD cards are the best choice for this, they have a lower price and use less electricity while having extreme performance (for mining) compared to NVIDIA cards (a single ATI card is more powerful than my 3x NVIDIA GTX580), so if you're doing this for profit you need ATI cards.}}<br />
<br />
Also, there is a bug on some drivers (both ATI and NVIDIA) that makes the miner use 100% CPU on 2 cores (even if mining on the GPU), i'm not sure what causes that but it seems to also affect Windows systems so you'll have to try it yourself.<br />
<br />
== Required Packages ==<br />
<br />
# An OpenGL capable device with the correct drivers installed (proprietary driver required unfortunately)<br />
<br />
# Packages "python2", "python2-pyopencl", "python2-pyserial" and "git" available in the official repositories.<br />
<br />
# For the "run as a service part" you'll need a full-systemd installation.<br />
<br />
== Installation ==<br />
<br />
Login or switch to root:<br />
<br />
# su root<br />
<br />
Change directory to:<br />
<br />
# cd /<br />
<br />
# git clone git://github.com/m0mchil/poclbm.git<br />
<br />
{{Box BLUE|Note:|this will make a folder called "poclbm" and download the latest version in it.}}<br />
<br />
== Testing and running manually ==<br />
<br />
To run it manually, log in as root (or any user having the rights to read/write in /poclbm), cd in /poclbm like so :<br />
<br />
# cd /poclbm<br />
<br />
== Execute the miner ==<br />
<br />
Use the command below to start the miner on all OpenCL devices. If you receive the following error then check you configuration and ensure that all required packages and drivers are present:<br />
<br />
{{Box GREEN|Note:|Be sure to have your pool login and password available. You can obtain this if you register with https://mining.bitcoin.cz}}<br />
<br />
# python2 poclbm.py username:password@server:port<br />
<br />
The miner has started and will display a hash rate (x MH/s). To exit use the {{Keypress|Ctrl+C}} to exit. If you just want to run the miner manually then that's all you need to do. <br />
<br />
{{Box GREEN|Note:|When you want to mine just navigate /poclbm with the user permissions execute the miner start command above.<br />
<br />
== Running as a Service ==<br />
<br />
Create the service file:<br />
<br />
# sudo nano /usr/lib/systemd/system/poclbm.service<br />
<br />
Add the following to the file:<br />
<br />
<pre><br />
<br />
[Unit]<br />
Description=Python OpenCL Bitcoin miner<br />
After=network.target<br />
<br />
[Service]<br />
ExecStart=/poclbm/start.sh<br />
Type=simple<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
<br />
</pre><br />
<br />
Create the '''/poclbm/start.sh''' and adapt the python command using your login/password from your pool, the '''--verbose''' parameter is important :<br />
<br />
<pre><br />
<br />
#!/bin/sh<br />
cd /poclbm<br />
python2 poclbm.py user.password@server:port --verbose<br />
<br />
</pre><br />
<br />
Make the file executable with the commands below:<br />
<br />
# chmod +x /poclbm/start.sh<br />
<br />
Start the service: <br />
<br />
# systemctl start poclbm.service<br />
<br />
Stop the service with: <br />
<br />
# systemctl stop poclbm.service<br />
<br />
Check the status with the following command: <br />
<br />
# systemctl status poclbm.service<br />
<br />
Register the service to auto-start with the system: <br />
<br />
{{Warning|Only use this If you have a dedicated mining machine.}}<br />
<br />
# systemctl enable poclbm.service<br />
<br />
Disable autostart with:<br />
<br />
# systemctl disable poclbm.service</div>Chrisgukhttps://wiki.archlinux.org/index.php?title=Poclbm&diff=262023Poclbm2013-06-09T19:05:59Z<p>Chrisguk: /* Installation */</p>
<hr />
<div>[[Category:Applications]]<br />
[[Category:Arch Bitcoin mining with Poclbm]]<br />
<br />
Poclbm (Python OpenCL Bitcoin miner) is a python program/script made by m0mchil on Github (https://github.com/m0mchil/poclbm), it mines Bitcoins using an OpenCL capable device. Here's how to install and use it as a systemd service.<br />
<br />
== Introduction ==<br />
<br />
Mining Bitcoins is a process that uses your computer hardware i.e. GPU/CPU to generate "blocks" which are used to verify transactions in the Bitcoin network. Currently a generated block will give you 50 BTC. However it will drop to 25 BTC by the end of November 2012.<br />
<br />
As more blocks get generated difficulty increases, and today (as of November 2012) the estimated time to generate a block on an average gaming computer is over 2 years. Therefore it's not really worth the electricity trying to generate a block. Also note that it's random and sometimes you may get lucky and still (despite the difficulty and stuff) generate a block using your standard gaming computer. However it is very unlikely and not worth the risk of waiting months. you'll probably end up stopping it and paying your enormous electricity bill without having generated anything. But there is a solution to that which is called '''Pool Mining'''.<br />
<br />
A pool is a network of computers mining together to generate a block, and the total reward is shared between all the people that contributed to generate the block, so when using a pool you'll get smaller but regular incomes and using the appropriate hardware (see below) it may be actually a profitable business.<br />
<br />
When mining, the CPU isn't ideal and even a low-end graphics card will beat your high-end CPU so we're only using the GPU for mining, so with a correct configuration the machine used for mining can be used for something else, for example a web server, and if you're only mining then you may want to use a low-end single-core CPU and a low-end motherboard, and RAM isn't used either so 2GB of RAM is more than enough.<br />
<br />
{{Note|NVIDIA cards aren't ideal for mining and you'll waste more money (on electricity) than you'll generate, even when using a pool, so unless you do it for experimentation/fun, or if you use your computer as a heat source (i use mine in my bedroom and it's producing more heat than my usual electric heater) it's not worth it.}}<br />
<br />
{{Note|ATI/AMD cards are the best choice for this, they have a lower price and use less electricity while having extreme performance (for mining) compared to NVIDIA cards (a single ATI card is more powerful than my 3x NVIDIA GTX580), so if you're doing this for profit you need ATI cards.}}<br />
<br />
Also, there is a bug on some drivers (both ATI and NVIDIA) that makes the miner use 100% CPU on 2 cores (even if mining on the GPU), i'm not sure what causes that but it seems to also affect Windows systems so you'll have to try it yourself.<br />
<br />
== Required Packages ==<br />
<br />
# An OpenGL capable device with the correct drivers installed (proprietary driver required unfortunately)<br />
<br />
# Packages "python2", "python2-pyopencl", "python2-pyserial" and "git" available in the official repositories.<br />
<br />
# For the "run as a service part" you'll need a full-systemd installation.<br />
<br />
== Installation ==<br />
<br />
Login or switch to root:<br />
<br />
# su root<br />
<br />
Change directory to:<br />
<br />
# cd /<br />
<br />
# git clone git://github.com/m0mchil/poclbm.git<br />
<br />
{{Box BLUE|Note:|this will make a folder called "poclbm" and download the latest version in it.}}<br />
<br />
== Testing and running manually ==<br />
<br />
To run it manually, log in as root (or any user having the rights to read/write in /poclbm), cd in /poclbm like so :<br />
<br />
# cd /poclbm<br />
<br />
== Execute the miner ==<br />
<br />
Use the command below to start the miner on all OpenCL devices. If you receive the following error then check you configuration and ensure that all required packages and drivers are present:<br />
<br />
{{Box GREEN|Note:|Be sure to have your pool login and password available. You can obtain this if you register with https://mining.bitcoin.cz}}<br />
<br />
# python2 poclbm.py username:password@server:port<br />
<br />
The miner has started and will display a hash rate (x MH/s). To exit use the {{Keypress|Ctrl+C}} to exit. If you just want to run the miner manually then that's all you need to do. <br />
<br />
{{Box GREEN|Note:|When you want to mine just navigate /poclbm with the user permissions execute the miner start command above.<br />
<br />
== Running as a Service ==<br />
<br />
Create the service file:<br />
<br />
# sudo nano /usr/lib/systemd/system/poclbm.service<br />
<br />
Add the following to the file:<br />
<br />
<pre><br />
<br />
[Unit]<br />
Description=Python OpenCL Bitcoin miner<br />
After=network.target<br />
<br />
[Service]<br />
ExecStart=/poclbm/start.sh<br />
Type=simple<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
<br />
</pre><br />
<br />
Create the '''/poclbm/start.sh''' and adapt the python command using your login/password from your pool, the '''--verbose''' parameter is important :<br />
<br />
<pre><br />
<br />
#!/bin/sh<br />
cd /poclbm<br />
python2 poclbm.py user.password@server:port --verbose<br />
<br />
</pre><br />
<br />
Make the file executable with the commands below:<br />
<br />
# chmod +x /poclbm/start.sh<br />
<br />
Start the service: <br />
<br />
# systemctl start poclbm.service<br />
<br />
Stop the service with: <br />
<br />
# systemctl stop poclbm.service<br />
<br />
Check the status with the following command: <br />
<br />
# systemctl status poclbm.service<br />
<br />
Register the service to auto-start with the system: <br />
<br />
{{Warning|Only use this If you have a dedicated mining machine.}}<br />
<br />
# systemctl enable poclbm.service<br />
<br />
Disable autostart with:<br />
<br />
# systemctl disable poclbm.service</div>Chrisgukhttps://wiki.archlinux.org/index.php?title=Poclbm&diff=262022Poclbm2013-06-09T18:59:57Z<p>Chrisguk: </p>
<hr />
<div>[[Category:Applications]]<br />
[[Category:Arch Bitcoin mining with Poclbm]]<br />
<br />
Poclbm (Python OpenCL Bitcoin miner) is a python program/script made by m0mchil on Github (https://github.com/m0mchil/poclbm), it mines Bitcoins using an OpenCL capable device. Here's how to install and use it as a systemd service.<br />
<br />
== Introduction ==<br />
<br />
Mining Bitcoins is a process that uses your computer hardware i.e. GPU/CPU to generate "blocks" which are used to verify transactions in the Bitcoin network. Currently a generated block will give you 50 BTC. However it will drop to 25 BTC by the end of November 2012.<br />
<br />
As more blocks get generated difficulty increases, and today (as of November 2012) the estimated time to generate a block on an average gaming computer is over 2 years. Therefore it's not really worth the electricity trying to generate a block. Also note that it's random and sometimes you may get lucky and still (despite the difficulty and stuff) generate a block using your standard gaming computer. However it is very unlikely and not worth the risk of waiting months. you'll probably end up stopping it and paying your enormous electricity bill without having generated anything. But there is a solution to that which is called '''Pool Mining'''.<br />
<br />
A pool is a network of computers mining together to generate a block, and the total reward is shared between all the people that contributed to generate the block, so when using a pool you'll get smaller but regular incomes and using the appropriate hardware (see below) it may be actually a profitable business.<br />
<br />
When mining, the CPU isn't ideal and even a low-end graphics card will beat your high-end CPU so we're only using the GPU for mining, so with a correct configuration the machine used for mining can be used for something else, for example a web server, and if you're only mining then you may want to use a low-end single-core CPU and a low-end motherboard, and RAM isn't used either so 2GB of RAM is more than enough.<br />
<br />
{{Note|NVIDIA cards aren't ideal for mining and you'll waste more money (on electricity) than you'll generate, even when using a pool, so unless you do it for experimentation/fun, or if you use your computer as a heat source (i use mine in my bedroom and it's producing more heat than my usual electric heater) it's not worth it.}}<br />
<br />
{{Note|ATI/AMD cards are the best choice for this, they have a lower price and use less electricity while having extreme performance (for mining) compared to NVIDIA cards (a single ATI card is more powerful than my 3x NVIDIA GTX580), so if you're doing this for profit you need ATI cards.}}<br />
<br />
Also, there is a bug on some drivers (both ATI and NVIDIA) that makes the miner use 100% CPU on 2 cores (even if mining on the GPU), i'm not sure what causes that but it seems to also affect Windows systems so you'll have to try it yourself.<br />
<br />
== Required Packages ==<br />
<br />
# An OpenGL capable device with the correct drivers installed (proprietary driver required unfortunately)<br />
<br />
# Packages "python2", "python2-pyopencl", "python2-pyserial" and "git" available in the official repositories.<br />
<br />
# For the "run as a service part" you'll need a full-systemd installation.<br />
<br />
== Installation ==<br />
<br />
Log in as root, cd to / and execute this command :<br />
<br />
# git clone git://github.com/m0mchil/poclbm.git<br />
<br />
{{Box BLUE|Note:|this will make a folder called "poclbm" and download the latest version in it.}}<br />
<br />
== Testing and running manually ==<br />
<br />
To run it manually, log in as root (or any user having the rights to read/write in /poclbm), cd in /poclbm like so :<br />
<br />
# cd /poclbm<br />
<br />
== Execute the miner ==<br />
<br />
Use the command below to start the miner on all OpenCL devices. If you receive the following error then check you configuration and ensure that all required packages and drivers are present:<br />
<br />
{{Box GREEN|Note:|Be sure to have your pool login and password available. You can obtain this if you register with https://mining.bitcoin.cz}}<br />
<br />
# python2 poclbm.py username:password@server:port<br />
<br />
The miner has started and will display a hash rate (x MH/s). To exit use the {{Keypress|Ctrl+C}} to exit. If you just want to run the miner manually then that's all you need to do. <br />
<br />
{{Box GREEN|Note:|When you want to mine just navigate /poclbm with the user permissions execute the miner start command above.<br />
<br />
== Running as a Service ==<br />
<br />
Create the service file:<br />
<br />
# sudo nano /usr/lib/systemd/system/poclbm.service<br />
<br />
Add the following to the file:<br />
<br />
<pre><br />
<br />
[Unit]<br />
Description=Python OpenCL Bitcoin miner<br />
After=network.target<br />
<br />
[Service]<br />
ExecStart=/poclbm/start.sh<br />
Type=simple<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
<br />
</pre><br />
<br />
Create the '''/poclbm/start.sh''' and adapt the python command using your login/password from your pool, the '''--verbose''' parameter is important :<br />
<br />
<pre><br />
<br />
#!/bin/sh<br />
cd /poclbm<br />
python2 poclbm.py user.password@server:port --verbose<br />
<br />
</pre><br />
<br />
Make the file executable with the commands below:<br />
<br />
# chmod +x /poclbm/start.sh<br />
<br />
Start the service: <br />
<br />
# systemctl start poclbm.service<br />
<br />
Stop the service with: <br />
<br />
# systemctl stop poclbm.service<br />
<br />
Check the status with the following command: <br />
<br />
# systemctl status poclbm.service<br />
<br />
Register the service to auto-start with the system: <br />
<br />
{{Warning|Only use this If you have a dedicated mining machine.}}<br />
<br />
# systemctl enable poclbm.service<br />
<br />
Disable autostart with:<br />
<br />
# systemctl disable poclbm.service</div>Chrisgukhttps://wiki.archlinux.org/index.php?title=Poclbm&diff=262021Poclbm2013-06-09T18:57:34Z<p>Chrisguk: /* Running as a Service */</p>
<hr />
<div>[[Category:Applications]]<br />
<br />
Poclbm (Python OpenCL Bitcoin miner) is a python program/script made by m0mchil on Github (https://github.com/m0mchil/poclbm), it mines Bitcoins using an OpenCL capable device. Here's how to install and use it as a systemd service.<br />
<br />
== Introduction ==<br />
<br />
Mining Bitcoins is a process that uses your computer hardware i.e. GPU/CPU to generate "blocks" which are used to verify transactions in the Bitcoin network. Currently a generated block will give you 50 BTC. However it will drop to 25 BTC by the end of November 2012.<br />
<br />
As more blocks get generated difficulty increases, and today (as of November 2012) the estimated time to generate a block on an average gaming computer is over 2 years. Therefore it's not really worth the electricity trying to generate a block. Also note that it's random and sometimes you may get lucky and still (despite the difficulty and stuff) generate a block using your standard gaming computer. However it is very unlikely and not worth the risk of waiting months. you'll probably end up stopping it and paying your enormous electricity bill without having generated anything. But there is a solution to that which is called '''Pool Mining'''.<br />
<br />
A pool is a network of computers mining together to generate a block, and the total reward is shared between all the people that contributed to generate the block, so when using a pool you'll get smaller but regular incomes and using the appropriate hardware (see below) it may be actually a profitable business.<br />
<br />
When mining, the CPU isn't ideal and even a low-end graphics card will beat your high-end CPU so we're only using the GPU for mining, so with a correct configuration the machine used for mining can be used for something else, for example a web server, and if you're only mining then you may want to use a low-end single-core CPU and a low-end motherboard, and RAM isn't used either so 2GB of RAM is more than enough.<br />
<br />
{{Note|NVIDIA cards aren't ideal for mining and you'll waste more money (on electricity) than you'll generate, even when using a pool, so unless you do it for experimentation/fun, or if you use your computer as a heat source (i use mine in my bedroom and it's producing more heat than my usual electric heater) it's not worth it.}}<br />
<br />
{{Note|ATI/AMD cards are the best choice for this, they have a lower price and use less electricity while having extreme performance (for mining) compared to NVIDIA cards (a single ATI card is more powerful than my 3x NVIDIA GTX580), so if you're doing this for profit you need ATI cards.}}<br />
<br />
Also, there is a bug on some drivers (both ATI and NVIDIA) that makes the miner use 100% CPU on 2 cores (even if mining on the GPU), i'm not sure what causes that but it seems to also affect Windows systems so you'll have to try it yourself.<br />
<br />
== Required Packages ==<br />
<br />
# An OpenGL capable device with the correct drivers installed (proprietary driver required unfortunately)<br />
<br />
# Packages "python2", "python2-pyopencl", "python2-pyserial" and "git" available in the official repositories.<br />
<br />
# For the "run as a service part" you'll need a full-systemd installation.<br />
<br />
== Installation ==<br />
<br />
Log in as root, cd to / and execute this command :<br />
<br />
# git clone git://github.com/m0mchil/poclbm.git<br />
<br />
{{Box BLUE|Note:|this will make a folder called "poclbm" and download the latest version in it.}}<br />
<br />
== Testing and running manually ==<br />
<br />
To run it manually, log in as root (or any user having the rights to read/write in /poclbm), cd in /poclbm like so :<br />
<br />
# cd /poclbm<br />
<br />
== Execute the miner ==<br />
<br />
Use the command below to start the miner on all OpenCL devices. If you receive the following error then check you configuration and ensure that all required packages and drivers are present:<br />
<br />
{{Box GREEN|Note:|Be sure to have your pool login and password available. You can obtain this if you register with https://mining.bitcoin.cz}}<br />
<br />
# python2 poclbm.py username:password@server:port<br />
<br />
The miner has started and will display a hash rate (x MH/s). To exit use the {{Keypress|Ctrl+C}} to exit. If you just want to run the miner manually then that's all you need to do. <br />
<br />
{{Box GREEN|Note:|When you want to mine just navigate /poclbm with the user permissions execute the miner start command above.<br />
<br />
== Running as a Service ==<br />
<br />
Create the service file:<br />
<br />
# sudo nano /usr/lib/systemd/system/poclbm.service<br />
<br />
Add the following to the file:<br />
<br />
<pre><br />
<br />
[Unit]<br />
Description=Python OpenCL Bitcoin miner<br />
After=network.target<br />
<br />
[Service]<br />
ExecStart=/poclbm/start.sh<br />
Type=simple<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
<br />
</pre><br />
<br />
Create the '''/poclbm/start.sh''' and adapt the python command using your login/password from your pool, the '''--verbose''' parameter is important :<br />
<br />
<pre><br />
<br />
#!/bin/sh<br />
cd /poclbm<br />
python2 poclbm.py user.password@server:port --verbose<br />
<br />
</pre><br />
<br />
Make the file executable with the commands below:<br />
<br />
# chmod +x /poclbm/start.sh<br />
<br />
Start the service: <br />
<br />
# systemctl start poclbm.service<br />
<br />
Stop the service with: <br />
<br />
# systemctl stop poclbm.service<br />
<br />
Check the status with the following command: <br />
<br />
# systemctl status poclbm.service<br />
<br />
Register the service to auto-start with the system: <br />
<br />
{{Warning|Only use this If you have a dedicated mining machine.}}<br />
<br />
# systemctl enable poclbm.service<br />
<br />
Disable autostart with:<br />
<br />
# systemctl disable poclbm.service</div>Chrisgukhttps://wiki.archlinux.org/index.php?title=Poclbm&diff=262020Poclbm2013-06-09T18:56:20Z<p>Chrisguk: </p>
<hr />
<div>[[Category:Applications]]<br />
<br />
Poclbm (Python OpenCL Bitcoin miner) is a python program/script made by m0mchil on Github (https://github.com/m0mchil/poclbm), it mines Bitcoins using an OpenCL capable device. Here's how to install and use it as a systemd service.<br />
<br />
== Introduction ==<br />
<br />
Mining Bitcoins is a process that uses your computer hardware i.e. GPU/CPU to generate "blocks" which are used to verify transactions in the Bitcoin network. Currently a generated block will give you 50 BTC. However it will drop to 25 BTC by the end of November 2012.<br />
<br />
As more blocks get generated difficulty increases, and today (as of November 2012) the estimated time to generate a block on an average gaming computer is over 2 years. Therefore it's not really worth the electricity trying to generate a block. Also note that it's random and sometimes you may get lucky and still (despite the difficulty and stuff) generate a block using your standard gaming computer. However it is very unlikely and not worth the risk of waiting months. you'll probably end up stopping it and paying your enormous electricity bill without having generated anything. But there is a solution to that which is called '''Pool Mining'''.<br />
<br />
A pool is a network of computers mining together to generate a block, and the total reward is shared between all the people that contributed to generate the block, so when using a pool you'll get smaller but regular incomes and using the appropriate hardware (see below) it may be actually a profitable business.<br />
<br />
When mining, the CPU isn't ideal and even a low-end graphics card will beat your high-end CPU so we're only using the GPU for mining, so with a correct configuration the machine used for mining can be used for something else, for example a web server, and if you're only mining then you may want to use a low-end single-core CPU and a low-end motherboard, and RAM isn't used either so 2GB of RAM is more than enough.<br />
<br />
{{Note|NVIDIA cards aren't ideal for mining and you'll waste more money (on electricity) than you'll generate, even when using a pool, so unless you do it for experimentation/fun, or if you use your computer as a heat source (i use mine in my bedroom and it's producing more heat than my usual electric heater) it's not worth it.}}<br />
<br />
{{Note|ATI/AMD cards are the best choice for this, they have a lower price and use less electricity while having extreme performance (for mining) compared to NVIDIA cards (a single ATI card is more powerful than my 3x NVIDIA GTX580), so if you're doing this for profit you need ATI cards.}}<br />
<br />
Also, there is a bug on some drivers (both ATI and NVIDIA) that makes the miner use 100% CPU on 2 cores (even if mining on the GPU), i'm not sure what causes that but it seems to also affect Windows systems so you'll have to try it yourself.<br />
<br />
== Required Packages ==<br />
<br />
# An OpenGL capable device with the correct drivers installed (proprietary driver required unfortunately)<br />
<br />
# Packages "python2", "python2-pyopencl", "python2-pyserial" and "git" available in the official repositories.<br />
<br />
# For the "run as a service part" you'll need a full-systemd installation.<br />
<br />
== Installation ==<br />
<br />
Log in as root, cd to / and execute this command :<br />
<br />
# git clone git://github.com/m0mchil/poclbm.git<br />
<br />
{{Box BLUE|Note:|this will make a folder called "poclbm" and download the latest version in it.}}<br />
<br />
== Testing and running manually ==<br />
<br />
To run it manually, log in as root (or any user having the rights to read/write in /poclbm), cd in /poclbm like so :<br />
<br />
# cd /poclbm<br />
<br />
== Execute the miner ==<br />
<br />
Use the command below to start the miner on all OpenCL devices. If you receive the following error then check you configuration and ensure that all required packages and drivers are present:<br />
<br />
{{Box GREEN|Note:|Be sure to have your pool login and password available. You can obtain this if you register with https://mining.bitcoin.cz}}<br />
<br />
# python2 poclbm.py username:password@server:port<br />
<br />
The miner has started and will display a hash rate (x MH/s). To exit use the {{Keypress|Ctrl+C}} to exit. If you just want to run the miner manually then that's all you need to do. <br />
<br />
{{Box GREEN|Note:|When you want to mine just navigate /poclbm with the user permissions execute the miner start command above.<br />
<br />
== Running as a Service ==<br />
<br />
Create the service file:<br />
<br />
# sudo nano /usr/lib/systemd/system/poclbm.service<br />
<br />
Add the following to the file:<br />
<br />
<pre><br />
<br />
[Unit]<br />
Description=Python OpenCL Bitcoin miner<br />
After=network.target<br />
<br />
[Service]<br />
ExecStart=/poclbm/start.sh<br />
Type=simple<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
<br />
</pre><br />
<br />
Create the '''/poclbm/start.sh''' and adapt the python command using your login/password from your pool, the '''--verbose''' parameter is important :<br />
<br />
<pre><br />
<br />
#!/bin/sh<br />
cd /poclbm<br />
python2 poclbm.py user.password@server:port --verbose<br />
<br />
</pre><br />
<br />
Make the file executable with the commands below:<br />
<br />
# chmod +x /poclbm/start.sh<br />
<br />
Start the service: <br />
<br />
# systemctl start poclbm.service<br />
<br />
Stop the service with: <br />
<br />
# systemctl stop poclbm.service<br />
<br />
Check the status with the following command: <br />
<br />
# systemctl status poclbm.service<br />
<br />
Register the service to auto-start with the system: {{Warning|If you have a dedicated mining machine}} <br />
<br />
# systemctl enable poclbm.service<br />
<br />
Disable autostart with:<br />
<br />
# systemctl disable poclbm.service</div>Chrisguk