---
title: "How to find out if a service present in different machine has been stopped or started."  
description: "How to find out if a service present in different machine has been stopped or started."  
author: "Anonymous User"  
published: 2011-11-09  
updated: 2020-09-22  
canonical: https://www.mindstick.com/interview/1350/how-to-find-out-if-a-service-present-in-different-machine-has-been-stopped-or-started  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# How to find out if a service present in different machine has been stopped or started.

Use ServiceController Class present in System.ServiceProcess namespace to determine the status of the service. \
Have a timer in the application which is monitoring the service. The timer should poll service to determine its status. \
ServiceController c = new ServiceController("<servicename>", "<machine name>");\

## Answers

### Answer by Anonymous User

Use ServiceController Class present in System.ServiceProcess namespace to determine the status of the service. \
Have a timer in the application which is monitoring the service. The timer should poll service to determine its status. \
ServiceController c = new ServiceController("<servicename>", "<machine name>");\


---

Original Source: https://www.mindstick.com/interview/1350/how-to-find-out-if-a-service-present-in-different-machine-has-been-stopped-or-started

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
