Answered Are Webspeed And Appservers Running

Chris Hughes

ProgressTalk.com Sponsor
Hi

I have a situation where webspeed and appserver brokers are restarted every night. Is there a simple way via windows batch file of confirming they are running.

I know from a human perspective I can run wtbman -query but am looking to use a scheduled batch file to email an alert if they are not running.

Thanks

Chris.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
Some OpenEdge command-line utilities return exit statuses. I can't test this right now but you could test the exit status from asbman or wtbman and see if it changes from zero to non-zero based on the result of the query. Long shot, but it might work.

Another possible approach is to query _Connect based on the client type and client name to see if at least one of the agents has been spawned, for each broker. Write the output to a file and parse it. Not elegant but it should work.
 

cj_brandt

Active Member
we run a batch asbman -query and check the output to make sure there are some app server agents showing AVAILABLE status.
 

RealHeavyDude

Well-Known Member
I check the name server on which the AppServer is registered ( given that it is running on the same server ).

nsman -name NS1 -query | grep "myAppService" | wc -l

This is the fastest and most reliable I've found when needing to know the status in a script file.

Heavy Regards, RealHeavyDude.
 

Chris Hughes

ProgressTalk.com Sponsor
Thanks for your suggestions guys, my solution tested and working (and fully windows-ified) is

Code:
@echo off
nsman -name NS1 -query | find "WS.WSSrvTest80" > NUL
IF ERRORLEVEL 1 (
    ECHO WS was NOT found
) ELSE (
    ECHO WS was found
)

nsman -name NS1 -query | find "AS.AppSrvTest80" > NUL
IF ERRORLEVEL 1 (
    ECHO AS was NOT found
) ELSE (
    ECHO AS was found
)

:)
 

TomBascom

Curmudgeon
ProTop knows:

Code:
xyzzy Auto Interval Rate JSON 86582 0 1.186          ProTop Version 3.3nx                                   2016/12/14 11:51:41
xyzzy 0 0                                                 /db/xyzzy                                                   xyzzy.com
  p
         Hit%    100.00          Commits:       254   DB UpTime:   31d 03:48       Oldest TRX:  01:11:04   Connections:   1,760
   Log Reads: 2,430,684            Undos:         3     Bkp Age:       10:36     Curr BIClstr:    11,800           -n %      59
    OS Reads:        34     Lock Tbl HWM:   768,481                            Oldest BIClstr:    11,766       Brokers:      10
   Rec Reads:   550,360         Lock Tbl%      0.29         New RM:       29     Num BIClstrs:        34   4gl Servers:      83
 LogRd/RecRd:      4.42     Curr # Locks:     2,894        From RM:       29       BI MB Used:     2,176   SQL Servers:      20
  Log Writes:       429    Modified Bufs:     5,279      From Free:        0   Curr AI Extent:   9 of 12   4gl Clients:   1,584
   OS Writes:        21                                   Examined:       29     Curr AI Seq#:    19,329   SQL Clients:       3
 Rec Creates:        29      IO Response:      0.12       Front2Bk:        0    Empty AI Exts:        11    App Server:      61  <===
 Rec Updates:        96         BogoMIPS:      5.32      Remove Lk:        8     Full AI Exts:         0     Web Speed:       0  <===
 Rec Deletes:         7                                                        Locked AI Exts:         0  BIW/AIW/WDOG:   1 1 1
   Rec Locks:   107,622            Notes:       843             843                APW Writes:        15       AI Mgmt:       1
   Rec Waits:         0    BIW/AIW Write%        50              93                 APW Write%        71          APWs:       4
 Idx Blk Spl:         0    Writes to Log:        10               5              Bufs Scanned:    17,850         Local:   1,566
 Resrc Waits:         3   BIW/AIW Writes:         5               5             APW Scan Wrts:        15        Remote:       3
 Latch Waits:       794   Partial Buf Wr:         5               0                APW Q Wrts:         0         Batch:      79
   pica Used:         0   Busy Buf Waits:         0               0              Chkpt Q Wrts:         0           TRX:     731
   pica Used%      0.00    Empty Buf Wts:         0               0              Flushed Bufs:         0       Blocked:       1
 
Top