0.1.0 • Published 8 years ago

supervisord v0.1.0

Weekly downloads
154
License
-
Repository
github
Last release
8 years ago

What's this?

A node.js library for supervisord. If you're not familiar with supervisord, it's much like forever, launchd, upstart+monit, etc.

Requirements

  • Node.js
  • Supervisord
  • NPM

Installation

npm install supervisord

Example:

	var supervisord = require('supervisord');

	var client = supervisord.connect('http://localhost:9001');


	client.startProcess('my-app', function(err, result)
	{
		
	});
	
	//return all running processes by supervisord
	client.getAllProcessInfo(function(err, result)
	{
		console.log(result);

		/*
		[ { description: 'pid 22083, uptime 0:10:36',
	    pid: 22083,
	    stderr_logfile: '/tmp/test-stderr---supervisor-G27SFc.log',
	    stop: 1316236587,
	    logfile: '/tmp/test-stdout---supervisor-izrtu6.log',
	    exitstatus: 0,
	    spawnerr: '',
	    now: 1316237455,
	    group: 'app-1',
	    name: 'app-1',
	    statename: 'RUNNING',
	    start: 1316236819,
	    state: 20,
	    stdout_logfile: '/tmp/test-stdout---supervisor-izrtu6.log' } ]
    	*/
	});

Available Methods:

  • getSupervisorVersion()
  • getIdentification()
  • getState()
  • getPID()
  • readLog()
  • clearLog()
  • shutdown()
  • restart()
  • getAllProcessInfo(name)
  • startProcess(name)
  • startAllProcesses()
  • startProcessGroup()
  • stopProcessGroup()
  • sendProcessStdin()
  • sendRemoteCommEvent()
  • addProcessGroup(name)
  • removeProcessGroup(name)
  • readProcessStdoutLog(name)
  • readProcessStderrLog(name, offset, length)
  • tailProcessStdoutLog(name, offset, length)
  • tailProcessStderrLog(name, offset, length)
  • clearProcessLogs(name)
  • clearAllProcesssLogs()
  • signalProcess(name, signal)
  • signalProcessGroup(name, signal)
0.1.0

8 years ago

0.0.5

8 years ago

0.0.4

11 years ago

0.0.3

12 years ago

0.0.2

13 years ago

0.0.1

13 years ago