diff options
author | Justin Clark-Casey (justincc) | 2014-01-30 00:03:22 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-01-30 00:28:49 +0000 |
commit | 6dd99837fd4bb6dcaf4dbf89ddc1b3f28337bca5 (patch) | |
tree | d621376f2135bb7b73675c2e39cfc57155da86a6 /OpenSim | |
parent | minor: remove long unused state queue from "show queues" console reports (diff) | |
download | opensim-SC_OLD-6dd99837fd4bb6dcaf4dbf89ddc1b3f28337bca5.zip opensim-SC_OLD-6dd99837fd4bb6dcaf4dbf89ddc1b3f28337bca5.tar.gz opensim-SC_OLD-6dd99837fd4bb6dcaf4dbf89ddc1b3f28337bca5.tar.bz2 opensim-SC_OLD-6dd99837fd4bb6dcaf4dbf89ddc1b3f28337bca5.tar.xz |
Add "show grid user" robust/standalone console command for debug purposes.
Shows all data on entries which match or start with a given ID.
This would usually be a UUID.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Services/UserAccountService/GridUserService.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/OpenSim/Services/UserAccountService/GridUserService.cs b/OpenSim/Services/UserAccountService/GridUserService.cs index 944411f..25f6a57 100644 --- a/OpenSim/Services/UserAccountService/GridUserService.cs +++ b/OpenSim/Services/UserAccountService/GridUserService.cs | |||
@@ -50,6 +50,14 @@ namespace OpenSim.Services.UserAccountService | |||
50 | 50 | ||
51 | MainConsole.Instance.Commands.AddCommand( | 51 | MainConsole.Instance.Commands.AddCommand( |
52 | "Users", false, | 52 | "Users", false, |
53 | "show grid user", | ||
54 | "show grid user <ID>", | ||
55 | "Show grid user entry or entries that match or start with the given ID. This will normally be a UUID.", | ||
56 | "This is for debug purposes to see what data is found for a particular user id.", | ||
57 | HandleShowGridUser); | ||
58 | |||
59 | MainConsole.Instance.Commands.AddCommand( | ||
60 | "Users", false, | ||
53 | "show grid users online", | 61 | "show grid users online", |
54 | "show grid users online", | 62 | "show grid users online", |
55 | "Show number of grid users registered as online.", | 63 | "Show number of grid users registered as online.", |
@@ -58,6 +66,31 @@ namespace OpenSim.Services.UserAccountService | |||
58 | HandleShowGridUsersOnline); | 66 | HandleShowGridUsersOnline); |
59 | } | 67 | } |
60 | 68 | ||
69 | protected void HandleShowGridUser(string module, string[] cmdparams) | ||
70 | { | ||
71 | if (cmdparams.Length != 4) | ||
72 | { | ||
73 | MainConsole.Instance.Output("Usage: show grid user <UUID>"); | ||
74 | return; | ||
75 | } | ||
76 | |||
77 | GridUserData[] data = m_Database.GetAll(cmdparams[3]); | ||
78 | |||
79 | foreach (GridUserData gu in data) | ||
80 | { | ||
81 | ConsoleDisplayList cdl = new ConsoleDisplayList(); | ||
82 | |||
83 | cdl.AddRow("User ID", gu.UserID); | ||
84 | |||
85 | foreach (KeyValuePair<string,string> kvp in gu.Data) | ||
86 | cdl.AddRow(kvp.Key, kvp.Value); | ||
87 | |||
88 | MainConsole.Instance.Output(cdl.ToString()); | ||
89 | } | ||
90 | |||
91 | MainConsole.Instance.OutputFormat("Entries: {0}", data.Length); | ||
92 | } | ||
93 | |||
61 | protected void HandleShowGridUsersOnline(string module, string[] cmdparams) | 94 | protected void HandleShowGridUsersOnline(string module, string[] cmdparams) |
62 | { | 95 | { |
63 | // if (cmdparams.Length != 4) | 96 | // if (cmdparams.Length != 4) |