<p>On linux: </p>

<pre><code>ps aux | grep bitcoind
</code></pre>

<p>Or even:</p>

<pre><code>watch ps aux | grep bitcoind
</code></pre>

<p>But to answer your question slightly differently I'd suggest keeping existing bitcoind running.  Then your new node add a connect statement with the local ip of the old node in the bitcoin.conf file (located usually in $HOME/.bitcoin/).  </p>

<p>Your new node will then solely connect to the existing node and download, via your local network all the blocks from the existing node.</p>

<p>Also if both PCs are imobile you could leave it that way to avoid duplicate downloads from the internet.  An alternative if the second is a laptop for example is to use -addnode instead. From <a href="https://en.bitcoin.it/wiki/Running_Bitcoin" rel="nofollow">here</a>:</p>

<pre><code>-addnode=&lt;ip&gt;          Add a node to connect to and attempt to keep the connection open
-connect=&lt;ip&gt;          Connect only to the specified node(s)
-dns                   Allow DNS lookups for -addnode, -seednode and -connect (default: 1)
</code></pre>

CC BY-SA 3.0
2015-09-21T14:56:17.750Z
2015-09-21T14:56:17.750Z
Louis
<p>I would like to take bitcoin block data and send it use it to avoid having to go through the blockchain download again on other computers in my local network. To ensure that no db corruption occurs, I stop bitcoin before the transfer. Running the unix command <code>bitcoind stop</code> will return </p>

<pre><code>Bitcoin has stopped running!
</code></pre>

<p>I notice that it does still run in top for a few moments after getting this message. This is not a problem right as it's never more than 15 seconds, however I am looking to automate this process using a simple php script.</p>

<p>Using bitcoin-rpc command such as <code>$status = $bitcoin-&gt;stop()</code> would yeild a result of "Bitcoin has stopped running" but it may still be running in top.</p>

<p>How do I make sure that bitcoin really stopped running? Or is it safe to preform data transfer as soon as I get this message (does bitcoin keep writing to db after it notifies you it has stopped)?</p>

CC BY-SA 3.0
2014-04-30T15:29:09.807Z
You can always check the process ID if its terminated or not. Or just wait 15 seconds. The fact that it still runs in `top` for a couple of seconds is probably due to finalising the database, release all memory and stuff. I think you better put a `sleep(15)` (or 30, for safety's sake) then to program around it and make every millisecond count.
Mathias711
CC BY-SA 3.0
2014-04-30T19:39:43.487Z
Is there any way to effectively check? I know I can wait and it will likely work, but what if bitcoind gets stuck doing something? (It could be getting stuck due to another program)
Mark
CC BY-SA 3.0
2014-04-30T20:15:35.597Z
I am mobile right now, so I can't search or try things and I am most certainly not into php, but I think there must be a way. Otherwise ask on the stack overflow site, because this is programming related, not Bitcoin.
Mathias711
CC BY-SA 3.0
2014-04-30T21:00:26.100Z
I was hoping somebody had bitcoin related experience with this, though you're right it's probably a question which is more programming oriented and the valid answer for another program would work for bitcoind. Thanks for your help!
Mark
<linux><daemon>
How to tell when bitcoin has really stopped running
Mark
# How to tell when bitcoin has really stopped running

(Asked by: username_0 on 2014-04-30)

I would like to take bitcoin block data and send it use it to avoid having to go through the blockchain download again on other computers in my local network. To ensure that no db corruption occurs, I stop bitcoin before the transfer. Running the unix command `bitcoind stop` will return

```
Bitcoin has stopped running!

```

I notice that it does still run in top for a few moments after getting this message. This is not a problem right as it's never more than 15 seconds, however I am looking to automate this process using a simple php script.

Using bitcoin-rpc command such as `$status = $bitcoin->stop()` would yeild a result of "Bitcoin has stopped running" but it may still be running in top.

How do I make sure that bitcoin really stopped running? Or is it safe to preform data transfer as soon as I get this message (does bitcoin keep writing to db after it notifies you it has stopped)?

**Tags:** linux, daemon

> **Comments:**
> **username_1**: You can always check the process ID if its terminated or not. Or just wait 15 seconds. The fact that it still runs in `top` for a couple of seconds is probably due to finalising the database, release all memory and stuff. I think you better put a `sleep(15)` (or 30, for safety's sake) then to program around it and make every millisecond count.  
> **username_0**: Is there any way to effectively check? I know I can wait and it will likely work, but what if bitcoind gets stuck doing something? (It could be getting stuck due to another program)  
> **username_1**: I am mobile right now, so I can't search or try things and I am most certainly not into php, but I think there must be a way. Otherwise ask on the stack overflow site, because this is programming related, not Bitcoin.  
> **username_0**: I was hoping somebody had bitcoin related experience with this, though you're right it's probably a question which is more programming oriented and the valid answer for another program would work for bitcoind. Thanks for your help!  

---

## 1 answers

### Answer by username_2 on 2015-09-21. Score: 1

On linux:

```
ps aux | grep bitcoind

```

Or even:

```
watch ps aux | grep bitcoind

```

But to answer your question slightly differently I'd suggest keeping existing bitcoind running. Then your new node add a connect statement with the local ip of the old node in the bitcoin.conf file (located usually in $HOME/.bitcoin/).

Your new node will then solely connect to the existing node and download, via your local network all the blocks from the existing node.

Also if both PCs are imobile you could leave it that way to avoid duplicate downloads from the internet. An alternative if the second is a laptop for example is to use -addnode instead. From [here](https://en.bitcoin.it/wiki/Running_Bitcoin):

```
-addnode=<ip>          Add a node to connect to and attempt to keep the connection open
-connect=<ip>          Connect only to the specified node(s)
-dns                   Allow DNS lookups for -addnode, -seednode and -connect (default: 1)

```


---

