[GH-ISSUE #2578] details command doesn't work b/c of incorrect option for ps #1879

Closed
opened 2026-02-27 02:59:32 +03:00 by kerem · 9 comments
Owner

Originally created by @pschiffe on GitHub (Nov 4, 2019).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/2578

User Story

As a game admin, I want see the game server details so that I know the details.

Basic info

  • Distro: CentOS 7
  • Game: sdtd
  • Command: details

Further Information

[sdtdhost@sdtd ~]$ ./sdtdserver details
Details sdtdserver: Check IP: 172.131.2.25
error: list of session leaders OR effective group names must follow -g

Usage:
 ps [options]

 Try "ps --help <simple|list|output|threads|misc|all>";
  or "ps --help <s|l|o|t|m|a>";
 for additional help text.

For more details see ps(1).


Distro Details
============================
Distro:   CentOS Linux 7 (Core)
Arch:   x86_64
Kernel:   3.10.0-1062.1.2.el7.x86_64
Hostname:   sdtd
Uptime:   7d, 23h, 3m
tmux:   tmux 1.8
glibc:   2.17

The problem was introduced in commit: github.com/GameServerManagers/LinuxGSM@7a3fa84fa6 (diff-4101fe6fe2)

Line:

cpuused=$(ps --forest -o pcpu -g "${gameserverpid}"|awk '{s+=$1} END {print s}')

should be:

cpuused=$(ps --forest -o pcpu -p "${gameserverpid}"|awk '{s+=$1} END {print s}')

since the -g option takes a group ID as an argument and not a PID. It looks like a typo in the mentioned commit. cc @dgibbs64 @Frisasky

There is also a related issue: #2570

Originally created by @pschiffe on GitHub (Nov 4, 2019). Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/2578 ## User Story As a game admin, I want see the game server details so that I know the details. ## Basic info * Distro: CentOS 7 * Game: sdtd * Command: details ## Further Information ``` [sdtdhost@sdtd ~]$ ./sdtdserver details Details sdtdserver: Check IP: 172.131.2.25 error: list of session leaders OR effective group names must follow -g Usage: ps [options] Try "ps --help <simple|list|output|threads|misc|all>"; or "ps --help <s|l|o|t|m|a>"; for additional help text. For more details see ps(1). Distro Details ============================ Distro: CentOS Linux 7 (Core) Arch: x86_64 Kernel: 3.10.0-1062.1.2.el7.x86_64 Hostname: sdtd Uptime: 7d, 23h, 3m tmux: tmux 1.8 glibc: 2.17 ``` The problem was introduced in commit: https://github.com/GameServerManagers/LinuxGSM/commit/7a3fa84fa618e7e09005ab39cc5fc09dbf9ceb65#diff-4101fe6fe2424e94b74581a82a5c6511L104 Line: ``` cpuused=$(ps --forest -o pcpu -g "${gameserverpid}"|awk '{s+=$1} END {print s}') ``` should be: ``` cpuused=$(ps --forest -o pcpu -p "${gameserverpid}"|awk '{s+=$1} END {print s}') ``` since the `-g` option takes a group ID as an argument and not a PID. It looks like a typo in the mentioned commit. cc @dgibbs64 @Frisasky There is also a related issue: #2570
Author
Owner

@issue-label-bot[bot] commented on GitHub (Nov 4, 2019):

Issue-Label Bot is automatically applying the label type: bug to this issue, with a confidence of 0.68. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

<!-- gh-comment-id:549530599 --> @issue-label-bot[bot] commented on GitHub (Nov 4, 2019): Issue-Label Bot is automatically applying the label `type: bug` to this issue, with a confidence of 0.68. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback! Links: [app homepage](https://github.com/marketplace/issue-label-bot), [dashboard](https://mlbot.net/data/GameServerManagers/LinuxGSM) and [code](https://github.com/hamelsmu/MLapp) for this bot.
Author
Owner

@olokos commented on GitHub (Nov 13, 2019):

pschiffe did actually find the culprit of the issue, I can confirm that replacing g with p does fix the issue!
At least with monitor command
details still spams this very same error

<!-- gh-comment-id:553613925 --> @olokos commented on GitHub (Nov 13, 2019): pschiffe did actually find the culprit of the issue, I can confirm that replacing g with p does fix the issue! At least with monitor command details still spams this very same error
Author
Owner

@dgibbs64 commented on GitHub (Nov 25, 2019):

this will be fixed for the next release

<!-- gh-comment-id:558115828 --> @dgibbs64 commented on GitHub (Nov 25, 2019): this will be fixed for the next release
Author
Owner

@olokos commented on GitHub (Dec 6, 2019):

This issue is closed including the previous one I've made, yet the issue is still not resolved

root@kiepownica:/home/kiepownica# cd /etc/
root@kiepownica:/etc# ./rc.local
[ .... ] Starting ts3server: TeamSpeak 3 Servererror: list of process IDs must follow -p

Usage:
 ps [options]

 Try 'ps --help <simple|list|output|threads|misc|all>'
  or 'ps --help <s|l|o|t|m|a>'
 for additional help text.

For more details see ps(1).
error: list of session leaders OR effective group names must follow -g

Usage:
 ps [options]

 Try 'ps --help <simple|list|output|threads|misc|all>'
  or 'ps --help <s|l|o|t|m|a>'
 for additional help text.

For more details see ps(1).
error: list of session leaders OR effective group names must follow -g

Usage:
 ps [options]

 Try 'ps --help <simple|list|output|threads|misc|all>'
  or 'ps --help <s|l|o|t|m|a>'
 for additional help text.

For more details see ps(1).
[ INFO ] Starting ts3server: TeamSpeak 3 Server is already running
root@kiepownica:/etc#

@dgibbs64

<!-- gh-comment-id:562551233 --> @olokos commented on GitHub (Dec 6, 2019): This issue is closed including the previous one I've made, yet the issue is still not resolved ``` root@kiepownica:/home/kiepownica# cd /etc/ root@kiepownica:/etc# ./rc.local [ .... ] Starting ts3server: TeamSpeak 3 Servererror: list of process IDs must follow -p Usage: ps [options] Try 'ps --help <simple|list|output|threads|misc|all>' or 'ps --help <s|l|o|t|m|a>' for additional help text. For more details see ps(1). error: list of session leaders OR effective group names must follow -g Usage: ps [options] Try 'ps --help <simple|list|output|threads|misc|all>' or 'ps --help <s|l|o|t|m|a>' for additional help text. For more details see ps(1). error: list of session leaders OR effective group names must follow -g Usage: ps [options] Try 'ps --help <simple|list|output|threads|misc|all>' or 'ps --help <s|l|o|t|m|a>' for additional help text. For more details see ps(1). [ INFO ] Starting ts3server: TeamSpeak 3 Server is already running root@kiepownica:/etc# ``` @dgibbs64
Author
Owner

@dgibbs64 commented on GitHub (Dec 6, 2019):

@olokos thanks for reminding me. I picked up the issue again today specifically to do with multiple instances such as mcserver and mcserver-2. I already have a fix in mind

<!-- gh-comment-id:562767127 --> @dgibbs64 commented on GitHub (Dec 6, 2019): @olokos thanks for reminding me. I picked up the issue again today specifically to do with multiple instances such as mcserver and mcserver-2. I already have a fix in mind
Author
Owner

@dgibbs64 commented on GitHub (Dec 6, 2019):

I think my previous fix partly resolved the issue but it turns out there are other instances I didn't spot

<!-- gh-comment-id:562767916 --> @dgibbs64 commented on GitHub (Dec 6, 2019): I think my previous fix partly resolved the issue but it turns out there are other instances I didn't spot
Author
Owner

@olokos commented on GitHub (Dec 7, 2019):

You're very welcome, I'm glad you are taking notice of this issue.
Please do let me know when another fix to this gets pushed so I will test it ASAP.

<!-- gh-comment-id:562851955 --> @olokos commented on GitHub (Dec 7, 2019): You're very welcome, I'm glad you are taking notice of this issue. Please do let me know when another fix to this gets pushed so I will test it ASAP.
Author
Owner

@olokos commented on GitHub (Dec 7, 2019):

I did ./ts3server ul
and now the ts3server doesnt start whatsoever using LGSM

ts3server@kiepownica:~$ ./ts3server start
[ .... ] Starting ts3server: TeamSpeak 3 Serverno server running on /tmp/tmux-1002/default
[ FAIL ] Starting ts3server: Unable to start TeamSpeak 3 Server

Additionally this is the output of ./ts3server m

ts3server@kiepownica:~$ ./ts3server m
[ERROR ] Monitor ts3server: Checking session: FAIL
[  OK  ] Postdetails ts3server: Posting details to hastebin.com for 30D
Please share the following url for support: https://hastebin.com/<!DOCTYPE html>
<html>
<head>
width=device-width, initial-scale=1

<title>Application Error</title>

                  html,body,iframe {
                        margin: 0;
                        padding: 0;
                  }
                  html,body {
                        height: 100%;
                        overflow: hidden;
                  }
                  iframe {
                        width: 100%;
                        height: 100%;
                        border: 0;
                  }
                </style>
</head>
<body>

</body>
</html>
[ .... ] Alert ts3server: Sending Telegram alertcurl: (3) <url> malformed
[ FAIL ] Alert ts3server: Sending Telegram alert: {"ok":false,"error_code":400,"description":"Bad Request: can't parse entities Expected end tag at byte offset 715"}
[ INFO ] Stopping ts3server: TeamSpeak 3 Server is already stopped
[ .... ] Starting ts3server: TeamSpeak 3 Serverno server running on /tmp/tmux-1002/default
[ FAIL ] Starting ts3server: Unable to start TeamSpeak 3 Server
<!-- gh-comment-id:562854383 --> @olokos commented on GitHub (Dec 7, 2019): I did ./ts3server ul and now the ts3server doesnt start whatsoever using LGSM ``` ts3server@kiepownica:~$ ./ts3server start [ .... ] Starting ts3server: TeamSpeak 3 Serverno server running on /tmp/tmux-1002/default [ FAIL ] Starting ts3server: Unable to start TeamSpeak 3 Server ``` Additionally this is the output of ./ts3server m ``` ts3server@kiepownica:~$ ./ts3server m [ERROR ] Monitor ts3server: Checking session: FAIL [ OK ] Postdetails ts3server: Posting details to hastebin.com for 30D Please share the following url for support: https://hastebin.com/<!DOCTYPE html> <html> <head> width=device-width, initial-scale=1 <title>Application Error</title> html,body,iframe { margin: 0; padding: 0; } html,body { height: 100%; overflow: hidden; } iframe { width: 100%; height: 100%; border: 0; } </style> </head> <body> </body> </html> [ .... ] Alert ts3server: Sending Telegram alertcurl: (3) <url> malformed [ FAIL ] Alert ts3server: Sending Telegram alert: {"ok":false,"error_code":400,"description":"Bad Request: can't parse entities Expected end tag at byte offset 715"} [ INFO ] Stopping ts3server: TeamSpeak 3 Server is already stopped [ .... ] Starting ts3server: TeamSpeak 3 Serverno server running on /tmp/tmux-1002/default [ FAIL ] Starting ts3server: Unable to start TeamSpeak 3 Server ```
Author
Owner

@github-actions[bot] commented on GitHub (Mar 11, 2021):

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

<!-- gh-comment-id:796305912 --> @github-actions[bot] commented on GitHub (Mar 11, 2021): This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Sign in to join this conversation.
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/LinuxGSM#1879
No description provided.