Efficient energy management calls for optimization from a granular level Flash steam recovery, recovering heat from the blowdown water of various boilers, waste-heat steam generators, minimization LP steam condensation, and proper steam tracer system are some of the endless options for process engineers to optimize steam balance in a refinery. An online open-loop real-time Utility optimization model is developed to minimize fuel consumption by deciding the motor/steam Turbine Switch. The model is first calibrated to actual run, then optimizes the operation, and then generate excel reports. The model is finally validated in several scenarios and integrated with process historians by developing a relevant interface for enabling automated seamless data flow. Sensitivity analysis is conducted to further understand underlying relationships.