Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BSim: Add status subcommand to bsim_ctl #7102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gemesa
Copy link
Contributor

@gemesa gemesa commented Oct 25, 2024

I added the status subcommand to bsim_ctl because I really miss it. While one can run pg_ctl directly to check the status it is easier to use bsim_ctl instead. I think this is a commonly used feature that others might also find helpful.

PostgreSQL reference is available here.

$ ls ~/git-repos/bsim-db
                                                                                                                      
$ ./support/bsim_ctl status ~/git-repos/bsim-db
openjdk version "21.0.4" 2024-07-16 LTS
OpenJDK Runtime Environment Temurin-21.0.4+7 (build 21.0.4+7-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.4+7 (build 21.0.4+7-LTS, mixed mode)
Unexpected error
java.io.IOException: Error getting postgres server status
	at ghidra.features.bsim.query.BSimControlLaunchable.statusCommand(BSimControlLaunchable.java:1088)
	at ghidra.features.bsim.query.BSimControlLaunchable.run(BSimControlLaunchable.java:1431)
	at ghidra.features.bsim.query.BSimControlLaunchable.launch(BSimControlLaunchable.java:1493)
	at ghidra.GhidraLauncher.launch(GhidraLauncher.java:81)
	at ghidra.Ghidra.main(Ghidra.java:54)
                                                                                                                      
$ ./support/bsim_ctl start ~/git-repos/bsim-db
openjdk version "21.0.4" 2024-07-16 LTS
OpenJDK Runtime Environment Temurin-21.0.4+7 (build 21.0.4+7-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.4+7 (build 21.0.4+7-LTS, mixed mode)
No client authentication
Initializing data directory
Generating servers SSL certificate
Server started
BSim extension enabled
                                                                                                                      
$ ./support/bsim_ctl status ~/git-repos/bsim-db
openjdk version "21.0.4" 2024-07-16 LTS
OpenJDK Runtime Environment Temurin-21.0.4+7 (build 21.0.4+7-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.4+7 (build 21.0.4+7-LTS, mixed mode)
Server running
                                                                                                                      
$ ./support/bsim_ctl stop ~/git-repos/bsim-db
openjdk version "21.0.4" 2024-07-16 LTS
OpenJDK Runtime Environment Temurin-21.0.4+7 (build 21.0.4+7-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.4+7 (build 21.0.4+7-LTS, mixed mode)
Server shutdown complete
                                                                                                                      
$ ./support/bsim_ctl status ~/git-repos/bsim-db
openjdk version "21.0.4" 2024-07-16 LTS
OpenJDK Runtime Environment Temurin-21.0.4+7 (build 21.0.4+7-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.4+7 (build 21.0.4+7-LTS, mixed mode)
Server down

@ryanmkurtz ryanmkurtz added Status: Triage Information is being gathered Feature: BSim labels Oct 25, 2024
@ghidracadabra ghidracadabra added Status: Prioritize This is currently being prioritized and removed Status: Triage Information is being gathered labels Nov 7, 2024
@ghidracadabra ghidracadabra added Status: Internal This is being tracked internally by the Ghidra team and removed Status: Prioritize This is currently being prioritized labels Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: BSim Status: Internal This is being tracked internally by the Ghidra team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants