How to run db.killOp() using the MongoDB native Node.js driver?
<p>I am using MongoDB native Node.js Driver 1.4.38.</p>

<p>I have got all running operation using : </p>

<pre><code>var maxSecsRunning = 2;
db.collection('$cmd.sys.inprog').findOne(function (err, data) {
                if (err) {
                    throw err;
                }
                if (data &amp;&amp; data.inprog) {
                    data.inprog.forEach(function (op) {
                        console.log("Record", op);

                        if (op.secs_running &gt; maxSecsRunning &amp;&amp; op.op == "query" &amp;&amp; !op.ns.indexOf("local") &gt; -1) {
                            console.log("Killing opId: " + op.opid + " running for over secs: " + op.secs_running);
                            db.killOp(op.opid);


                        }

                    })
                }


            });
</code></pre>

<p>I want to kill long running operation but db.killOp is giving error : undefined is not a function.</p>

<p>How can I run killOp in node.js MongoDB native Driver ?</p>