Sysops who manage Kopano Groupware servers, they one of the essential task is to track resource usage to know space and quotas. This post shows how Kopano users Current store size is displayed in the console.
How to show the current store size of a user
Let’s say we want to know how the storage usage of a Kopano user in an organization looks like, usually we will run this command:
$ kopano-admin --details email@example.com
This will show us all the details about the user.
Object id: 5 Extern id: \313\332\306\30\336\325G)\263\356\275;s\324\237z Username: firstname.lastname@example.org Fullname: Kate Middleton Emailaddress: email@example.com Active: yes Administrator: yes Address book: Visible to current user Auto-accept meeting req:no MDB provider: KOPANO_STORE_DELEGATE_GUID Store GUID: 0E79B76316F0491F9A8C4BFE1C1F1592 Out Of Office: disabled Server version: 8.7.25 Mapped properties: PR_EC_ENABLED_FEATURES mobile; outlook; webapp PR_EC_DISABLED_FEATURES imap; pop3 Current user store quota settings: Quota overrides: no Warning level: 1024.00 MB Soft level: 2048.00 MB Hard level: 3072.00 MB Current store size: 231.10 MB Groups (1): Everyone
How to show the current store size of all users
If there are more than a couple of users, another adequate solution must be found, so it makes sense to create a simple bash script in which we run kopano-admin in a for loop:
#!/bin/bash for user in $(kopano-admin -l | sed -n 5,1000p | cut -f 2 | sort) do kopano-admin --details $user | grep -E 'Emailaddress|Current store size|Last logon' done
When use Kopano in a multi-tenancy environment, then the company sections must be processed, e.g. with the query and variable assignment:
#!/bin/bash comp=`(kopano-admin --list-companies | sed -n 4,1000p | cut -f 2)` echo "$comp"
The result shows us all the companies listed in a usable format, right as an option in the next commands.
Finally, the next for loops show the current store size of all Kopano users in each multi-tenancy company:
#!/bin/bash for comp in $(kopano-admin --list-companies | sed -n 4,1000p | cut -f 2) do echo "Company $comp" for user in $(kopano-admin -l -I "$comp" | sed -n 5,1000p | cut -f 2) do kopano-admin -l --details "$user" | grep -E 'Emailaddress|Current store size' done done
As a pattern, grep with -E option can add further patterns, desired patterns can be inserted separately with pipe, e.g. Current user store quota settings like Warning level and Soft level or Hard level.
Company middleton.org Emailaddress: firstname.lastname@example.org Current store size: 231.10 MB Company dukedom.org Emailaddress: email@example.com Current store size: 694.71 MB Emailaddress: firstname.lastname@example.org Current store size: 1195.14 MB
The output of a multi-tenancy server looks something like this.
To get just an overview, the
--user-count option gives the output.
$ kopano-admin --user-count -v -v -v -v -v -v [debug ] Initializing provider "Kopano Directory Service" [debug ] Initializing provider "Private Folders" [debug ] Initializing provider "Public Folders" User counts: Allowed Used Available -------------------------------------------------------- Active no limit 1034 - Non-active no limit 17 - Users 0 Rooms 12 Equipment 2 Total 1065
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?