Solved

Generating User Activity Report

Posted on 1999-01-21
3
428 Views
Last Modified: 2013-12-18
Hello,

I am trying to generate a user activity report using an agent.  I know you can view user activity of a particular database from the database information tab, but how can I display this information in a form... with an automatic process?  For example, I want to display the user activity information in a table... name in one column... type of activity in different column... etc... any ideas from experts out there?  Any help would be appreciated...

JJ
0
Comment
Question by:josephj
  • 2
3 Comments
 

Accepted Solution

by:
willislt earned 100 total points
ID: 1117960
Well, there is no easy way. The reason is that Lotus gives us no
"hook" to access the User Activity log. There is no class in
LotusScript to access it. I've asked Lotus about this at
LotusSphere this week. They said you could use the C API to do
it, but that's it. One workaround is to use server admin tools
to analyze the database in question and click on the check box
for "User Activity" but it is very slow in producing the information you want.

A better way (just wrote it last week) is to copy the user activity log to the clipboard (from DB properties tab), paste
it into Notepad, run a simple LotusScript agent on it, and produce the output you are looking for. I'll send you the code
if you like when I return from LotusSphere to Minneapolis next
week.
0
 

Author Comment

by:josephj
ID: 1117961
Although I was disappointed that there was no easy connection between User Activity Log, I can at least stop wasting time looking in that direction.

If I can't use the user activity, is there another way to generate a report on who accessed the database and when?  I am not even particularly interested what documents were accessed... just want to know who accessed the database... and run a report displaying list of people who accessed it... and person's profile... etc... I just thought if there was a way to link user activity it would be the easiest way... any new ideas willislt?

JJ

PS.  Thank you so much for your kind help!  
0
 

Expert Comment

by:willislt
ID: 1117962
You can also just look at the server log and view database
activity either by database or by user. Check it out and see if
that meets your need.

The OTHER alternative I mentioned is to write a simple agent, put it in some "play with" database and activate it from there.

Usage steps are as follows:
1. Paste from the clipboard the user activity log text of the
database you want info on into a new Notepad file window.
2. Save the notepad file as "c:\larry\UserAct1.txt"
3. Run the agent (code below)
4. After the agent runs, you will have a file called
   "c:\larry\UserAct3.txt" that you can look at
5. That's it!

The code follows. You can just paste the whole thing into the
initialize event of a new agent.

Sub Initialize
     Dim char As String*1
     Dim uline As String
     Dim a As Integer
     Dim p As Integer
     Dim UserName As String
     Dim DateTime As String
     Dim Varray(500,3) As String
     Dim cnt As Integer
     Dim WholeLine As String
     Dim i As Integer
     
     Open "c:\larry\UserAct1.txt" For Input As #1
     Open "c:\larry\UserAct2.txt" For Output As #2
     
' Read the initial file and write it out again formatted properly (without the rich text characters)    
     Print "Formatting the input file"
     uline = ""
     While Not Eof(1)
          char = Inputb(1,1)
          a = Asc(char)
          If a <> 10 Then
               uline = uline & char
          Else
               Print #2, uline
               uline = ""
          End If
     Wend
     Close #1
     Close #2
     
' Now process the second file and build the array of unique user names and other info    
     Print "Building the array"
     cnt = 0
     Open "c:\larry\UserAct2.txt" For Input As #1
     While Not Eof(1)
          Line Input #1, uline
          WholeLine = uline
          p = Instr(uline,"  ")
          DateTime = Left$(uline,p-1)
          UserName = Mid$(uline,p+2)
          p = Instr(UserName,"/")
          UserName = Left$(UserName,p-1)
          UserName = UserName & Space$(25-Len(UserName))
         
' See if the name already exist in the array. If it does, skip it.          
          found = False
          For i = 1 To cnt
               If Varray(i,1) = UserName Then
                    found = True
                    Exit For
               End If
          Next
         
          If Not found Then
               cnt = cnt + 1
               Varray(cnt,1) = UserName
               Varray(cnt,2) = DateTime
               Varray(cnt,3) = WholeLine
          End If    
         
     Wend
     Close #1
     
' Do a simple bubble sort to sort the file by user name
     Print "Sorting the information"
     sorted = False
     While Not sorted
          sorted = True
          For i = 1 To cnt
               If Varray(i,1) > Varray(i+1,1) Then
                    temp1$ = Varray(i,1)
                    temp2$ = Varray(i,2)
                    temp3$ = Varray(i,3)
                    Varray(i,1) = Varray(i+1,1)
                    Varray(i,2) = Varray(i+1,2)
                    Varray(i,3) = Varray(i+1,3)
                    Varray(i+1,1) = temp1$
                    Varray(i+1,2) = temp2$
                    Varray(i+1,3) = temp3$
                    sorted = False
               End If
          Next
     Wend
     
' Write out the final file    
     Print "Writing out the final output file"
     Open "c:\larry\UserAct3.txt" For Output As #1
     For i = 1 To cnt
          Print #1, Varray(i,1), Varray(i,2), Varray(i,3)
     Next
     Close #1
     Print "Processing completed"
End Sub
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

860 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