Page 1 of 1

How to get Quota from the command line

Posted: Fri Nov 10, 2006 12:48 am
by netpenthe
Hi

I'm trying to tie in some of Scalix's admin functions with our in-house programs.

I'm trying to retrieve the quota of a user from the command line, i used:

$> omscan -U "John Doe"

and receive:

Code: Select all

omscan running on 11.10.06 at 15:14:50.
Host computer : hostname.com
Report mode requested.

Last omscan tool run on 11.10.06 at 15:10:54; duration 0 minute(s).
Previous server cycle run on 11.06.06 at 13:04:16; duration 167 minute(s).
Current server cycle not started; service reset or delayed.


Passive scan option requested.

Scanning file/dir links .... done.

CAUTION: Scanning of message store has started.
         Mounted file/dir links must be maintained during the scan.
         VxFS file system must not be reorganized - see omscan(1M).

Checking/Scanning user trays .... done.

Disk usage ....

USER NAME                          IN    OUT    PDG   FCAB   DLST     WB   TOTAL (KB)

John DOE /scalix,mailnode/  707      1  16383 232175      1  22473 271740


The problem I have is that if i look in SAC John Doe has:

Code: Select all

Used Mailbox Size: 321.668 MB
Used Wastebasket Size: 22.511 MB
Percentage of Quota Used 34.42%


So SAC is reporting different numbers to omscan.

Can anyone tell me how to reconcile these numbers?

(i'm using omlimit to get the total quota for a user)

Posted: Fri Nov 10, 2006 12:00 pm
by kanderson
Not sure what exactly you're using the numbers for, but would sxdu meet your needs? These will return real time results.

I suspect what you're seeing is that omscan is not current. Omscan will use the results from it's last scan when queried like that. Often the data you pull is a week old.

To rescan everything on the fly, you can do the following

omoff -d 0 scan
omscan -Z (capital z)
omon scan

Then wait for a very long time while your server has quite high utilization. This forces a rerun of omscan.

Hope that helps.
Kev.

sxdu

Posted: Mon Nov 13, 2006 6:31 am
by netpenthe
hi thanks for that, i wasn't aware of the sxdu command, that looks like it will work fine.

Cheers

Jon