LogoLogo
  • Home
  • Getting Started
  • Configuration
    • LinuxGSM Config
    • Game Server Config
    • Start Parameters
    • cronjobs
    • Running on Boot
    • Running Multiple Game Servers
    • IP Address Configuration
    • LinuxGSM Stats
  • Commands
    • install
    • start-stop-restart
    • monitor
    • test-alert
    • console
    • debug
    • update
    • check-update
    • force-update
    • validate
    • update-lgsm
    • backup
    • map-compressor
    • details
    • mods
    • skeleton
    • fastdl
    • change-password
  • Game Servers
    • 7 Days to Die
    • Arma 3
    • ARK: Survival Evolved
    • Call of Duty 4
    • Dont Starve Together
    • Counter-Strike 2
    • Counter-Strike: Global Offensive
    • Factorio
    • Garry's Mod
    • Insurgency: SandStorm
    • Killing Floor 2
    • Minecraft: Java Edition
    • Multi Theft Auto
    • Rust
    • Sven Co-op
    • Trackmania Nations Forever / Trackmania United Forever
    • TeamSpeak 3
    • Unreal Tournament 99
    • Unreal Tournament 2004
    • Unreal Tournament 3
    • Valheim
    • Xonotic
    • The Front [WIP]
  • Networking
    • IP Address
    • Ports
    • Source Engine
  • Alerts
    • Discord
    • Email
    • IFTTT
    • Pushbullet
    • Pushover
    • Rocket.Chat
    • Slack
    • Telegram
  • Dependencies
    • Java
    • tmux
    • jq
    • gamedig
    • glibc
  • Features
    • ANSI Colors
    • Stop Mode
    • Log Management
    • Message Display Time
  • SteamCMD
    • Steam Master Server
    • Game Server Login Token
    • Branch
    • LAN Discovery
    • Workshop
    • Error Codes
  • Linux
    • distro
    • ftp-scp
    • file-ownership
    • firewalls
    • network-interfaces
    • permissions
    • Symlinking and ln command
  • Troubleshooting
  • FAQ
  • Guides
    • Security
    • Make Webserver Case Insensitive
    • Sourcemod and Metamod:Source
  • Other
    • server-migration
    • basic-usage
    • brand
Powered by GitBook
On this page
  • Install Node.js
  • Remove existing NodeJS
  • Install NodeJS
  • Install GameDig npm
  • Update GameDig
  • Sample output
  • Details
  • Raw output
Edit on GitHub
Export as PDF
  1. Dependencies

gamedig

PreviousjqNextglibc

Last updated 1 year ago

is a tool that queries game servers and returns outputs data from a query into json format. It can not only check if the game server is online but also return various data such as current maps and players. This allows ./gameserver details to display live information.

GameDig super-seeds gsquery as the tool to monitor game servers. GameDig is currently optional but recommended and gsquery is kept to ensure compatibility as gamedig requires Node.js to be installed.

Install Node.js

GameDig requires a JavaScript runtime environment installed to work. Use the following instructions to install Node.js.

Remove existing NodeJS

If you already have an older version of nodejs installed or be having issues with node dependencies. It may be worth reinstalling Node.js.

Ubuntu/Debian

sudo apt remove --purge nodejs npm
sudo apt clean
sudo apt autoclean
sudo apt install -f
sudo apt autoremove

CentOS

Work in progress

Install NodeJS

Installing nodejs can be problematic, however, using the below should work well.

Ubuntu/Debian

Enterprise Linux Based Distributions

Install GameDig npm

Once nodejs is installed use npm to install gamedig with the following command.

npm install gamedig -g

Update GameDig

Updates to GameDig are regularly made. It is possible to update by running the npm update command.

npm update -g

You can also see which version of gamedig is installed by running the following.

 npm list -g gamedig

Sample output

Details

Extra info becomes available for game server details.

Players:          0/8
Current Map:      Outpost

Raw output

gamedig --type "protocol-valve" --host "1.2.3.4" --port "27015"
{
  "name": "LinuxGSM Server",
  "map": "StationKappa",
  "password": false,
  "raw": {
    "protocol": 17,
    "folder": "StickyBots",
    "game": "StickyBots",
    "steamappid": 0,
    "numplayers": 0,
    "numbots": 0,
    "listentype": "d",
    "environment": "l",
    "secure": 0,
    "version": "0.0.6.22",
    "port": 7777,
    "steamid": "90122418420694019",
    "tags": "BUILDID:622,OWNINGID:90122418420694019,OWNINGNAME:LinuxGSM Server,P2PADDR:90122418420694019,P2PPORT:7777,SESSIONFLAGS:171",
    "gameid": "889400",
    "rules": {
      "BUILDID_i": "622",
      "NP_i": "0",
      "OWNINGID": "90122418420694019",
      "OWNINGNAME": "LinuxGSM Server",
      "P2PADDR": "90122418420694019",
      "P2PPORT": "7777",
      "SESSIONFLAGS": "171",
      "SN_s": "LinuxGSM Server"
    }
  },
  "maxplayers": 8,
  "players": [],
  "bots": [],
  "query": {
    "host": "1.2.3.4",
    "address": "1.2.3.4",
    "port": 27015,
    "port_query": 27015,
    "type": "protocol-valve",
    "duration": 90,
    "attempts": 1
  }
}
GameDig
Node.js
GitHub - nodesource/distributions: NodeSource Node.js Binary DistributionsGitHub
GitHub - nodesource/distributions: NodeSource Node.js Binary DistributionsGitHub
GitHub - nodesource/distributions: NodeSource Node.js Binary DistributionsGitHub
Logo
Logo
Logo