1
votes

Our custom infrastructure monitoring application watches scheduled agents that run in production. There is no problem in LotusScript to cycle through databases and agents to get their state.

Some databases have set mentioned property, so agents are enabled, but don't run.

Can anybody give some clues, how to read this property in LotusScript, so our application could report such databases?

There is solution in technote, but it states it works only in 32 bit environment (Lotus Notes clients are only 32 bit, so it is sufficient). Unfortunately, our application runs in background on x64 Domino servers.

Edit: test in development environment was successful - snippet of code from technote does not crash on Windows x64 Domino and flag is reported correctly.

3

3 Answers

3
votes

Code from technote works with 32 and 64 bit windows Domino servers.

Function agentsDisabled( db As NotesDatabase ) As Boolean
    Dim buffer As ReplicaInfo ' declarations from technote http://www-01.ibm.com/support/docview.wss?uid=swg21380020
    Dim hDB As Long
    Dim fullpath As String
    fullpath = String(1024, " ")
    OSPathNetConstruct 0, db.Server, db.Filepath, fullpath

    NSFDbOpen fullpath, hDB
    NSFDbReplicaInfoGet hDB, buffer
    agentsDisabled = ( buffer.Flags And &H0800) > 0
    NSFDbClose hDB
End Function

Not tested to set the flag, I just needed to detect whether it is set or not.

1
votes

If you are open to using Lotus Notes C API in LotusScript then you can look into this Technote.

There also a project on OpenNTF called Notes Database Properties LotusScript Class which allows you to set various other database properties that you can set via Notes client.

0
votes

The properties are mostly stored in the icon note. See this technote. Looks like you will need to test what changes in the $Flags item when you enable/disable the property.

EDIT: You could also try NotesNoteCollection.SelectAllNotes(True) and see if you get a note containing this property.