Set $(X,\mathcal{B})$ a measurable space. If $f:X\rightarrow[0,\infty)$ is a measurable function then exists a sequence of simple functions $\{s_n\}_{n\geq1}$ such that
$$0\leq s_1 \leq s_2\leq \ldots \leq s_n\leq\ldots\leq f$$ e
$$f(x)=\lim_{n\to\infty}s_n(x).$$
What happens if X is locally compact?
In this case, I can take for every $n\in\mathbb{N}$
$s_n(x)=\sum_{k=1}^mc_k{1}_{A_k}(x)$
where $A_k$ is compact?