Let TO be the object from which the msDS-QuotaUsed attribute is being read.
Let C be the Most Specific Class from TO!objectClass.
Let R be the root object of the NC containing TO.
Let SID be the SID specified by the LDAP extended control LDAP_SERVER_QUOTA_CONTROL_OID or, if none is specified, the requester's SID.
The value of TO!msDS-QuotaUsed is:
(cLive + ((cTombstoned * TO!msDS-TombstoneQuotaFactor)+99)/100)
cLive is the number of non-tombstoned objects associated with SID, and cTombstoned is the number of tombstoned objects associated with SID, as detailed in section 188.8.131.52.2.5, Quota Calculation.
(TO is the object:
GetWellknownObject(n: R, guid: GUID_NTDS_QUOTAS_CONTAINER_W))