Ensuring a quiet point is enabled in Windows

Posted by James Palmer on 16-Aug-2017 10:58

I've tried to get something formal out of tech support but they can only point me a *nix solutions which is useless in a Windows environment. 

What ways do you use in Windows to establish that a quiet point has actually been enabled? As far as I can see the 2 options are likely to be grepping the log file, and grepping the event log. I have no idea how to do either of these, and neither does our customer. This is Windows-2012 R2 Datacentre.

*braces self for 'apply the Linux patch jibes'

Posted by Libor Laubacher on 16-Aug-2017 11:42

> I fail to see how the Linux patch would solve the problem.

Tom is just trying to be funny. That is all. Needs some patching there as well.

:START

call %DLC%/bin/promon xx < xx.resp > xx.out

type xx.out | findstr /c:"Quiet Point is Active" > NUL

IF %ERRORLEVEL% EQU 0 (

echo "QP enabled"

) ELSE (

GOTO START

)

xx.resp is just plain text with

5

q

q

All Replies

Posted by Rob Fitzpatrick on 16-Aug-2017 11:03

You can also screen-scrape promon 5 (Activity).  It contains a message when a quiet point is active.  It can be run non-interactively.

Posted by James Palmer on 16-Aug-2017 11:06

That's an interesting idea Rob. Might see if I can piece something together. It's a pain that the application has 10 databases connected. Makes things like this much harder.

Posted by ChUIMonster on 16-Aug-2017 11:10

Obviously applying the Linux patch is the simplest and most effective solution.

The Windows sort-of-equivalent to "grep"  is "findstr".

Or, as Rob says, you can screen-scrape PROMON.

Posted by marshall on 16-Aug-2017 11:20

James,
 
I don’t know if tech support gave you the promon script version of checking for quiet point enabled.  There are articles about the how such as:
 
 
Carol
 

Posted by kirchner on 16-Aug-2017 11:26

I fail to see how the Linux patch would solve the problem. Is it the case that on Windows proutil can return before the database is actually quieted but on Linux proutil is guaranteed to return only after the quiet point is in effect?

Posted by James Palmer on 16-Aug-2017 11:27

Thanks [mention:fe8282ef278c4275ba47482593e9fbc2:e9ed411860ed4f2ba0265705b8793d05] all the info on that link is applicable to Linux. It is one of the links I was given.

Posted by ChUIMonster on 16-Aug-2017 11:33

It is much easier to script things with Linux.

Posted by George Potemkin on 16-Aug-2017 11:35

If you're running Progress V11.5 or higher than you can check that the MTX and BIB latches are owned by broker, i.e. _Latch._Latch-Owner eq 0.

Posted by James Palmer on 16-Aug-2017 11:42

Thanks George. This is OE10.2B08 currently. Hoping to upgrade them to 11.7 later this year.

Posted by Libor Laubacher on 16-Aug-2017 11:42

> I fail to see how the Linux patch would solve the problem.

Tom is just trying to be funny. That is all. Needs some patching there as well.

:START

call %DLC%/bin/promon xx < xx.resp > xx.out

type xx.out | findstr /c:"Quiet Point is Active" > NUL

IF %ERRORLEVEL% EQU 0 (

echo "QP enabled"

) ELSE (

GOTO START

)

xx.resp is just plain text with

5

q

q

Posted by kirchner on 16-Aug-2017 11:54

Hi James, I'd go for PowerShell using Get-EventLog for the event log or Select-String for the file. I think the file thing is easier in this case.

This piece of script will show you the last one of 5583/5584 events:

Select-String -Pattern "\((5583)|(5584)\)" -Path .\test.lg | Select-Object -Last 1

I just TABbed my way around but you don't need to fully qualify each cmdlet or parameter, this would work the same:

sls "\((5583)|(5584)\)" .\teste.lg  | select -l 1

Posted by Libor Laubacher on 16-Aug-2017 12:00

You do not need to scrape the .lg file. Just promon.

Posted by kirchner on 16-Aug-2017 12:06

The PowerShell equivalent of the article marshall pointed out, I think, is something like this:

$DBNAME='teste'

$LOOPTIME=10

while ($true) {

   $q1 = (Select-String -Pattern "\(5583\)" -Path "$DBNAME.lg" | Measure-Object).Count;

   $q2 = (Select-String -Pattern "\(5584\)" -Path "$DBNAME.lg" | Measure-Object).Count;

   if ($q1 -eq $q2) {

        "DB does NOT have a quiet point";

   } elseif ($q1 -gt $q2) {

       "quiet point HAS been enabled on the DB";

   } else {

       "DB.log's been shrunk or modified";

   }

   Start-Sleep -Seconds $LOOPTIME;

}

Libor's suggestion might be easier but I just tend to avoid batch programming in new development.

This thread is closed