Use prosodyctl:
$ prosodyctl shell c2s show Session ID | JID | Role | IPv | Status | Security | SM | CSI State deadbeefca | user@example.o.rg/client.uenI | registered | IPv4 | online | TLSv1.3 | yes | inactive