|
|
@ -7,6 +7,13 @@ var Fs = require("fs");
|
|
|
|
|
|
|
|
|
|
|
|
var Admin = module.exports;
|
|
|
|
var Admin = module.exports;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var getFileDescriptorCount = function (Env, server, cb) {
|
|
|
|
|
|
|
|
Fs.readdir('/proc/self/fd', function(err, list) {
|
|
|
|
|
|
|
|
if (err) { return void cb(err); }
|
|
|
|
|
|
|
|
cb(void 0, list.length);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var getActiveSessions = function (Env, Server, cb) {
|
|
|
|
var getActiveSessions = function (Env, Server, cb) {
|
|
|
|
var stats = Server.getSessionStats();
|
|
|
|
var stats = Server.getSessionStats();
|
|
|
|
cb(void 0, [
|
|
|
|
cb(void 0, [
|
|
|
@ -105,6 +112,7 @@ var commands = {
|
|
|
|
DISK_USAGE: getDiskUsage,
|
|
|
|
DISK_USAGE: getDiskUsage,
|
|
|
|
FLUSH_CACHE: flushCache,
|
|
|
|
FLUSH_CACHE: flushCache,
|
|
|
|
SHUTDOWN: shutdown,
|
|
|
|
SHUTDOWN: shutdown,
|
|
|
|
|
|
|
|
GET_FILE_DESCRIPTOR_COUNT: getFileDescriptorCount,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
Admin.command = function (Env, safeKey, data, _cb, Server) {
|
|
|
|
Admin.command = function (Env, safeKey, data, _cb, Server) {
|
|
|
|