<p>On Linux, get the process id of <code>bitcoind</code> and read  <code>/proc/&lt;pid&gt;/cmdline</code>.</p>

<p>On Windows, use <code>wmic path win32_process where "name = 'bitcoind.exe'" get commandline</code></p>

CC BY-SA 4.0
2019-02-13T19:04:27.973Z
2019-02-13T19:04:27.973Z
Mark H
<p>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. <code>-server=0/1</code> changing).</p>

<p>For example, I may want to know if <code>-addresstype</code>, <code>-disablewallet</code>, <code>-rescan</code>, or <code>-uacomment=&lt;cmt&gt;</code> or some other flag has been set. </p>

<p>Or for Namecoin, it would be very useful to know if <code>-namehistory</code> has been set.</p>

<p>Is there an RPC or any other method to find out? </p>

<hr>

<p>Or, to ask the question a different way...</p>

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

<p>In src/util.cpp we have:</p>

<pre><code>map&lt;string, string&gt; mapArgs;
static map&lt;string, vector&lt;string&gt; &gt; _mapMultiArgs;
const map&lt;string, vector&lt;string&gt; &gt;&amp; mapMultiArgs = _mapMultiArgs;
</code></pre>

<p>To store flags/options/args. </p>

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

<bitcoin-core><bitcoind><json-rpc><bitcoin-core-development>
How to discover startup flags or command-line options for bitcoind?
Ryan Smyth
# How to discover startup flags or command-line options for bitcoind?

(Asked by: username_0 on 2019-02-13)

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.

**Tags:** bitcoin-core, bitcoind, json-rpc, bitcoin-core-development


---

## 1 answers

### Answer by username_1 on 2019-02-13. Score: 4 | Accepted answer

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`


---

