Search the web
Sign In
New User? Sign Up
wlshell
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
WLShell: WebLogic 8 vs. WebLogic 9 syntax?   Message List  
Reply | Forward Message #661 of 675 |
[wlshell] Re: WLShell: WebLogic 8 vs. WebLogic 9 syntax?


Hello Paco,
 
thanks for your reply. Unfortunately I am still facing problems and I am obviously not yet understanding enough about WLS 9.x.
 
My own investigations but also your example demonstrate one thing: There is a far deeper level of directories now underneath "/JDBCConnectionPoolRuntime" than in WLS 8.x ... and this makes matters complicated for me (I still need to write a script that would check all the instances on 96 or so servers ... !)
 
In WLS 8.x the simple "for .... in ... do" loop from my example below (my original message on the bottom) would be sufficient to get the the desired infos from all the configured + deployed ConnectionPools ... But how would I get those infos on WLS 9.x ?
 
I tried this sequence (which doesn't work as the $LAST variable changes with each command execution and there seems to be no way of assigning the output of the "dir" command directly to a variable ??):
 
domain.com.bea:
keys Type Name Location ServerRuntime ApplicationRuntime
cd domain.com.bea:/JDBCConnectionPoolRuntime
MyPath = $PWD
if $MyPath != "domain.com.bea:/JDBCConnectionPoolRuntime" then
        echo "INFO: Can't find a JDBCConnectionPoolRuntime here on" $DOMAIN
        echo "INFO: This probably means that there is no pool deployed here."
        @ exit
else
        dir
        @ dataSource = $LAST
        for $dataSources in $dataSource do
                cd $dataSources
                dir
                @ serverInstance = $LAST
                        for $serverInstances in $serverInstance do
                                cd $serverInstances
                                dir
                                @ moreServerInstance = $LAST
                                        for $moreServerInstances in $moreServerInstance do
                                                cd $moreServerInstances
                                                dir
                                                @ moreDataSource = $LAST
                                                        for $moreDataSources in $moreDataSource do
                                                                cd $moreDataSources
                                                                invoke testPool
                                                                poolState = get State
                                                                activeConnections = get ActiveConnectionsCurrentCount
                                                                waitingConnections = get WaitingForConnectionCurrentCount
                                                                echo "INFO: "$DOMAIN
                                                                echo "INFO: "$PWD
                                                                echo "INFO: Pool State: " $poolState
                                                                echo "INFO: Active Connections (current count): " $activeConnections
                                                                echo "INFO: Waiting for Connection (current count): " $waitingConnections
                                                        end
                                        end
                        end
        end
end
exit
 
 
What am I missing? How could I get above infos (State, ActiveConnectionsCurrentCount, WaitingForConnectionCurrentCount, maybe other things too?) out from a WLS 9.x server? Maybe there is away to arrange things via the "keys" command??
 
My main problem here (besides me being a WLS 9.x noob ;-)  ...) is as I already said that there is a far deeper level of directories ... and it's not possible to predict the names of the directories (sometimes it's "AdminServer", sometimes it's something else ... ) that I encounter. "cd" and "dir" commands don't seem to handle wildcards "*" and the "find" command doesn't work for me (I am probably using it wrong?), it just can't find the stuff I am interested in.
 
So I'd once again really really appreciate your help here. As I see it I either need ....
 
1.) help with that script above?
2.) help finding the right "keys" command so that the directory structrure I'd encounter is "flatter" and not cascaded as much?
3.) a version of "wlshell" that can handle wildcards?
4.) help with the "find" command so that it really finds the stuff for me that I am interested in?
 
And sorry for my noobness. :-)
 
Looking forward to your help and advice + Thank you so far,
 
DJ.
 
Drazenko Djuricic
 


Von: wlshell@yahoogroups.com [mailto:wlshell@yahoogroups.com] Im Auftrag von sfomad
Gesendet: Sonntag, 2. September 2007 04:03
An: wlshell@yahoogroups.com
Betreff: [wlshell] Re: WLShell: WebLogic 8 vs. WebLogic 9 syntax?

DJ

WebLogic MBeans are organized differently in WLS 9 and 10. Here is an
example of how you can access the JDBC Pool stats in WLS 9 and 10:

connect localhost:7001 weblogic weblogic
domain.com.bea:
keys Type Name Location ServerRuntime ApplicationRuntime
cd
/JDBCConnectionPoolRuntime/cgDataSource/AdminServer/AdminServer/cgDataSource

ls -l

-rw- ActiveConnectionsAverageCount (0)
-rw- ActiveConnectionsCurrentCount (0)
-rw- ActiveConnectionsHighCount (0)
-rw- ConnectionDelayTime (630)
-rw- ConnectionLeakProfileCount (0)
-rw- ConnectionsTotalCount (5)
-rw- CurrCapacity (5)
-rw- DeploymentState (2)
-rw- Enabled (true)
-rw- FailuresToReconnectCount (0)
-rw- HighestNumAvailable (5)
-rw- HighestNumUnavailable (0)
-rw- LeakedConnectionCount (0)
-rw- MaxCapacity (20)
-rw- ModuleId (cgDataSource)
-rw- Name (cgDataSource)
-rw- NumAvailable (5)
-rw- NumUnavailable (0)
-rw- Parent
(com.bea:Name=cgDataSource,ServerRuntime=AdminServer,Location=AdminServer,Type=ApplicationRuntime)
-rw- PoolState (true)
-rw- Properties ({databaseName=weblogic_eval, user=weblogic})
-rw- State (Running)
-rw- StatementProfileCount (0)
-rw- Type (JDBCConnectionPoolRuntime)
-rw- VersionJDBCDriver (com.pointbase.jdbc.jdbcUniversalDriver)
-rw- WaitSecondsHighCount (0)
-rw- WaitingForConnectionCurrentCount (0)
-rw- WaitingForConnectionHighCount (0)
-rw- WorkManagerRuntimes ()

if you want to find a particular MBean, use the find command
find cgDataSource
or
find -x cgDataSource

Cheers,
Paco

--- In wlshell@yahoogroups.com, <drazenko.djuricic@...> wrote:
>
>
> > Hello Paco,
> > Hello mailing list,
> >
> > We have 96 WebLogic servers here, some of which have multiple
> > instances and multiple versions of BEA WebLogic running & installed in
> > parallel. My problem is that I wanted e.g. to monitor JDBC connection
> > pools on all those machines. So for WebLogic 8.x this could be e.g. a
> > script like this:
> >
> > ...
> > cd /JDBCConnectionPoolRuntime
> > dir
> > @pools = $LAST
> > for $pool in $pools do
> > invoke $pool/testPool
> > get $pool/State
> > get $pool/ActiveConnectionsCurrentCount
> > get $pool/WaitingForConnectionCurrentCount
> > end
> > ...
> >
> > Above script works tip top on WebLogic 8.x ... But on WebLogic 9.x all
> > the structures are completely different and I am completely lost :-(
> >
> > So my humble question is: How would I need to modify above script so
> > that it works in WebLogic 9.x too? I've spent the last few days
> > trying things out but I haven't yet figured this out.
> >
> > Looking forward for help :)
> >
> > Regards,
> > "DJ."
> >

.



Mon Sep 3, 2007 3:13 pm

drazenko.djuricic@...
Send Email Send Email

Forward
Message #661 of 675 |
Expand Messages Author Sort by Date
drazenko.djuricic@...
Send Email
Aug 30, 2007
3:46 pm

DJ WebLogic MBeans are organized differently in WLS 9 and 10. Here is an example of how you can access the JDBC Pool stats in WLS 9 and 10: connect...
sfomad
Offline Send Email
Sep 2, 2007
2:03 am

Hello Paco, thanks for your reply. Unfortunately I am still facing problems and I am obviously not yet understanding enough about WLS 9.x. My own...
drazenko.djuricic@...
Send Email
Sep 3, 2007
5:00 pm

DJ: your script is almost correct, just need to add "cd .." at the end of each for loop, to go up one level. Also make sure you have the latest version (2.1.0)...
sfomad
Offline Send Email
Sep 3, 2007
5:29 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help