How to get the user not loging in or accessing their mailbox for x number of days(week,month) in LN

Posted on 2006-05-10
Medium Priority
Last Modified: 2013-12-18
Hi experts,

We want to generate a reports containing the list of LN user that are not logging in or Accessing their mailbox for x number of days, we need this report for our audit requirements.


Question by:amd1979
LVL 63

Expert Comment

ID: 16647372
I do not think that Notes tracks Login information normally.

You might check the Catalog file as a start.

Other option may be to increase the logging level and then have an agent pull login information to a file.

If you have multiple servers this can be a real issue.

Other options are to use an agent to check when the last time a message was sent.

What version are you using ?

I hope this helps !
LVL 14

Accepted Solution

cezarF earned 252 total points
ID: 16647431

Author Comment

ID: 16647442
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

LVL 18

Expert Comment

ID: 16647613
I used cezarf's with an agent in a separate database to monitor tracking.

Author Comment

ID: 16649888

How about if the admin didnt enable the activity logging?

marilyng, can you provide me the agent?

thanks for the help guys

LVL 18

Assisted Solution

marilyng earned 248 total points
ID: 16654452
In the log.nsf on each server by user will tell you who logged on when and what they did once they logged on.  This is a bit different from the Database logging, which you have to turn on, and which collects back and front end reads and writes.    The server log will tell you if they connected to a database, with 0 reads, 0 writes, etc.  So, someone with replication turned on every 5 minutes will have a lot of these entries, but not necessarily read and write ones.  At any rate, I created a logreports.nsf for the purpose of checking on people, and administration ID use.   I ran this locally and collected the stats from 3 servers.  The code may wrap funny...:)

'Scheduled: Agent for logreports.nsf:

Option Public
Option Explicit
Sub Initialize
      Dim session As New NotesSession
      Dim db As NotesDatabase
      Set db = session.currentdatabase      
      Dim doc As NotesDocument
      Dim br As String, tb As String, q As String
      Dim thisStart As NotesDateTime
      Dim thisEnd As NotesDatetime
      Dim thisUser As NotesName
      br = Chr(10)
      tb = Chr(9)
      q = Chr(34)
      Dim count As Integer
      Dim agentLog As New NotesLog("Agent log")
      Call agentLog.OpenAgentLog
      On Error Goto HandleError
      Dim rtitem As NotesRichTextItem
      Dim richStyle As NotesRichTextStyle
      Set RichStyle = Session.CreateRichTextStyle
      RichStyle.NotesFont = FONT_HELV
      RichStyle.FontSize = 9
      RichStyle.NotesColor = COLOR_DARK_BLUE
      Dim serverlist(2) As String
      serverlist(0) = "SERVER01/SERVERS"
      serverlist(1) = "SERVER02/SERVERS"
      serverlist(2) = "SERVER03/SERVERS"
      'The Name of the Log on each sesrver
      Const targetdbstr = "log.nsf"
      Const targetformstr="Session"
      Const targetviewstr="Sample Billing"
      Dim targetdb As NotesDatabase, targetview As notesview, targetdoc As Notesdocument
      Dim vcoll As NotesDocumentCollection, starttime As NotesDateTime, n As Integer
      Dim item As NotesItem, tItem As NotesItem, j As Integer
      Dim view As NotesView
      Set view = db.getview("bdl")
      If view Is Nothing Then
            Print "Unable to find lookup view.. exiting"
            Exit Sub
      End If
'This is meant to monitor people every day, so
'you can add or remove names to this list and run scheduled
'If you add names, then add more dimensions to the array

      Dim nameList(2) As String
      nameList(0) = "Fist Person/OU/O"
      nameList(1) = "Second Person/OU/O"
      nameList(2)="Third Person/OU/O"
      For n = Lbound(nameList) To Ubound(nameList)
            Set thisStart = New NotesDateTime(Format(Now(), "mm/dd/yyyy") + " 12:01 AM")
            Set thisUser = New NotesName(nameList(n))      
            Set doc = view.getdocumentbykey(Ucase(thisStart.dateOnly + thisuser.common), True)            
            If doc Is Nothing Then
                  Set doc = New NotesDocument(db)
            End If
            With doc
                  .form = "Log Summary"                  
                  .logdate = thisStart.lslocaltime
                  .username = thisuser.abbreviated
            End With      
            With doc
                  .reads = 0
                  .writes = 0
                  .Transactions = 0
            End With
            Set item = doc.getfirstitem("Body")
            If Not item Is Nothing Then
            End If
            Set rtitem = New NotesRichTextItem(doc,"Body")            
            Dim k As Integer, thisList As Variant, found As Variant, diff As Long,elapsed As Double
            Dim st As NotesDateTime, ft As NotesDateTime
            found = False
            For j = Lbound(serverlist) To Ubound(serverlist)
                  richStyle.Bold = True
                  rtItem.appendstyle RichStyle
                  rtitem.appendtext serverlist(j)
                  rtitem.Addnewline 1,True      
                  richStyle.Bold = False
                  RTItem.appendstyle RichStyle
                  Set targetdb = New NotesDatabase(serverlist(j), targetdbstr)
                  If targetdb.isopen Then
                        Set targetview = targetdb.getview(targetviewstr)
                        If Not targetview Is Nothing Then
                              Set vcoll = targetview.getalldocumentsbykey(thisuser.common)
                              If vcoll.count >1 Then
                                    'Print "Found " + Cstr(vcoll.count) + " documents for " + serverlist(j)
                                    Set targetdoc = vcoll.getfirstdocument
                                    While Not targetdoc Is Nothing
                                          Set starttime =New NotesDateTime(Format(targetdoc.starttime(0), "mm/dd/yyyy" + " 12:01 AM"))
                                          diff = starttime.timedifference(thisStart)
                                          'Print "Processing document for " + starttime.dateonly + " (" + Cstr(diff) + ")"
                                          If starttime.dateonly = thisStart.dateonly Then
                                                thisList = targetdoc.body                                          
                                                found = True
                                                If targetdoc.body(0) <> "" Then
                                                      doc.reads = doc.reads(0) + targetdoc.reads(0)
                                                      doc.writes = doc.writes(0) + targetdoc.Writes(0)
                                                      doc.Transactions = doc.Transactions(0) + targetdoc.transactions(0)
                                                      If targetdoc.hasitem("finishtime") Then
                                                            If targetdoc.finishtime(0) <>"" Then
                                                                  Set ft = New NotesDateTime(targetdoc.finishtime(0))
                                                                  Set st = New NotesDateTime(targetdoc.StartTime(0))
                                                                  elapsed = Round(ft.TimeDifference(st)/3600,2)                  
                                                            End If                                                      
                                                            elapsed = 0
                                                      End If
                                                      doc.ElapsedTime=doc.ElapsedTime(0) + elapsed                                                
                                                      For k = Lbound(thisList) To Ubound(thisList)
                                                            If Trim(thisList(k)) <>"" Then
                                                                  rtitem.appendtext Format(targetdoc.starttime(0),"hh:mm AM/PM")
                                                                  rtitem.appendtext Rtrim(thisList(k))
                                                                  rtitem.addnewline 1,True                                                            
                                                            End If
                                                      rtitem.appendtext Format(targetdoc.starttime(0),"hh:mm AM/PM")
                                                      rtitem.appendtext "No read/write log entries found for this entry"
                                                      rtitem.addnewline 1,True      
                                                End If
                                          End If
                                          If diff = 0 Then
                                                If found Then
                                                      rtitem.addnewline 1,True
                                                End If                                          
                                          End If                                    
                                          found = False
                                          Set targetdoc = vcoll.getnextdocument(targetdoc)
                              End If
                        End If
                  End If            
            doc.save True, False, True      
            Set doc = Nothing
      Call agentLog.LogAction("Log Summaries Complete")
      Call agentLog.Close
      Exit Sub
      Call agentLog.LogAction("Error running agent log: " + Error$ + "-" + Str(Err))
      Call agentLog.Close
      Exit Sub
End Sub

Image of form is here:

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Loops Section Overview
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question