| Welcome to the Zimbra :: Forums! | |
Welcome, if you would like to post a comment please register.
We also encourage you to explore all things Zimbra with our team and members of the community.
|  | 
09-13-2010, 09:31 AM
| | | 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 | 
09-14-2010, 09:00 AM
| | Advanced Member | |
Posts: 236
| | You could grep mailbox.log and look for the OlkConnector string (I think that's how it's spelled) | 
09-15-2010, 12:25 AM
| | | 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 ? | 
01-07-2011, 08:40 AM
| | | 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. | 
01-08-2011, 06:30 AM
| | | Quote:
Originally Posted by Goonsniper
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. Quote:
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. | 
01-09-2011, 08:13 AM
| | | 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
__________________
___________________________________ L. Mark Stone, CIO "Uptime. All the time."
477 Congress Street | Portland, ME 04101-3431 | (207) 772-5678
proactive maintenance and monitoring | technology consulting
Zimbra groupware | EMR implementations | private cloud hosting
| 
01-10-2011, 07:16 AM
| | | Hi Mark, yes it works funky. Thanks.
And thanks to goonsniper, yours just needed a minor tuning. | 
04-27-2011, 11:46 PM
| | | 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
} | 
04-30-2011, 12:38 PM
| | | 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... | 
05-09-2011, 07:24 AM
| | | Quote:
Originally Posted by btriem 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. | | Thread Tools | Search this Thread | | | | | Display Modes | Linear Mode | | Why Join? Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.  |