2

I'd like to query the Bitcoin daemon (bitcoind) to find out what startup flags (command-line options) were sent to it on startup (or the current state if it has changed, e.g. -server=0/1 changing).

For example, I may want to know if -addresstype, -disablewallet, -rescan, or -uacomment=<cmt> or some other flag has been set.

Or for Namecoin, it would be very useful to know if -namehistory has been set.

Is there an RPC or any other method to find out?


Or, to ask the question a different way...

src/bitcoind.cpp's bool AppInit(int argc, char* argv[]) method calls ParseParameters(argc, argv);, which is in src/util.cpp.

In src/util.cpp we have:

map<string, string> mapArgs;
static map<string, vector<string> > _mapMultiArgs;
const map<string, vector<string> >& mapMultiArgs = _mapMultiArgs;

To store flags/options/args.

I'd basically just like to get whatever is in those variables through bitcoind.

1 Answer 1

4

On Linux, get the process id of bitcoind and read /proc/<pid>/cmdline.

On Windows, use wmic path win32_process where "name = 'bitcoind.exe'" get commandline

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.