p4dctl命令工具

原文链接

https://www.perforce.com/manuals/p4sag/Content/P4SAG/appendix.p4dctl.html

Helix Core Server Control(p4dctl)实用程序可以管理 在本地主机上运行的Perforce服务。

root 用户:

● 是/etc/perforce/目录的 Linux 所有者,可以启动和停止所有服务

● 可以配置/etc/perforce/p4dctl.conf文件以允许一个或多个非 root 用户(例如perforce用户)启动和停止某些服务

bash 复制代码
root@heyu-VMware-Virtual-Platform:~# p4dctl list
Type     Owner        Name         Config
p4d      perforce     ncayu        port=ssl:1666 root=/opt/perforce/servers/ncayu/root
root@heyu-VMware-Virtual-Platform:~# 
root@heyu-VMware-Virtual-Platform:~# 
root@heyu-VMware-Virtual-Platform:~# 
root@heyu-VMware-Virtual-Platform:~# p4dctl status ncayu
'ncayu' p4d service is running.
root@heyu-VMware-Virtual-Platform:~# 

帮助文档

bash 复制代码
root@heyu-VMware-Virtual-Platform:~# p4dctl

Usage: p4dctl [global flags] <cmd> [flags] [service name]

Global Flags
------------

-c <cfg_file>    - Path to config file. Default: /etc/perforce/p4dctl.conf
-p <pid_dir>     - Path to pid file directory. Default: /var/run
-q               - Send output to syslog instead of stdout/stderr
-v <level>       - Set debug level to <level> (1-9)
-V               - Print version and exit

Commands
--------

list             - List configured service(s)
start            - Start the specified service(s)
stop             - Stop the specified service(s)
restart          - Restart the specified service(s)
status           - Check the status of the specified service(s)
checkpoint       - Checkpoint the specified p4d service(s)
journal          - Rotate p4d service(s) journal file
env              - Query the environment of services


root@heyu-VMware-Virtual-Platform:~#

配置文件

bash 复制代码
/etc/perforce/p4dctl.conf

安装路径

bash 复制代码
/opt/perforce/sbin/

文件内容helix-p4dctl.service

bash 复制代码
Unit]
Description=Helix Core Server
After=network.target
After=remote-fs.target

[Service]
ExecStart=/opt/perforce/sbin/p4dctl-init.sh start
ExecStop=/opt/perforce/sbin/p4dctl-init.sh stop
ExecReload=/opt/perforce/sbin/p4dctl-init.sh reload
GuessMainPID=no
IgnoreSIGPIPE=no
KillMode=process
PrivateTmp=true
RemainAfterExit=yes
Restart=always
SuccessExitStatus=5 6
TimeoutSec=5min
Type=simple

[Install]
WantedBy=multi-user.target

https://www.perforce.com/manuals/p4sag/Content/P4SAG/appendix.p4dctl.html


相关推荐
天天喝旺仔9 分钟前
Docker 镜像瘦身实战:多阶段构建把体积缩小 90%
运维·后端·ci/cd·docker·云原生·容器·性能优化
NJCloud24 分钟前
Docker 私有仓库部署:Registry、加密传输与认证鉴权
运维·网络·docker·云原生·容器
玖石书1 小时前
Ubuntu 更换 USTC 镜像源完整指南(AMD64 / AARCH64)
linux·运维·ubuntu
zbyyd1 小时前
Linux 进程间通信(IPC):信号、消息队列、共享内存与信号量详解
linux·运维·c语言
智脑API1 小时前
CCSwitch Claude Code 如何配置 MCP?服务器启动、工具权限与安全测试
运维·服务器·claude·codex·ccswitch
闲云野鹤在人间2 小时前
KVM虚拟化实战|CentOS‑Stream8 两种安装方式+模板制作+基础使用
linux·运维·服务器·centos
小张同学a.2 小时前
Docker 容器实战 2—— docker 仓库
linux·运维·服务器·docker·容器
Android系统攻城狮2 小时前
Linux PipeWire深度解析之pw_core_get_registry调用流程与实战(九十一)
linux·运维·服务器·音频进阶·pipewire音频实战进阶
其实防守也摸鱼2 小时前
智能体推荐:精选 AI Agent 工具与实战指南
运维·开发语言·人工智能·学习·web安全·自动化
邪修king2 小时前
Re:Linux 系统编程篇 (十二):进程篇(一)基础与 fork 系统调用全解
linux·运维·服务器