[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Generating User Activity Report

Posted on 1999-01-21
3
Medium Priority
?
453 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Accepted Solution

by:
willislt earned 400 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

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…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

656 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