Thank you Andre and calder.

On the AIX side this worked. I am limited also I think due to the shell. If
I use the -p tcp option it gives me a long list of counts of TCP
connections and bytes. This command gave me similar on AIX:

netstat -a|grep 1526

tcp        0      0  cpmfttapt21.51186      cpmfttdbt01-vip..1526
ESTABLISHED

tcp        0      0  cpmfttapt21.51198      cpmfttdbt01-vip..1526
ESTABLISHED

tcp        0      0  cpmfttapt21.51211      cpmfttdbt01-vip..1526
ESTABLISHED

tcp        0      0  cpmfttapt21.55213      cpmfttdbt01-vip..1526
ESTABLISHED

tcp        0      0  cpmfttapt21.55214      cpmfttdbt01-vip..1526
ESTABLISHED

tcp        0      0  cpmfttapt21.55215      cpmfttdbt01-vip..1526
ESTABLISHED

tcp        0      0  cpmfttapt21.57493      cpmfttdbt01-vip..1526
ESTABLISHED

tcp        0      0  cpmfttapt21.57495      cpmfttdbt01-vip..1526
ESTABLISHED

tcp        0      0  cpmfttapt21.35153      cpmfttdbt01-vip..1526
ESTABLISHED

tcp        0      0  cpmfttapt21.35154      cpmfttdbt01-vip..1526
ESTABLISHED

tcp        0      0  cpmfttapt21.35157      cpmfttdbt01-vip..1526
ESTABLISHED

On Tue, Jan 10, 2017 at 12:40 PM, André Warnier (tomcat) <a...@ice-sa.com>
wrote:

> On 10.01.2017 18:06, Joleen Barker wrote:
>
>> Hi Andre - I played around a little more and ran the command netstat -a |
>> grep 1526 which is the port number and received information that looks
>> like
>> 11 connections are open at this time. Do you know what the number is that
>> follows the machine name in the forth column for example the 51186?
>>
>
> I do not know AIX. Maybe try :
> netstat -h
> and/or
> man netstat
>
> (and also try the command without the grep, to see the column headers)
>
>
>
>> netstat -a | grep 1526
>>
>> tcp        0      0  cpmfttapt21.51186      cpmfttdbt01-vip..1526
>> ESTABLISHED
>>
>> tcp        0      0  cpmfttapt21.51198      cpmfttdbt01-vip..1526
>> ESTABLISHED
>>
>> tcp        0      0  cpmfttapt21.51211      cpmfttdbt01-vip..1526
>> ESTABLISHED
>>
>> tcp        0      0  cpmfttapt21.55213      cpmfttdbt01-vip..1526
>> ESTABLISHED
>>
>> tcp        0      0  cpmfttapt21.55214      cpmfttdbt01-vip..1526
>> ESTABLISHED
>>
>> tcp        0      0  cpmfttapt21.55215      cpmfttdbt01-vip..1526
>> ESTABLISHED
>>
>> tcp        0      0  cpmfttapt21.57493      cpmfttdbt01-vip..1526
>> ESTABLISHED
>>
>> tcp        0      0  cpmfttapt21.57495      cpmfttdbt01-vip..1526
>> ESTABLISHED
>>
>> tcp        0      0  cpmfttapt21.35153      cpmfttdbt01-vip..1526
>> ESTABLISHED
>>
>> tcp        0      0  cpmfttapt21.35154      cpmfttdbt01-vip..1526
>> ESTABLISHED
>>
>> tcp        0      0  cpmfttapt21.35157      cpmfttdbt01-vip..1526
>> ESTABLISHED
>>
>> On Tue, Jan 10, 2017 at 11:59 AM, Joleen Barker <oldenuf2no...@gmail.com>
>> wrote:
>>
>> Hello Filippo - I do not have JConsole available and the proposed idea is
>>> past my knowledge level.
>>>
>>> Hello André - This was an interesting idea but it didn't work for me. I
>>> only have the ksh available and could only use netstat -p tcp but the
>>> output didn't make sense to me.
>>>
>>> On Tue, Jan 10, 2017 at 11:24 AM, André Warnier (tomcat) <a...@ice-sa.com>
>>> wrote:
>>>
>>> On 10.01.2017 17:10, Joleen Barker wrote:
>>>>
>>>> Hello All,
>>>>>
>>>>> Details:
>>>>> Tomcat Version: 7.0.64.0
>>>>> Java Version: 1.8.0
>>>>> OS: AIX 6.1
>>>>> Database: Oracle 11
>>>>>
>>>>> The web application installed on the server above makes data
>>>>> connections
>>>>> to
>>>>> run file transfers from point A to point B. The default Database
>>>>> connection
>>>>> setting that are set when the application server comes up are as
>>>>> follows:
>>>>>
>>>>> DataBasePoolingFlag - APACHE
>>>>> MaxActive - 400
>>>>> MaxIdle - 20
>>>>> MinIdle - 10
>>>>>
>>>>> We had an incident where all these connections were actually used up
>>>>> due
>>>>> to
>>>>> a script someone had that looped. I need to determine at any given
>>>>> point
>>>>> in
>>>>> time how many DB connections exist from the web application to the DB.
>>>>> There may be more than one way to do this. I am sure there is a DB
>>>>> command
>>>>> that could be run against the schema but the schema is pointed to by
>>>>> many
>>>>> servers. I am  wondering if there is a java command of some kind that I
>>>>> could run that may tell me how many connections are open at that time
>>>>> or
>>>>> possibly a tomcat or apache command.
>>>>>
>>>>> Thank you for the help in advance.
>>>>>
>>>>>
>>>>> Hi.
>>>> Maybe an "out of the box" answer, not using java.
>>>> I don't know how the following commands fare under AIX, but on a Linux
>>>> system, the OS-level command :
>>>> ~# netstat -pan --tcp | grep ESTABLISHED
>>>> will show you pretty much all TCP connections that are established
>>>> between any process and any other, local or remote.
>>>>
>>>> Sample output :
>>>>
>>>> tcp6       0      0 127.0.0.1:45095         127.0.0.1:11002
>>>>   ESTABLISHED 11096/java
>>>> tcp6       0      0 127.0.0.1:8009          127.0.0.1:53564
>>>>   ESTABLISHED 2677/java
>>>> tcp6       0      0 127.0.0.1:8009          127.0.0.1:53677
>>>>   ESTABLISHED 2677/java
>>>> tcp6       0      0 127.0.0.1:8009          127.0.0.1:53659
>>>>   ESTABLISHED 2677/java
>>>> tcp6       0      0 127.0.0.1:8009          127.0.0.1:53656
>>>>   ESTABLISHED 2677/java
>>>> tcp6       0      0 127.0.0.1:8009          127.0.0.1:53620
>>>>   ESTABLISHED 2677/java
>>>> tcp6       0      0 127.0.0.1:8009          127.0.0.1:53608
>>>>   ESTABLISHED 2677/java
>>>> tcp6       0      0 127.0.0.1:45142         127.0.0.1:11002
>>>>   ESTABLISHED 11096/java
>>>> tcp6       0      0 127.0.0.1:43558         127.0.0.1:11002
>>>>   ESTABLISHED 11096/java
>>>> tcp6       0      0 127.0.0.1:45128         127.0.0.1:11002
>>>>   ESTABLISHED 11096/java
>>>> tcp6       0      0 127.0.0.1:45069         127.0.0.1:11002
>>>>   ESTABLISHED 11096/java
>>>>
>>>> I presume that you could easily find out the process-id of your Tomcat,
>>>> and the port number under which the database is accessed.
>>>> It would be a simple matter to "grep" the above and count the lines, to
>>>> get the answer you seem to want.
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>>>
>>>>
>>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to