How to Stop a Service or Program

This procedure shows how to stop a program managed by SMF, as well as a program that is not.

  1. Stop the service.
    $ svcadm disable network/ssh
    
  2. If the program is not managed by SMF, stop the process.
    The following example shows how to stop a terminal running on your laptop.
    1. Identify the process ID for the program.
      For this example, look for the process ID for the bash program running on pts/2.
      $ ps -ef |grep bash
         PID TTY         TIME CMD
        689 pts/2       0:00 bash
      
    2. Terminate the process. Use the process ID found in the previous step.
      $ kill 689
      
    3. If the preceding command does not kill the process, use the following command:
      $ kill -KILL 689
      

      See the kill(1) man page for more information.


For more information:

Labels

osoladmin osoladmin Delete
task task Delete
stopping stopping Delete
services services Delete
singleadmin singleadmin Delete
smallsiteadmin smallsiteadmin Delete
sundoc sundoc Delete
appdeveloper appdeveloper Delete
newuser newuser Delete
largesiteadmin largesiteadmin Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Dec 23, 2008

    Alysson_Troffer says:

    The terms "service" and "program" seem to be used interchangeably. Are they the ...

    The terms "service" and "program" seem to be used interchangeably. Are they the same thing? I find switching between them to be a bit confusing.

    Also, does Step 1 apply to just services, not programs? Or just to services managed by SMF? This isn't clear.

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact