The drug is used to treat E. coli, pneumonia, or meningitis and is also used to prevent infection in people having certain types of surgery.