systemctl status minecraft-survival.service
时间: 2024-01-10 19:20:18 浏览: 222
以下是回答:
要查看minecraft-survival.service的状态,可以使用systemctl status命令。在终端中输入以下命令即可:
```
systemctl status minecraft-survival.service
```
如果minecraft-survival.service正在运行,你将看到类似于以下内容的输出:
```
● minecraft-survival.service - Minecraft Server
Loaded: loaded (/lib/systemd/system/minecraft-survival.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2021-08-10 14:30:00 UTC; 1h 30min ago
Main PID: 1234 (java)
Tasks: 20 (limit: 4915)
Memory: 1.2G
CGroup: /system.slice/minecraft-survival.service
└─1234 /usr/bin/java -Xms2G -Xmx4G -jar /opt/minecraft/jars/server.jar nogui
Aug 10 14:30:00 KATANA systemd[1]: Started Minecraft Server.
```
如果minecraft-survival.service没有运行,你将看到类似于以下内容的输出:
```
● minecraft-survival.service - Minecraft Server
Loaded: loaded (/lib/systemd/system/minecraft-survival.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Tue 2021-08-10 14:30:00 UTC; 1h 30min ago
Process: 1234 ExecStart=/usr/bin/java -Xms2G -Xmx4G -jar /opt/minecraft/jars/server.jar nogui (code=exited, status=0/SUCCESS)
Main PID: 1234 (code=exited, status=0/SUCCESS)
Aug 10 14:30:00 KATANA systemd[1]: Started Minecraft Server.
```
阅读全文