summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_status.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-07-13status: Add a missing check for potential NULLAndrew Clayton1-0/+4
Fixes: 707f4ef8 ("status: Show list of loaded language modules") Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-07-12status: Show list of loaded language modulesAndrew Clayton1-8/+94
When querying the '/status' node in the control API, display the list of currently loaded modules. So we now get something like { "modules": { "python": [ { "version": "3.12.3", "lib": "/opt/unit/modules/python.unit.so" }, { "version": "3.12.1", "lib": "/opt/unit/modules/python-3.12.1.unit.so" } ], "wasm": { "version": "0.1", "lib": "/opt/unit/modules/wasm.unit.so" }, "wasm-wasi-component": { "version": "0.1", "lib": "/opt/unit/modules/wasm_wasi_component.unit.so" } }, ... } This can be useful for debugging to show exactly what modules Unit has loaded _and_ from where. Closes: https://github.com/nginx/unit/issues/1343 Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-07-12status: Use a variable to represent the status member indexAndrew Clayton1-3/+4
In nxt_status_get() call nxt_conf_set_member() multiple times to set the main /status json sections. Previously this used hard coded values, 0, 1, 2 etc, if you wanted to change the order or insert new sections it could mean renumbering all these. Instead use a variable to track this index which starts at 0 and is simply incremented in each call of nxt_conf_set_member(). Currently this is only for the main outer sections, but can be replicated for inner sections if required. This is a preparatory patch for adding a new "modules" section at the top. Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-07-12status: Constify a bunch of local variablesAndrew Clayton1-11/+11
This is yet more missed constification, due in this case to me searching for 'static nxt_str_t ' but these only having a single space after the type... Anyway no problem, this can be a preparatory patch for adding further /status information... Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2022-09-06Status: fixed incorrect pointer in test operation.Zhidao HONG1-3/+3
Found by Coverity (CID 380755).
2022-08-29Status: added requests count.Zhidao HONG1-1/+4
2022-08-29Implemented basic statistics API.Valentin Bartenev1-0/+102