Start/Stop Services with VB.NET

Posted on 2007-07-31
Last Modified: 2013-11-26
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
Question by:dhathsato
    LVL 24

    Expert Comment

    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.
    LVL 24

    Accepted Solution

    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.

    Author Comment

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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    A short article about a problem I had getting the GPS LocationListener working.
    Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
    An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now