The goal of this thesis is to study the KMS states of graph algebras with a generalised gauge dynamics.

We start by studying the KMS states of the Toeplitz algebra and graph algebra of a finite directed graph, each with a generalised gauge dynamics. We characterise the KMS states of the Toeplitz algebra and find an isomorphism between measures and KMS states at large inverse temperatures. When the graph is strongly connected we can describe all of the KMS states, and we get a unique KMS state at the critical inverse temperature. Viewing the graph algebra as a quotient of the Toeplitz algebra we describe the KMS states of the graph algebra.

Next we study the KMS states of graph algebras for row-finite infinite directed graphs with no sources and the gauge action. We characterise the KMS states of the Toeplitz algebra and discuss KMS states at large inverse temperatures. We then show that problems occur at the critical inverse temperature.

Lastly we study the KMS states of the Toeplitz algebras and graph algebras for higher-rank graphs with a generalised gauge dynamics, using the same method as we did for finite graphs. We finish by studying the preferred dynamics of the system, where we get our best results.