Design and development of optimal drilling-fluid systems, as well as their proper maintenance while drilling, are essential components of any successful drilling campaign. As the oil and gas industry is drilling in more-challenging areas (e.g., unconventional shale oil/gas wells, deepwater offshore wells, and deep high-pressure/high-temperature sour gas wells), the demand for more-accurate real-time assessment of the downhole state of the drilling fluids during drilling operations increases.