Forum Discussion
using grep to list all nodes with a specific intervall
Hi guys,
I am trying to figure out how to display all nodes that have an interval not equal to "300".
Example:
list ltm node | grep -v "interval 300" -B 5
but this way it shows me all other lines that don't have "interval 300". Consequently ALL nodes but not the one line...
I hope you can follow me. 😄
does anyone have an idea how I can do this better?
Best regards
Basti
should be pretty easy, try this
tmsh list ltm node all all-properties one-line | grep -v "interval 300" | grep "ltm node" --color
[edit] you could also possibly copy ^this output^ into notepad++ and bulk edit all lines to " tmsh modify ltm node X fqdn { interval 300 } "
Evergrim This will show you all node names followed by lines that have the value not equal to 300 so you can then remove all the nodes that are not followed by a line with an interval value manually.
list ltm node | grep -E "node|interval " | grep -v "interval 300"
There's a problem with this .. default "interval" is 3600 and won't be displayed by this command so you will have nodes followed by nothing that might actually have 3600 interval 🙂
- EvergrimAltocumulus
that is correct.
I took this command, it worked best for my purpose:list ltm node all-properties fqdn-templates | grep -E "node|interval" | grep -v "interval 300"
Thanks everyone for the help!
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