tools/oxenstored: Additional debugging commands

These were added to aid security development, and are useful generally for
debugging.

Signed-off-by: Edwin Török <edwin.torok@cloud.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Christian Lindig <christian.lindig@cloud.com>
This commit is contained in:
Edwin Török authored and Andrew Cooper committed 2023-08-24 19:55:08 +01:00
1 parent 870d5cd9a9
commit 0742b0a081
1 file changed
+17
+17
View File
@@ -235,6 +235,23 @@ let do_debug con t _domains cons data =
| "watches" :: _ ->
let watches = Connections.debug cons in
Some (watches ^ "\000")
| "compact" :: _ ->
Gc.compact ();
Some "Compacted"
| "trim" :: _ ->
History.trim ();
Some "trimmed"
| "txn" :: domid :: _ ->
let domid = int_of_string domid in
let con = Connections.find_domain cons domid in
let b = Buffer.create 128 in
let () = con.transactions |> Hashtbl.iter @@ fun id tx ->
Printf.bprintf b "paths: %d, operations: %d, quota_reached: %b\n"
(List.length tx.Transaction.paths)
(List.length tx.Transaction.operations)
tx.Transaction.quota_reached
in
Some (Buffer.contents b)
| "xenbus" :: domid :: _ ->
let domid = int_of_string domid in
let con = Connections.find_domain cons domid in
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.