Solved

Generating User Activity Report

Posted on 1999-01-21
3
388 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

763 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now