Lazyweb: Can anyone help me find these Domino stats?

Our administration team received a request to find out the following stats:

  • Average number of in-box messages
  • Average number of items in Notes mail folders

According to the person making the request, “These do not need to be exact numbers, just as close as possible without taking too much effort to get the answers.”

I can’t wrap my mind around how to even begin… can anyone help me?

  • With my developer head on you can run some script to loop over mail files listed in person documents, looking at $Inbox specifically (actually called “($Inbox)” if I remember rightly), and then loop through all views/folders that do not begin with “(” (as these should be user generated). You can use the IsFolder property of NotesView to check it’s a folder, and then get the number of docs by using AllEntries.count.
    This could take a long time if you have a huge number of mail files (and your connectivity isn’t good) – it may be better to run it over selected person documents instead.
    Depending on how many mail files I were processing, I would either mail myself the results, or create a little text/csv file, or even create a small logging database to capture the info.
    I think I may have gone over the “not too much effort” comment….
    If you need any more info let me know – it would be interesting to see if anyone has any quicker ideas.

  • You need to create an agent to crawl the mail files and pull statistics for each. It will be a little involved since you have to have to loop through each folder to get the doc count in each folder. I did something like this a while ago. I can dig it up if you want to look at it.

    Anyone have any other ideas?

  • I wrote a tool which counts documents in mail database and do a summary by type and month and probably can easily modify it to meet your needs if you won’t find anything else.

    { Link }

    and new version of the same tool
    { Link }

  • Foolish Mortals!

    I can’t provide a full inbox count without some script, but Domino can tell you how many emails someone received daily/weekly etc.
    From the Administrator client, click the Messaging – Mail tab.
    Expand the Reports for Servername view and open the Report Results or Scheduled Reports folder.

    My developer says you can make a simple script to get the documents total.
    The inbox is a little more elaborate script, a few lines extra. Emoticon

  • @Keith – We aren’t running reports on the Domino servers
    (Don’t know why…)

  • You do NOT need to crawl EACH folder / view.

    As you stated, you need to find out:
    * Average number of in-box messages
    * Average number of items in Notes mail folders

    You will have to create a crawler agent, but the job is really easy.

    Crawler agent will need to process all Person documents in your NAB. Use info from each Person doc to find the appropriate mail file.

    For each mail.nsf, you will need to open the inbox, count the documents, and add the count to the sum total:

    Set myview = ndb.GetView(“($Inbox)”)
    countInbox& = myview.EntryCount ‘ Your servers are at least R6, right?
    sumInbox& = sumInbox& + countInbox&

    Divide sumInbox by the total # of processed mail folders to get your first requirement.

    Second requirement is even easier. While you are processing each mail file, get the number of documents and the number of views / folders:

    Set docCollection = ndb.AllDocuments
    countAll& = docCollection.Count
    sumAll& = sumAll& + countAll&

    viewArray = ndb.Views
    countViews& = Ubound(viewArray) + 1 ‘ Lbound is always zero
    sumViews& = sumViews& + countViews&

    When you are finished processing all mail files, divide sumAll& by sumViews& to satisfy requirement 2.

    CAVEAT: You will run into problems if the total number of documents exceeds the upper bound of a Long data type (2,147,483,647). I have some fairly simple mathematical trickery you can use for that, call me if you need it. However, to be honest, if you have over 2.1 BILLION documents in your mail files, you have much more serious problems to worry about.

    I’m curious about WHY this information is being requested. Could somebody be attempting to sell “the powers that be” on an Exchange conversion? Emoticon


  • IBM recommended to my client that they need to reduce the # of messages in user Inboxes to improve server performance. So, I’m writing code to gather Inbox stats today.
    <br />
    <br />This recommendation is an offshoot from this best practices document:
    <br />
    <br />{ <a href=”{ Link } rel=”nofollow” target =”blank”>Link</a> }