The packs command
packs is how you manage Packs Server: make stores, hand out keys, and check how it’s doing. It comes with Packs Server.
Run it as root, on the machine that runs Packs Server. It talks to Packs Server through the Unix socket that socket names in /etc/packs/packs-server.properties, so it doesn’t work from another machine.
| Command | What it does |
|---|---|
packs store create <name> |
Make a store |
packs store list |
List the stores |
packs store remove <name> |
Delete a store and all its history |
packs store empty <name> |
Delete all of a store’s history, and keep the store and its keys |
packs key add <store> <name> |
Make a key that a Minecraft server logs in with |
packs key list <store> |
List a store’s keys |
packs key revoke <store> <name> |
Take a key away |
packs key server |
Print Packs Server’s own key |
packs status [store] |
See how Packs Server is doing |
packs profile <seconds> [file] |
Record a performance profile |
Store and key names hold 1 to 64 letters, digits, - or _.
If something goes wrong, packs prints the reason after packs:. If Packs Server isn’t running, it says Packs Server does not answer on /run/packs/packs-server.sock; run systemctl status packs-server to see why. If you type a command it doesn’t know, it prints the list of commands.
Stores
Section titled “Stores”A store holds the history of one Minecraft server. Give each Minecraft server a store of its own.
packs store create
Section titled “packs store create”packs store create survivalMakes an empty store and prints Store survival created. Put its name in storage.server.store in Oasis’s config.
packs store list
Section titled “packs store list”Prints the name of every store, one a line, in alphabetical order.
packs store remove
Section titled “packs store remove”packs store remove survivalDeletes the store, every row of history in it, and all of its keys. This can’t be undone, so packs asks you to type the store’s name again first. If what you type doesn’t match, it removes nothing. Otherwise it prints Store survival removed.
packs store empty
Section titled “packs store empty”packs store empty survivalDeletes every row of history in the store and keeps the store and its keys, so your Minecraft server connects again with the same config and starts from an empty history. That’s handy on a test server.
Stop the Minecraft server first. While a server is connected to the store, packs refuses and prints Stop the 1 Minecraft server(s) connected to the store survival first, because a running server would send some of the history it had just logged back into the store. Like remove, it can’t be undone, and packs asks you to type the store’s name again first. If what you type doesn’t match, it changes nothing. Otherwise it prints Store survival emptied.
A key lets one Minecraft server log in to one store. packs makes the key on your machine and gives Packs Server only the public half, so the private key never leaves your hands.
packs key add
Section titled “packs key add”packs key add survival paperMakes a key called paper for the store survival, and prints two keys:
Key paper added to store survival.The private key. packs shows it once; put it in config.yml as storage.server.key: ...The server key. Put it in config.yml as storage.server.server-key: ...Copy both into Oasis’s config. Packs Server shows the private key only once. If you lose it, run packs key add again with a new name, then revoke the old one.
A store can’t hold two keys with the same name. To reuse a name, revoke the old key first.
packs key list
Section titled “packs key list”packs key list survivalPrints each key of the store, one a line: its name, then the public half of the key.
packs key revoke
Section titled “packs key revoke”packs key revoke survival paperDeletes the key and prints Key paper of store survival revoked. Any Minecraft server that is connected with that key gets cut off right away, and it can’t log in with it again.
packs key server
Section titled “packs key server”Prints Packs Server’s own key, the one Oasis needs in storage.server.server-key. Run it if you lose the server key. Every store shares this one key, and packs key add prints it too.
packs status
Section titled “packs status”packs statuspacks status survivalShows how each store is doing. Add a store’s name to see only that one. For each store, it prints the store’s name and then:
- rows: the edits written to the store. last day counts the ones from the last 24 hours. pending is what Packs Server has received but not yet written to its journal, and unsealed is what is still waiting in the journal. players counts the players in the history.
- runs and run bytes: how many long-term files the store has, and their size on disk. journal bytes is the size of the journal, and cache bytes is the memory the store’s cache uses now.
- merge backlog: how many long-term files are waiting to be merged. purges left counts the purges that haven’t finished yet. incidents counts the problems the store has run into.
- last incident: when the latest problem happened, and what it was. This line only shows when there is one.
- client: one line for each connected Minecraft server, with the name of the key it logged in with, its address, and skew, how far Packs Server’s clock is ahead of the Minecraft server’s, in milliseconds. outbox is how much that server is still holding in
plugins/Oasis/outbox. With nothing connected, it saysno client is connected.
If merge backlog keeps growing, merging can’t keep up with new history. merge-bytes-per-second sets how fast merging may go.
packs profile
Section titled “packs profile”packs profile 60packs profile 60 /tmp/packs-server.jfrRecords a Java Flight Recorder profile of Packs Server for that many seconds. It prints Recording for 60 seconds., waits, and then prints Packs Server wrote and the file’s path. A profile shows where Packs Server spends its time, which helps when you report a performance problem.
Without a file, it writes to /var/lib/packs/profiles/, with the date and time in the name. Packs Server writes the file as the packs user, so if you name a file, pick a folder that user can write to, like /tmp.