<blockquote>
  <p>the terminal is just hanging there</p>
</blockquote>

<p>Yes, if you want it to run in the background, you need to run with the <code>-daemon</code> flag.</p>

<blockquote>
  <p>how can I examine the activity?</p>
</blockquote>

<p>You can look at the <code>debug.log</code> file (in the <a href="https://bitcoin.stackexchange.com/a/4007/208">datadir</a>), or you can run with the <code>-printtoconsole</code> flag. You can increase the verbosity using the <code>-debug</code> flag (or specify a specific category, for example <code>-debug=mempool</code>; to see the various debug categories and more, use <code>-help</code>).</p>

<blockquote>
  <p>For instance, see the coins that are being generated in my wallet, etc. </p>
</blockquote>

<p>The built-in miner was <a href="https://bitcoin.org/en/release/v0.13.0#removal-of-internal-miner" rel="nofollow noreferrer">removed in Bitcoin Core v0.13.0</a>, as it was not even useful for testing purposes anymore. If you want coins, you'll need to either buy them, get someone to send you some, or run a mining setup (which at the time of writing almost certainly requires custom ASIC hardware).</p>

<blockquote>
  <p>I've tried this proposed solution, i.e. to write</p>
  
  <blockquote>
    <p>bitcoind getinfo</p>
  </blockquote>
</blockquote>

<p>You need to use <code>bitcoin-cli</code> now to communicate with <code>bitcoind</code> (since a few years ago...). The <code>getinfo</code> command still works but is deprecated. More specific information can be obtained using the RPC calls:</p>

<ul>
<li><code>getblockchaininfo</code></li>
<li><code>getpeerinfo</code></li>
<li><code>getnetworkinfo</code></li>
<li><code>getwalletinfo</code></li>
<li><code>gettxoutsetinfo</code></li>
<li><code>getaddednodeinfo</code></li>
<li><code>getmempoolinfo</code></li>
</ul>

CC BY-SA 3.0
2017-04-18T13:40:52.387Z
I think I sort of got what I was looking for with this one `./src/bitcoin-cli getinfo`, but actually I don't want to connect to the real bitcoin network, I want to start over from scratch, create my own personal testnet, do you know how to do this?
smatthewenglish
CC BY-SA 3.0
2017-04-18T13:44:11.887Z
so then does that mean that I can't use bitcoin core for creating a testnet, since it can't mine?
smatthewenglish
CC BY-SA 3.0
2017-04-18T13:47:40.303Z
how to get around this error `error: Could not locate RPC credentials. No authentication cookie could be found, and no rpcpassword is set in the configuration file (/root/.bitcoin/bitcoin.conf)`
smatthewenglish
CC BY-SA 3.0
2017-04-18T13:48:39.167Z
That means `bitcoind` is not running (or perhaps you're running it with `-testnet` or `-regtest` but not passing that same argument to `bitcoin-cli`?).
Pieter Wuille
CC BY-SA 3.0
2017-04-18T13:56:14.943Z
And you can always run external mining software (like bfgminer) to construct blocks; it's much faster than any code we're able to maintain in Core. If it's just for a local testnet (-regtest mode), you can use the built-in `generate` RPC still (but only for chains where the difficulty is trivially low).
Pieter Wuille
CC BY-SA 3.0
2017-04-18T14:17:10.543Z
ah, ok. thank you for these insights. do you know what steps I would need to take to generate a fresh testnet from scratch? what I'd like to do eventually is have my own version of a real fork that I can make changes to- but I guess I might start by just creating my own version of bitcoin on a small network with some of my own machines
smatthewenglish
CC BY-SA 3.0
2017-04-18T14:21:18.897Z
I would suggest to start in `-regtest` mode. You'll get an empty chain with only a genesis block, and no default connections anywhere. You can then use -connect to add nodes to your network and experiment. If you're further ahead, modify chainparams.cpp to add a definition for your own network and logic to select it.
Pieter Wuille
CC BY-SA 3.0
2017-04-18T16:11:40.910Z
do you know what I should do to chainparams.cpp  to define my own network?
smatthewenglish
CC BY-SA 3.0
2017-04-18T16:17:53.890Z
That's far too much to explain in comments of an answer here. I suggest you study the source code and experiment with regtest first.
Pieter Wuille
CC BY-SA 3.0
2017-04-19T11:37:29.747Z
I've tried to start with 'regtest' and I got again that rpc error, and something about not enough arguments, do you know some resource I could look at about this?
smatthewenglish
CC BY-SA 3.0
2017-04-19T11:38:53.337Z
https://bitcoin.org/en/developer-examples#regtest-mode
Pieter Wuille
CC BY-SA 3.0
2017-04-19T11:40:22.910Z
I read that and tried those examples but it's what generated that not enough arguments error- also sometimes it refers to 'bitcoind' and sometimes 'cli', what about this one: https://bitcoin.stackexchange.com/questions/28107/bitcoin-is-not-connected-in-regtest-mode
smatthewenglish
CC BY-SA 3.0
2017-04-19T11:43:06.810Z
Can you open a new question with the exact commands you're running and error messages you get?
Pieter Wuille
CC BY-SA 3.0
2017-04-19T11:44:02.150Z
yes, sure I'll do that
smatthewenglish
CC BY-SA 3.0
2017-04-19T11:48:13.080Z
https://bitcoin.stackexchange.com/questions/52857/trouble-with-bitcoin-cli-regtest
smatthewenglish
CC BY-SA 3.0
2017-04-18T13:38:42.663Z
2017-04-18T13:44:47.607Z
2017-04-18T13:44:47.607Z
Pieter Wuille
<p>I've created a docker container of an ubuntu machine, loaded it up with all the dependencies specified in the unix build doc and then built bitcoin and run it with the following command: </p>

<pre><code>./src/bitcoind
</code></pre>

<p>after that there's no output or evidence that anything is happening, the terminal is just hanging there, clearly something is going on- but I don't know/can't see what it is. </p>

<p>how can I examine the activity? For instance, see the coins that are being generated in my wallet, etc. </p>

<p>I've tried <a href="https://bitcoin.stackexchange.com/questions/18033/what-does-getinfo-output-mean">this proposed solution</a>, i.e. to write </p>

<pre><code>bitcoind getinfo
</code></pre>

<p>but I got the error </p>

<pre><code>Error: There is no RPC client functionality in bitcoind anymore. Use the bitcoin-cli utility instead.
</code></pre>

<hr>

<p><strong>Regarding</strong> <code>-regtest</code></p>

<p>I tried with: </p>

<pre><code>./src/bitcoin-cli -regtest &amp;
</code></pre>

<p>and I got the error:</p>

<pre><code>too few parameters (need at least command)
</code></pre>

<bitcoin-core>
interacting with bitcoin over docker
smatthewenglish
# interacting with bitcoin over docker

(Asked by: username_0 on 2017-04-18)

I've created a docker container of an ubuntu machine, loaded it up with all the dependencies specified in the unix build doc and then built bitcoin and run it with the following command:

```
./src/bitcoind

```

after that there's no output or evidence that anything is happening, the terminal is just hanging there, clearly something is going on- but I don't know/can't see what it is.

how can I examine the activity? For instance, see the coins that are being generated in my wallet, etc.

I've tried [this proposed solution](https://bitcoin.stackexchange.com/questions/18033/what-does-getinfo-output-mean), i.e. to write

```
bitcoind getinfo

```

but I got the error

```
Error: There is no RPC client functionality in bitcoind anymore. Use the bitcoin-cli utility instead.

```

---

**Regarding** `-regtest`

I tried with:

```
./src/bitcoin-cli -regtest &

```

and I got the error:

```
too few parameters (need at least command)

```

**Tags:** bitcoin-core


---

## 1 answers

### Answer by username_1 on 2017-04-18. Score: 5 | Accepted answer

> the terminal is just hanging there

Yes, if you want it to run in the background, you need to run with the `-daemon` flag.

> how can I examine the activity?

You can look at the `debug.log` file (in the [datadir](https://bitcoin.stackexchange.com/a/4007/208)), or you can run with the `-printtoconsole` flag. You can increase the verbosity using the `-debug` flag (or specify a specific category, for example `-debug=mempool`; to see the various debug categories and more, use `-help`).

> For instance, see the coins that are being generated in my wallet, etc.

The built-in miner was [removed in Bitcoin Core v0.13.0](https://bitcoin.org/en/release/v0.13.0#removal-of-internal-miner), as it was not even useful for testing purposes anymore. If you want coins, you'll need to either buy them, get someone to send you some, or run a mining setup (which at the time of writing almost certainly requires custom ASIC hardware).

> I've tried this proposed solution, i.e. to write
>
> > bitcoind getinfo

You need to use `bitcoin-cli` now to communicate with `bitcoind` (since a few years ago...). The `getinfo` command still works but is deprecated. More specific information can be obtained using the RPC calls:

* `getblockchaininfo`
* `getpeerinfo`
* `getnetworkinfo`
* `getwalletinfo`
* `gettxoutsetinfo`
* `getaddednodeinfo`
* `getmempoolinfo`

> **Comments:**
> **username_0**: I think I sort of got what I was looking for with this one `./src/bitcoin-cli getinfo`, but actually I don't want to connect to the real bitcoin network, I want to start over from scratch, create my own personal testnet, do you know how to do this?  
> **username_0**: so then does that mean that I can't use bitcoin core for creating a testnet, since it can't mine?  
> **username_0**: how to get around this error `error: Could not locate RPC credentials. No authentication cookie could be found, and no rpcpassword is set in the configuration file (/root/.bitcoin/bitcoin.conf)`  
> **username_1**: That means `bitcoind` is not running (or perhaps you're running it with `-testnet` or `-regtest` but not passing that same argument to `bitcoin-cli`?).  
> **username_1**: And you can always run external mining software (like bfgminer) to construct blocks; it's much faster than any code we're able to maintain in Core. If it's just for a local testnet (-regtest mode), you can use the built-in `generate` RPC still (but only for chains where the difficulty is trivially low).  
> **username_0**: ah, ok. thank you for these insights. do you know what steps I would need to take to generate a fresh testnet from scratch? what I'd like to do eventually is have my own version of a real fork that I can make changes to- but I guess I might start by just creating my own version of bitcoin on a small network with some of my own machines  
> **username_1**: I would suggest to start in `-regtest` mode. You'll get an empty chain with only a genesis block, and no default connections anywhere. You can then use -connect to add nodes to your network and experiment. If you're further ahead, modify chainparams.cpp to add a definition for your own network and logic to select it.  
> **username_0**: do you know what I should do to chainparams.cpp  to define my own network?  
> **username_1**: That's far too much to explain in comments of an answer here. I suggest you study the source code and experiment with regtest first.  
> **username_0**: I've tried to start with 'regtest' and I got again that rpc error, and something about not enough arguments, do you know some resource I could look at about this?  
> **username_1**: https://bitcoin.org/en/developer-examples#regtest-mode  
> **username_0**: I read that and tried those examples but it's what generated that not enough arguments error- also sometimes it refers to 'bitcoind' and sometimes 'cli', what about this one: https://bitcoin.stackexchange.com/questions/28107/bitcoin-is-not-connected-in-regtest-mode  
> **username_1**: Can you open a new question with the exact commands you're running and error messages you get?  
> **username_0**: yes, sure I'll do that  
> **username_0**: https://bitcoin.stackexchange.com/questions/52857/trouble-with-bitcoin-cli-regtest  

---

