Service management and logs
Neo4j Service Management
The Neo4j service management commands differ depending on your installation method.
- On linux via a package manager, a systemd service is installed and all you need to do is use the service management systemd commands:
# start / stop / restart
systemctl start neo4j.service
systemctl stop neo4j.service
systemctl restart neo4j.service
# service definition / status
systemctl cat neo4j.service
systemctl status neo4j.service
- On Linux via an archive, you can use the following commands from the Neo4j installation folder ("NEO4J_HOME") :
# start / stop / restart / status
NEO4J_HOME/bin/neo4j start
NEO4J_HOME/bin/neo4j stop
NEO4J_HOME/bin/neo4j restart
NEO4J_HOME/bin/neo4j status
# to start Neo4j in foreground
NEO4J_HOME/bin/neo4j console
- On Windows via an archive, the commands are the same and are added commands specific to Windows services:
# install / uninstall / update a service
NEO4J_HOME/bin/neo4j.bat install-service
NEO4J_HOME/bin/neo4j.bat uninstall-service
NEO4J_HOME/bin/neo4j.bat update-service
Logs
Neo4j produces several types of log files, including:
- application logs Neo4j: see section 4.2.2 of the documentation pdf (or online).
- transaction logs: these logs contain all database written operation, which serves as a "truth source" when restoring a database or when performing incremental backups. For more information, see Chapter 4.9 of the pdf documentation (or online).
- query logs: this is a mechanism for logging slow requests, see section 10.2.1 of the pdf documentation (or online).