Starting and Stopping the Perforce Server on Windows
How do you start and stop the Perforce server on Windows?
SUMMARY
Perforce Servers at Release 99.2 and later can be stopped by a super user with:
p4 admin stop
Perforce Servers which are pre-99.2 can use the methods listed below to start and stop the server.
DETAILS
Starting the Perforce service from the Services dialog
If the Perforce Server is installed as a Windows service, a user with Administrator privileges can start and stop it using the Services dialog in the Control Panel. The Perforce service is usually installed by running the Perforce Server Windows Installer, available from the Perforce for Windows.
To start the Perforce service:- Right click on "My Computer", and select "Manage". The "Computer Management" window is displayed.
- In the right hand pane, double click on "Services and Applications".
- Double click on "Services". You will now have a list of available Windows services.
- Scroll down until you see the "Perforce" service. Right click on this item and select "Start".
Starting the Perforce server manually
The Perforce Server can also be started manually by any user from an MS-DOS window. The server executable, p4d.exe, is normally found in your P4ROOT directory. To start the server, first make sure your current P4ROOT, P4PORT, P4LOG, and P4JOURNAL settings are correct, then run:
%P4ROOT%\p4d
If you want to start a server using settings different than those set by P4ROOT, P4PORT, P4LOG, or P4JOURNAL, you can use p4d command line flags. For example:
%P4ROOT%\p4d -r %P4ROOT% -p 1999 -L %P4ROOT%\log
Stopping the Perforce service from the Services dialog
To stop the Perforce service, follow the same steps as starting the service. When you right-click on the Perforce service, select "Stop".Stopping the Perforce server manually
To stop the server, type Ctrl-C in the MS-DOS window you started the Perforce server, or close the MS-DOS window.
Note:
Case (upper vs. lower) is significant for p4d command line flags.
If an error occurs when starting the Perforce service or the service fails to start (the "status" column in the computer management screen remains blank), check the Perforce log to determine the cause.
