Page 1 of 1

size of images on disk

PostPosted: Wed Jun 27, 2012 2:20 pm
by mahogny
Hello!
Is there a simple way to figure out how much an image in the server occupy on disk, in the pixelstore? I don't find this information in insight and it would be very useful as an admin

thanks,
/Johan

Re: size of images on disk

PostPosted: Thu Jun 28, 2012 6:15 am
by jmoore
Hi Johan,

though it doesn't show you information about possibly archived original files (under /OMERO/Files), this query will at least show you how many mega-pixels you have stored under /OMERO/Pixels:

Code: Select all
$ bin/omero hql --admin 'select p.pixelsType.value, sum(sizex * sizey * sizez * sizet * sizec)/1000000 from Pixels p group by p.pixelsType.value'
Using session ace76294-3654-46d2-8219-0e679b1f63e1 (root@localhost:4064). Idle timeout: 10.0 min. Current group: 53d20859-3871-4faa-b5f5-dc2515a123d1
# | Col1   | Col2
---+--------+------
0 | uint8  | 73.0
1 | int16  | 36.0
2 | uint16 | 0.0 
3 | int8   | 48.0


If, on the other hand, you've got an omero.api.RawPixelStorePrx in hand, you can just call getTotalSize().

Cheers,
~Josh