Let $x(t)$ be a Feller process on a complete separable metric space $A$ and consider the occupation measure $L_t(\omega, \cdot) = \int^t_0 \chi_{(\cdot)}(x(s)) ds$. The $I$-function is defined for $\mu \in \mathscr{P}(A)$, the set of probability measures on $A$, by $I(\mu) = -\inf_{u\in\mathscr{D}^+} \int_A (Lu/u)d\mu$ where $(L, \mathscr{D})$ is the generator of the process and $\mathscr{D}^+ \subset \mathscr{D}$ consists of the strictly positive functions in $\mathscr{D}$. The $I$-function determines the asymptotic rate of decay of $P((1/t)L_t(\omega, \cdot) \in G)$ for $G \subset \mathscr{P}(A)$. The first difficulty encountered in evaluating $I(\mu)$ is that the domain $\mathscr{D}$ is generally not known explicitly. In this paper, we prove a theorem which allows us to restrict the calculation of the infimum to a nice subdomain. We then apply this general result to diffusion processes with boundaries.