GameServerManagers / GameServerManagers/LinuxGSM

Have a non-pretty output thats usable from within scripts or piped tty

Open
#2,484 1 comment 0 reactions 0 assignees View on GitHub
info: systemd type: feature
Dominant language
Shell
Stars
4.9k
Forks
864
PR merge metrics
No merged PRs in 30d

Description

## User Story

I would like that lgsm supports some kind of output thats easily pipable or digestable by scripts. While the current way lgsm outputs information is pretty on a tty, systemd cannot
make sense of it.

### Examples:
LGSM Output:
![pretty lgsm output](https://i.imgur.com/SLVwTxt.png)

What Systemd / journalctl displays:
![systemd journalctl](https://i.imgur.com/ec0N1nG.png)

## Basic info

* Distro: Any with SystemD
* Game: Any
* Command: monitor, others also applicable

## Further Information

IMO there is 2 ways to do this.
1. Detect if you are on a tty, and if not simply output all the information in a "non" pretty way, line by line
2. Instead of detecting if you are on a tty give the user a command line switch to get the result.

## Further Reading

At the moment i use [this](https://gist.github.com/HeapUnderfl0w/41916d5d4e23b733ae34b8f8dd5012a0) systemd service & timer to "monitor" every 6hrs.

- [Systemd Services](https://www.freedesktop.org/software/systemd/man/systemd.service.html)
- [Systemd Timer](https://www.freedesktop.org/software/systemd/man/systemd.timer.html)

( this is in relation to #2145 )

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.