A complex interaction between the immune response and host behavior has been described in a wide range of species. Excess sleep, in particular, is known to occur as a response to infection in mammals 1 and has also recently been described in Drosophila melanogaster2. It is generally accepted that sleep is beneficial to the host during an infection and that it is important for the maintenance of a robust immune system3,4. However, experimental evidence that supports this hypothesis is limited4, and the function of excess sleep during an immune response remains unclear. We have used a multidisciplinary approach to address this complex problem, and have conducted studies in the simple genetic model system, the fruitfly Drosophila melanogaster. We use a standard assay for measuring locomotor behavior and sleep in flies, and demonstrate how this assay is used to measure behavior in flies infected with a pathogenic strain of bacteria. This assay is also useful for monitoring the duration of survival in individual flies during an infection. Additional measures of immune function include the ability of flies to clear an infection and the activation of NFκB, a key transcription factor that is central to the innate immune response in Drosophila. Both survival outcome and bacterial clearance during infection together are indicators of resistance and tolerance to infection. Resistance refers to the ability of flies to clear an infection, while tolerance is defined as the ability of the host to limit damage from an infection and thereby survive despite high levels of pathogen within the system5. Real-time monitoring of NFκB activity during infection provides insight into a molecular mechanism of survival during infection. The use of Drosophila in these straightforward assays facilitates the genetic and molecular analyses of sleep and the immune response and how these two complex systems are reciprocally influenced.