|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] tools/oxenstored: Additional debugging commands
commit 0742b0a081c268e51e1a0427f7cc8f2bd5096570
Author: Edwin Török <edwin.torok@xxxxxxxxx>
AuthorDate: Thu Aug 24 13:39:39 2023 +0100
Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Thu Aug 24 19:55:08 2023 +0100
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@xxxxxxxxx>
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Acked-by: Christian Lindig <christian.lindig@xxxxxxxxx>
---
tools/ocaml/xenstored/process.ml | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/tools/ocaml/xenstored/process.ml b/tools/ocaml/xenstored/process.ml
index 2e62c7a10e..432d66321c 100644
--- a/tools/ocaml/xenstored/process.ml
+++ b/tools/ocaml/xenstored/process.ml
@@ -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
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |