[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 321
  • Last Modified:

Start/Stop Services with VB.NET

I am working on a web site that will connect to networked machines and grab all services on the machine.   The user will then be able to start/stop services.  I know how to get all services for a Windows machine, but I have Linux and Solaris machines also, who do I get these?  I am stuck and need to get this portion completed.

I am using VB.NET
0
dhathsato
Asked:
dhathsato
  • 2
1 Solution
 
mankowitzCommented:
the unix command ps will show you all the currently running processes. You should look at your unix/solaris docs so you can filter the output as needed.

%ps -ugax

will probably give you everything you need.

As far as killing those processes, you use the kill command. You can send the HANGUP signal with SIGHUP or -9

%kill -9 23432

will kill process number 23432.
0
 
mankowitzCommented:
Actually, after rereading your question, I only told you how to stop processes that are currently running. If you want to start/stop processes, you have to look at all the potential packages running on your system. many will start automatically on boot (look in /etc/rc.d/ and inittab). There may be others that are not listed that have to be started manually, and they may have different command line interfaces.
0
 
dhathsatoAuthor Commented:
Would you happen to have code examples of completing the task(s) you mention?
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now