Results 1 to 10 of 10

Thread: how to know how many user are using now the connector ?

  1. #1
    Join Date
    Jun 2009
    Posts
    93
    Rep Power
    6

    Default how to know how many user are using now the connector ?

    hi!

    we have 100users and 50 licenses for outlook connector.
    how to know in real time (command line by example), the number of conncted users who are using the connector now ?

    thanks for help

  2. #2
    Join Date
    Sep 2009
    Location
    Spain
    Posts
    233
    Rep Power
    6

    Default

    You could grep mailbox.log and look for the OlkConnector string (I think that's how it's spelled)

  3. #3
    Join Date
    Jun 2009
    Posts
    93
    Rep Power
    6

    Default how to know how many user are using now the connector ?

    thanks for your reply.

    i am not an expert, do you have the right command line ?

  4. #4
    Join Date
    Oct 2008
    Location
    Vancouver
    Posts
    38
    Rep Power
    7

    Default

    Hi

    I created this to grep the mailbox.log file located in /opt/zimbra/log/ to find which version of the ZCO users are running. This will, of course, only find users which have contacted the server in the current log file.

    grep ZCO mailbox.log |awk -F[ '{print $3}' | awk -F= '{print $2 $5}' |awk -F\;mid '{print $1" " $2}' | awk -F\( '{print $1}' |uniq |more

    It produces output like...

    user1@domain.com Zimbra-ZCO/6.0.5846.5
    user2@domain.com Zimbra-ZCO/5.0.3064.18
    user3@domain.com Zimbra-ZCO/6.0.5981.7
    user4@domain.com Zimbra-ZCO/6.0.5981.7

    Hope this helps.

  5. #5
    Join Date
    Oct 2010
    Posts
    373
    Rep Power
    5

    Post

    Quote Originally Posted by Goonsniper View Post

    grep ZCO mailbox.log |awk -F[ '{print $3}' | awk -F= '{print $2 $5}' |awk -F\;mid '{print $1" " $2}' | awk -F\( '{print $1}' |uniq |more

    It produces output like...

    user1@domain.com Zimbra-ZCO/6.0.5846.5
    user2@domain.com Zimbra-ZCO/5.0.3064.18
    user3@domain.com Zimbra-ZCO/6.0.5981.7
    user4@domain.com Zimbra-ZCO/6.0.5981.7

    Hope this helps.
    Good one goonsniper. Thanks. But I guess the uniq there doesn't effectively filter out duplicate lines of with the account name. Mailbox log has multiple lines that contains the account name while carrying out a particular connector event. I just tried and came across this.

    user1@domain.com Zimbra-ZCO/5.0.2992.16
    user1@domain.com ZimbraConnectorForOutlook/5.0.2992.16;] calendar - Fixed up ORGANIZER in a REPLY from ZCO
    user1@domain.com Zimbra-ZCO/5.0.2992.16
    Tried playing some switches with uniq and sort. Didn't work I think you'll know better.

  6. #6
    Join Date
    Sep 2006
    Location
    477 Congress Street | Portland, ME 04101
    Posts
    1,374
    Rep Power
    11

    Default

    Some activity not having to do with the ZCO Connector in the mailbox log will contain the characters "ZCO", being able to run this handy script from anywhere would be nice, being able to see who the very active users are, and eliminating the duplicates, which can be done by piping the output through "sort", would also be nice, so I offer the minor modifications below:

    Code:
    grep Zimbra-ZCO /opt/zimbra/log/mailbox.log |awk -F[ '{print $3}' | awk -F= '{print $2 $5}' |awk -F\;mid '{print $1" " $2}' | awk -F\( '{print $1}' |sort |uniq -c |more
    Works for us, but please test and post if it works for you!

    Hope that helps,
    Mark

  7. #7
    Join Date
    Oct 2010
    Posts
    373
    Rep Power
    5

    Default

    Hi Mark, yes it works funky. Thanks.
    And thanks to goonsniper, yours just needed a minor tuning.

  8. #8
    Join Date
    Feb 2009
    Location
    Silicon Valley, CA
    Posts
    32
    Rep Power
    6

    Default Spent too much time but wanted to share

    Here's a shell script and an awk script that shows the number of users and the ZCO version. Let me know if you find any improvements.

    Code:
    #! /bin/bash
    
    zgrep ZimbraConnectorForOutlook /opt/zimbra/log/mailbox.* | grep "soap - SyncRequest" | awk -f ZCO.awk > /tmp/ZCO_Users
    chmod 666 /tmp/ZCO_Users
    less /tmp/ZCO_Users
    Then, here's the awk script (as referred to above as ZCO.awk):

    Code:
    BEGIN { i=0 }
    {
     if ( split ($0, s1, "[") != 3 ) next                   # If the input is malformed, skip this line
        n = split (s1[3], s2, ";")                          # Sometimes the mid= is missing so account for that
        split (s2[1], uname, "=")                           # Get the email addr
        split (s2[n-1], ua, "=")                            # Get the ua= string
        split (ua[2], uav, "/")                             # Separate out only the version
        result[i++] = sprintf ("%s\t%s", uname[2], uav[2])  # Save the result to put in an array
    }
    
    END {
      if (i == 0) exit 1
    
      n = asort(result)     # sort the results
    
      cnt = 0               # count how many unique users
      for (i = 1; i < n; i++) {
            if (result[i] == result[i+1]) continue          # skip duplicates
            print (result[i])
            cnt++
      }
      print (result[n])     # print the last one (cnt does not include this one)
      printf ("-----------------------------------------------\n")
      printf ("Total ZCO users: %d\n", cnt+1)               # Print the total
      exit 0
    }

  9. #9
    Join Date
    Jan 2007
    Location
    Austin, Tx
    Posts
    45
    Rep Power
    8

    Default

    Thanks for taking the time to present to us this script. It's just extremely sad that it's not built-in somehow already since it is how they define 'professional' users...

  10. #10
    Join Date
    Oct 2010
    Posts
    373
    Rep Power
    5

    Default

    Quote Originally Posted by btriem View Post
    Thanks for taking the time to present to us this script. It's just extremely sad that it's not built-in somehow already since it is how they define 'professional' users...
    Hi btriem, I think you should go ahead filing an RFE at bugzilla under requests, and get votes for the feature.

Similar Threads

  1. [SOLVED] install zcs 6 beta1 / centos 5.3 - LDAP FAIL
    By powrrrplay in forum Installation
    Replies: 7
    Last Post: 04-24-2009, 09:15 AM
  2. Outlook connector with multiple PCs for the same user?
    By mckoz in forum Zimbra Connector for Outlook
    Replies: 4
    Last Post: 01-16-2009, 09:28 AM
  3. Replies: 1
    Last Post: 05-28-2008, 04:18 AM
  4. zimbra suddently refused to get mail
    By nosiath in forum Installation
    Replies: 2
    Last Post: 02-21-2007, 07:06 AM
  5. The mailbox and mta dies in FC4 GA version
    By meikka in forum Installation
    Replies: 72
    Last Post: 03-16-2006, 04:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •