Skip to content

omdb: Add one-shot query exec to oxql subcommand#10154

Merged
wfchandler merged 2 commits intomainfrom
wc/omdb-oxql-exec
Mar 26, 2026
Merged

omdb: Add one-shot query exec to oxql subcommand#10154
wfchandler merged 2 commits intomainfrom
wc/omdb-oxql-exec

Conversation

@wfchandler
Copy link
Copy Markdown
Contributor

In some cases, we may execute an oxql query as part of an ad hoc shell script, or have capture the queries executed in the shell history. The mandatory reedline shell used by the oxql subcommand prevents this.

Add a --execute flag to provide a one-shot execution option to the oxql subcommand.

In some cases, we may execute an `oxql` query as part of an ad hoc shell
script, or have capture the queries executed in the shell history. The
mandatory `reedline` shell used by the `oxql` subcommand prevents this.

Add a `--execute` flag to provide a one-shot execution option to the
`oxql` subcommand.
@wfchandler
Copy link
Copy Markdown
Contributor Author

Tested out on dogfood:

root@oxz_switch0:/tmp# ./omdb-oxql-exec oxql -e 'get sled_cpu:cpu_nsec | filter timestamp > @now() - 1m' 2>/dev/null | head

sled_cpu:cpu_nsec

 cpu_id: 9
 rack_id: de608e01-b8e4-4d93-b972-a7dbed36dd22
 sled_id: 781ab3c9-ff3c-428a-9f3e-895a1e86a111
 sled_model: 913-0000023
 sled_revision: 1
 sled_serial: BRM13250012
 state: user

@wfchandler wfchandler marked this pull request as ready for review March 25, 2026 21:55
@wfchandler wfchandler requested a review from bnaecker March 25, 2026 21:55
Copy link
Copy Markdown
Collaborator

@bnaecker bnaecker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

@wfchandler wfchandler merged commit 06958cc into main Mar 26, 2026
16 checks passed
@wfchandler wfchandler deleted the wc/omdb-oxql-exec branch March 26, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants