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
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
/JDBCConnectionPool
ls -l
-rw- ActiveConnectionsAv
-rw- ActiveConnectionsCu
-rw- ActiveConnectionsHi
-rw- ConnectionDelayTime (630)
-rw- ConnectionLeakProfi
-rw- ConnectionsTotalCou
-rw- CurrCapacity (5)
-rw- DeploymentState (2)
-rw- Enabled (true)
-rw- FailuresToReconnect
-rw- HighestNumAvailable (5)
-rw- HighestNumUnavailab
-rw- LeakedConnectionCou
-rw- MaxCapacity (20)
-rw- ModuleId (cgDataSource)
-rw- Name (cgDataSource)
-rw- NumAvailable (5)
-rw- NumUnavailable (0)
-rw- Parent
(com.bea:Name=
-rw- PoolState (true)
-rw- Properties ({databaseName=
-rw- State (Running)
-rw- StatementProfileCou
-rw- Type (JDBCConnectionPool
-rw- VersionJDBCDriver (com.pointbase.
-rw- WaitSecondsHighCoun
-rw- WaitingForConnectio
-rw- WaitingForConnectio
-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
>
>
> > 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 /JDBCConnectionPool
> > dir
> > @pools = $LAST
> > for $pool in $pools do
> > invoke $pool/testPool
> > get $pool/State
> > get $pool/ActiveConnect
> > get $pool/WaitingForCon
> > 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."
> >