Link to home
Start Free TrialLog in
Avatar of dhathsato
dhathsatoFlag for United States of America

asked on

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
Avatar of mankowitz
mankowitz
Flag of United States of America image

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.
ASKER CERTIFIED SOLUTION
Avatar of mankowitz
mankowitz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dhathsato

ASKER

Would you happen to have code examples of completing the task(s) you mention?