You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

Difference between revisions of "Services/Operation"

From Wikitech-static
Jump to navigation Jump to search
imported>Mobrovac
(Created page with "== Starting, Stopping, Restarting == If you have <tt>sudo</tt> rights on the target machines, then that's as simple as logging onto each of the targets and issuing the respec...")
 
imported>Krinkle
 
Line 25: Line 25:
</pre>
</pre>


[[Category:Services]]
[[Category:Services| ]]
[[Category:How-To]]

Latest revision as of 23:43, 15 March 2018

Starting, Stopping, Restarting

If you have sudo rights on the target machines, then that's as simple as logging onto each of the targets and issuing the respective commands:

$ sudo service <service-name> start
$ sudo service <service-name> stop
$ sudo service <service-name> restart

Monitoring

Logs

The service's logs are stored locally in /srv/log/<service-name>/main.log. To take a look, simply tail it:

$ tail -f /srv/log/<service-name>/main.log

Since the log entries are JSON-formatted, you may want to see them in a more presentable form. Use bunyan for that:

$ tail -f /srv/log/<service-name>/main.log | /srv/deployment/<service-name>/deploy/node_modules/.bin/bunyan