We analyze the structure of stochastic dynamics near either a stable or unstable fixed point, where the force can be approximated by linearization. We find that a cost function that determines a Boltzmann-like stationary distribution can always be defined near it. Such a stationary distribution does not need to satisfy the usual detailed balance condition but might have instead a divergence-free probability current. In the linear case, the force can be split into two parts, one of which gives detailed balance with the diffusive motion, whereas the other induces cyclic motion on surfaces of constant cost function. By using the Jordan transformation for the force matrix, we find an explicit construction of the cost function. We discuss singularities of the transformation and their consequences for the stationary distribution. This Boltzmann-like distribution may be not unique, and nonlinear effects and boundary conditions may change the distribution and induce additional currents even in the neighborhood of a fixed point.