how can I list using the wsadmin tool the currently active websphere variables and its values in a node/server ? Additionally, is there a way to filter the results using regular expressions ?
Thanks
environment-variableswebspherewsadmin
how can I list using the wsadmin tool the currently active websphere variables and its values in a node/server ? Additionally, is there a way to filter the results using regular expressions ?
Thanks
Best Answer
The
AdminTask.showVariables
command is a convenient method that allows you to retrieve WAS environment variables. These are returned as a string representation when obtaining a list of variables, though, so it's not as convenient for this purpose.Alternatively, you can use the
AdminConfig
. I'm not aware of any way to filter the results of these commands using regular expressions. TheAdminConfig.list
command allows filtering by regular expressions, but I haven't been able to get this to work with environment variables. My guess is that it filters based on thename
attribute, but because the variable entry name is actuallysymbolicName
, it doesn't work. You can still filter the results after retrieving all variables by applying some custom conditionals to test thesymbolicName
.