-
Notifications
You must be signed in to change notification settings - Fork 43
Useful console command examples
The console right now lacks comprehensive help; here are some useful commands seen in the wild. You can use the console (CTRL-C) or the !control:SERVERNAME room. Riot is super inconvenient for the latter, but nheko (for example) makes it convenient to edit the previous line.
Most of these commands are only interesting throughout the betatesting, like unscrewing room or server states, or examining what's going on.
A Matrix-ID itself is recognized as a command for convenience.
Shows the known data of the specific room_id.
Shows the known data of an event in the room's state.
Shows the known data of the specific event_id.
Shows the content field of the specific event_id.
Shows the raw JSON of the specific event_id.
Room aliases are resolved to a room_id
throughout all console commands. In this case it behaves as <room_id>
was described earlier.
can be
- room_id (
!kjkjkjljlkjkljlk:example.com
) - alias (
#alias:example.com
)
lookup room events
Rebootstrap room: try to clear and re-retrieve all data from the start
Re-bootstrap a room from a known join event, using any server which has the said event. Can be usd to rebuild the room graph in case of... need.
List room events, optionally restricting to the given type or the given mxid. Maybe any of them.
Get complete room state according to the server
Manually rebuild the present room state
from the room state space
. Required if the present state resolves incorrectly or falls out of sync due to bugs or missing functionality in the server.
Manually rebuild the higher dimension room state space
table from the room events
table. Required if any state event is missing from this table, but is in the room events
(rare).
Show all possible states for a given (type,state_key)
"cell"
- The state which is selected for the present-state is marked with an
*
asterisk. - A state which fails one of the three authentication phases is marked with an
X
and a reason string may be present on the right. - A state which has been redacted is marked with an
R
Show members of a room according to the server.
Show room events (or at least the first few ones).
Show events only ? to ?. The first number is ? and the second is ?.
Remove room data from server [will be backfilled if needed]. May be needed to remove histerical historical rooms causing trouble.
Mass reset room heads of remote rooms
Configuration and settings.
Enable logging to file(s).
Show all differences between your current configuration and the defaults.
Log level and facility control.
List all logging facilities. CONSOLE
and FILE
are displayed if active.
Enable log levels equal and less than provided level (affects console only). Most severe log level is CRITICAL (0) and least severe level is DEBUG (7). Therefor log level CRITICAL
only displays CRITICAL messages.
Only enables facilities listed (affects console only). All other facilities are muted.
Note: log mask
with no arguments mutes all facilities.
Mutes all facilities listed (affects console only). All other facilities will be enabled.
Example: log unmask m.presence m.typing m.receipt
Note: log unmask
with no arguments unmutes all facilities.
Federation related.
Re-fetch room states through federation
List active databases
Information on a database (events
, media
).
Show database columns (and their size).
Call a RocksDB compaction on db (events
or media
) table (like _room_head
).
Majority of the memory usage is db cache. This command shows the memory usage of the db cache. If you use two stars (**
) you get the details.
You can tailor the "Capacity" by configuring like conf ircd.m.dbs.content.cache.size
.
Show room tags of an user. (Supposedly.)
Quick redact command. The user_id defaults to @ircd:your.host
which is only useful for internal rooms. For
public rooms you must give the user with permission to redact.
Some examples:
-
redact !dns:your.host well-known.matrix.server some.host
- drop record from the well-known cache. -
redact !dns:your.host ircd.net.dns.rrs.AAAA some.host
- drop ip6 record from the DNS cache.
This is useful when you want to restart a module without die
ing the whole server. Like, when you update webbapp
you out to
-
mod reload web_root
since The Construct have cached the webapp files.