Solved

Generating User Activity Report

Posted on 1999-01-21
3
423 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

809 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