Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This seems like such a silly question, but I can't seem to find the answer.

Usually I start mongo via

service mongodb start

But I need to increase the namespace size... So I have done this:

service mongodb start --nssize 1000000000

Is this the correct syntax? I can't find a way for mongo to output the nssize it is using, nor can I find any way to determine the argument is being properly handled...

share|improve this question

migrated from Oct 5 '12 at 21:44

This question came from our site for professional and enthusiast programmers.

up vote 2 down vote accepted

No, 'service' and other '/etc/init.d/' service management commands usually don't accept application-specific parameters.

You have to configure your app using its own config file (usually in /etc/yourapp_name). For Mongodb it should be /etc/mongodb.conf (check this link and search for nssize)

But sometimes the parameter you want to change cannot be modified using a configuration file. It's the case if it's a command-line argument. You then have to look how to pass additional command options, usually inside /etc/sysconfig/your_app_name

share|improve this answer
Perfect, thanks, I missed that set of documentation. – Zane Claes Oct 5 '12 at 19:33

Initscripts don't take arguments that way. You will need to edit the initscript itself in /etc/init.d or see if it (like all good initscripts) has an associated configuration file in /etc/sysconfig.

share|improve this answer

You must log in to answer this question.