Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: a.miner on May 17, 2014, 07:28:45 PM



Title: bitcoind -- How to monitor remotely from the console?
Post by: a.miner on May 17, 2014, 07:28:45 PM

I'm running bitcoind on a dedicated machine behind a firewall, and I only let ports 8333 and 9333 through that wall.  And 22, for SSH and SCP.

So, how can I monitor my bitcoin node remotely under these conditions?

I would like to keep a log file on a remote machine, together with a real-time display, so if something goes wrong, I know it's time to go visit my hardware.


Title: Re: bitcoind -- How to monitor remotely from the console?
Post by: grue on May 17, 2014, 08:16:45 PM
are you monitoring your miners, or just bitcoind? if you only want to monitor bitcoind, you can use ssh to view the logs or issue the getinfo command.


Title: Re: bitcoind -- How to monitor remotely from the console?
Post by: alexrossi on May 18, 2014, 05:06:20 PM
Have you already configured a dedicated screen session for the bitcoind instance? So when you quit SSH it doesn't close.


Title: Re: bitcoind -- How to monitor remotely from the console?
Post by: a.miner on May 19, 2014, 05:36:37 AM
are you monitoring your miners, or just bitcoind? if you only want to monitor bitcoind, you can use ssh to view the logs or issue the getinfo command.
Well, I would like to monitor the miners, but I can't think of a way to do it without opening up my local network.  Right now, they are invisible to the internet.

I also have p2pool running, and I want to monitor that, too.  I started a thread in the pools forum (https://bitcointalk.org/index.php?topic=613053) to talk about that.

By the way, where are these log files that bitcoind writes and what are they called?


Title: Re: bitcoind -- How to monitor remotely from the console?
Post by: a.miner on May 19, 2014, 06:26:48 AM
Have you already configured a dedicated screen session for the bitcoind instance? So when you quit SSH it doesn't close.
screen is a very nice utility, which I am definitely going to have to learn about; people are suggesting it in my p2pool thread, too.

What I would like to do is run bitcoind with the -printtoconsole option, and have screen capture the output to a file, so stuff isn't lost when it scrolls off the top of the screen.


Title: Re: bitcoind -- How to monitor remotely from the console?
Post by: a.miner on May 20, 2014, 10:40:47 PM
There are a lot of interesting files in ~/.bitcoin with intriguing names like database and db.log and debug.log and such like.

I could just grab these files with sftp and extract the information I want once I have them here.

Where can I find documentation for the file formats?


Title: Re: bitcoind -- How to monitor remotely from the console?
Post by: grue on May 20, 2014, 11:57:34 PM
everything except for bitcoin.conf and debug.log are not meant to be human-readable. contrary to what its name suggests, db.log does not contain logging information for databases.


Title: Re: bitcoind -- How to monitor remotely from the console?
Post by: linelec on May 23, 2014, 02:23:33 PM
Have you already configured a dedicated screen session for the bitcoind instance? So when you quit SSH it doesn't close.

You don't need a screen session, just start bitcoind this way:

bitcoind -daemon



Title: Re: bitcoind -- How to monitor remotely from the console?
Post by: linelec on May 23, 2014, 02:53:13 PM

I'm running bitcoind on a dedicated machine behind a firewall, and I only let ports 8333 and 9333 through that wall.  And 22, for SSH and SCP.

So, how can I monitor my bitcoin node remotely under these conditions?

I would like to keep a log file on a remote machine, together with a real-time display, so if something goes wrong, I know it's time to go visit my hardware.


I'm completely newbie.

I don't run bitcoind in my own space but as another user and can connect it from my user directory. I've put rpcuser & rpcpassword in my own ~/.bitcoin/bitcoin.conf
Now i can mess around with some bitcoind commands. Even shutdown bitcoind. But if I start it, it'll run under my UID.

The same thing must be possible from on PC to another via some port, 8333, without ssh.
By just adding some values in the bitcoin.conf or command line of the client. But I don't know how yet.