Working with Windows Services
by Rajeesh Kumar • February 23, 2012 • Windows • 0 Comments
From Wikipedia -> On Microsoft Windows operating systems, a Windows service is a long-running executable that performs specific functions and which is designed not to require user intervention. Windows services can be configured to start when the operating system is booted and run in the background as long as Windows is running, or they can be started manually when required. They are similar in concept to a Unix daemon. Many appear in the processes list in the Windows Task Manager, most often with a username of SYSTEM, LOCAL SERVICE or NETWORK SERVICE, though not all processes with the SYSTEM username are services. The remaining services run through svchost.exe as DLLs loaded into memory.
Let us talk about Windows Services in this session. All the windows operating systems are running with a bundle of essential services, which helps to run the required tasks. When you face some trouble with some component or tasks of operating system, you always looks if the services are running fine or not. It is easy to check a local service in single system. But when it comes to a huge infrastructure management you have to find an alternative ways to check the service status. The usual way of checking the windows services status is from the services window from the control panel.
Start -> Settings -> Control Panel -> Administrative Tools -> Services
You can start, stop, restart all windows services from the above window based on the requirement. It is very important to perform when you make some changes to OS settings to get it effected. Most of the time, you would have seen a restart of the complete system solving the issue, the main reason of your issue might be a crashed windows service, which comes back when you reboot the system. When ever you install any application , it will add its own particular service to the OS. Most of the application based services are set to be run automatically. This mean that service will start automatically when the System boots.
We can check services running in a remote server using the same window. Remote server should be accessible from the local server. You need to right click on Services(Local) and select connect to another computer, which will give you a window to enter the remote server name or IP. In the bellow screen I have entered our Server name(Panayola121).
Press OK to connect the remote computer. It will give you the complete Service status of the remote computer. You should have local administration rights in the remote server to mange the windows services of it. See the bellow services of the remote server connected.
Backup of a Windows OS Service Status.
It is always good to have a backup of the service status running in your server. This will help you in trouble shooting many kind of problems you face in day today administration life. In order to backup the service status of a server you simply need to export the windows service status to a file using the built in option Export List. You can export the complete service status or only the selected Services.
Right click on Services and click on Export List.
It will also allow you to export only the selected Service Status to the backup file, for that just select the service you required to backup and do Export List and before saving the file tick on . Now It will ask you to save the file and you need choose the file format to be saved. It is always good to have the output in excel sheet , so I would choose the csv format.
Once you export the service status, you can move csv file to a safe (archive) location for the future requirement. You can always refer the service status to compare the current service status.
Manage the Windows Services
When you make some changes in the Windows environment it is always good to reboot the system if you really don’t know what are the dependent services running. But if you know exactly what are the Windows Services related to the changes you have made, you can restart (stop and start again) services from the Services window instead of rebooting the OS which will reduce the down time for your critical application running in the server.
To Start, Stop, Restart a service you can right click on the particular service and choose the appropriate option.
Else choose Properties or double click on the service and it will show you the service properties with few advanced options.For example, when I double click on Automatic Update Service, I get the following options, based on which tabs I choose in the Automatic Update Properties window.
General Tab Log On tab
Recovery Tab Dependencies tab
We will continue this topic in another session with more details.
Hope you find this article useful. Leave a comment to discuss more
Related posts:
