Forum Discussion
Monitoring node with npath routing
When run from bash you can suppress the prompt with -q and run multiple commands with -c. Shown below with and without -q. Sounds like you just need to connect to bash prompt and run tmsh -q "show ltm virtual" and pull out what you need.
cheers
tmsh -c "show sys clock; show sys connection" ----------------------------- Sys::Clock ----------------------------- Wed Nov 04 09:41:18 NZDT 2015 Really display all connections? (y/n) tmsh -q -c "show sys clock; show sys connection" ----------------------------- Sys::Clock ----------------------------- Wed Nov 04 09:41:33 NZDT 2015 Sys::Connections 10.10.10.19:49332 10.11.11.11:8080 10.12.12.12:49332 10.13.13.13:8080 tcp 307 (slot/tmm: 1/1) none
- Craig_T_232390Nov 03, 2015
Nimbostratus
Thanks so much for the quick answer. Having some trouble though, and it's probably due to lack of experience with F5. This is the prompt when I log directly in using Plink:
ltmops@***********(Active)(tmos)
When I try to use "tmsh -q..." I get an error msg. Is it rights related, by chance?
Syntax Error: unexpected argument "tmsh"
Trying just "-q show..." gives a similar unexpected argument "-q" error.
that's because you are connecting to the TMSH shell and not bash. The easiest solution would be to allow the ltmops user to connect to advanced shell (bash) in System-Users but this assumes local auth, if you are using remote auth it may be a bit more difficult.
cheers
- Craig_T_232390Nov 03, 2015
Nimbostratus
Thanks, but I believe it would be like twisting teeth to get any changes to the account implemented. So, if I'm getting this correctly, there is no way to suppress the prompt with this type of access?
- LoyalSoldierAug 02, 2023
Altostratus
If you only have access to tmsh you can run bash commands from that as well, assuming the account is allowed bash access. To do so:
run /util bash -c 'tmsh -q -c "show sys clock; show sys connection"'
Note this ends with a double, then single, quote.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com