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
Who is Participating?
mankowitzConnect With a Mentor Commented:
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.
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.
dhathsatoAuthor Commented:
Would you happen to have code examples of completing the task(s) you mention?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.