2
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)?
1You can always check the process ID if its terminated or not. Or just wait 15 seconds. The fact that it still runs in
topfor a couple of seconds is probably due to finalising the database, release all memory and stuff. I think you better put asleep(15)(or 30, for safety's sake) then to program around it and make every millisecond count. – Mathias711 – 2014-04-30T15:29:09.807Is 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 – 2014-04-30T19:39:43.487
1I 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 – 2014-04-30T20:15:35.597
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 – 2014-04-30T21:00:26.100