In this paper, we identify the local rate function governing the sample path large deviation principle for a rescaled process n-1Qnt, where Qt represents the joint number of clients at time t in a polling system with N nodes, one server and Markovian routing. By the way, the large deviation principle is proved and the rate function is shown to have the form conjectured by Dupuis and Ellis. We introduce a so-called empirical generator consisting of Qt and of two empirical measures associated with St, the position of the server at time t. One of the main steps is to derive large deviation bounds for a localized version of the empirical generator. The analysis relies on a suitable change of measure and on a representation of fluid limits for polling systems. Finally, the rate function is solution of a meaningful convex program. The method seems to have a wide range of application including the famous Jackson networks, as shown at the end of this study. An example illustrates how this technique can be used to estimate stationary probability decay rate.