How to check services are running or not in Solaris











up vote
1
down vote

favorite












Particularly, I want to check Samba services and see if it is running or not in Solaris machine.



For Linux, we can check with below command.



service smb status
smbd (pid 8058) is running...









share|improve this question




























    up vote
    1
    down vote

    favorite












    Particularly, I want to check Samba services and see if it is running or not in Solaris machine.



    For Linux, we can check with below command.



    service smb status
    smbd (pid 8058) is running...









    share|improve this question


























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      Particularly, I want to check Samba services and see if it is running or not in Solaris machine.



      For Linux, we can check with below command.



      service smb status
      smbd (pid 8058) is running...









      share|improve this question















      Particularly, I want to check Samba services and see if it is running or not in Solaris machine.



      For Linux, we can check with below command.



      service smb status
      smbd (pid 8058) is running...






      samba services solaris






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 20 '15 at 3:37









      JakeGould

      30.7k1093135




      30.7k1093135










      asked Aug 20 '15 at 3:20









      Gyana Ranjan

      612




      612






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote













          Unlike on Linux, there's a unified service system on Solaris. It is called SMF. To check if a service is running use the svcs command. svcs -a will give you status of all services configured on the system, including disabled services.



          Here's an example where I already know the service name, in this case /network/http:apache22, which is my Apache Web server. Using the -l and -p switches I can get a lot of information about the service, including what dependencies it has (pre-conditions) and what processes IDs it is currently executing under.



          $ svcs -lp /network/http:apache22
          fmri svc:/network/http:apache22
          name Apache 2.2 HTTP server
          enabled true
          state online
          next_state none
          state_time Tue Dec 27 09:53:38 2016
          logfile /var/svc/log/network-http:apache22.log
          restarter svc:/system/svc/restarter:default
          contract_id 76060
          manifest /lib/svc/manifest/network/http-apache22.xml
          manifest /lib/svc/manifest/network/http-squid.xml
          dependency require_all/error svc:/milestone/network:default (online)
          dependency require_all/none svc:/system/filesystem/local:default (online)
          dependency optional_all/error svc:/system/filesystem/autofs:default (online)
          process 2474 /usr/apache2/2.2/bin/httpd -k start
          process 13181 /usr/apache2/2.2/bin/httpd -k start
          process 13183 /usr/apache2/2.2/bin/httpd -k start
          process 13184 /usr/apache2/2.2/bin/httpd -k start
          process 13185 /usr/apache2/2.2/bin/httpd -k start
          process 13186 /usr/apache2/2.2/bin/httpd -k start
          process 13187 /usr/apache2/2.2/bin/httpd -k start





          share|improve this answer




























            up vote
            0
            down vote













            You can use ps -ef to find the services running or not on a Solaris machine:



            $ps -ef |grep smbd
            root 3214 3886 0 20:49:40 ? 0:03 /usr/local/samba64/sbin/smbd -D
            root 15273 3886 0 Nov 07 ? 0:04 /usr/local/samba64/sbin/smbd -D
            root 23061 3886 0 11:12:30 ? 0:01 /usr/local/samba64/sbin/smbd -D





            share|improve this answer























              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "3"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














               

              draft saved


              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f959956%2fhow-to-check-services-are-running-or-not-in-solaris%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              1
              down vote













              Unlike on Linux, there's a unified service system on Solaris. It is called SMF. To check if a service is running use the svcs command. svcs -a will give you status of all services configured on the system, including disabled services.



              Here's an example where I already know the service name, in this case /network/http:apache22, which is my Apache Web server. Using the -l and -p switches I can get a lot of information about the service, including what dependencies it has (pre-conditions) and what processes IDs it is currently executing under.



              $ svcs -lp /network/http:apache22
              fmri svc:/network/http:apache22
              name Apache 2.2 HTTP server
              enabled true
              state online
              next_state none
              state_time Tue Dec 27 09:53:38 2016
              logfile /var/svc/log/network-http:apache22.log
              restarter svc:/system/svc/restarter:default
              contract_id 76060
              manifest /lib/svc/manifest/network/http-apache22.xml
              manifest /lib/svc/manifest/network/http-squid.xml
              dependency require_all/error svc:/milestone/network:default (online)
              dependency require_all/none svc:/system/filesystem/local:default (online)
              dependency optional_all/error svc:/system/filesystem/autofs:default (online)
              process 2474 /usr/apache2/2.2/bin/httpd -k start
              process 13181 /usr/apache2/2.2/bin/httpd -k start
              process 13183 /usr/apache2/2.2/bin/httpd -k start
              process 13184 /usr/apache2/2.2/bin/httpd -k start
              process 13185 /usr/apache2/2.2/bin/httpd -k start
              process 13186 /usr/apache2/2.2/bin/httpd -k start
              process 13187 /usr/apache2/2.2/bin/httpd -k start





              share|improve this answer

























                up vote
                1
                down vote













                Unlike on Linux, there's a unified service system on Solaris. It is called SMF. To check if a service is running use the svcs command. svcs -a will give you status of all services configured on the system, including disabled services.



                Here's an example where I already know the service name, in this case /network/http:apache22, which is my Apache Web server. Using the -l and -p switches I can get a lot of information about the service, including what dependencies it has (pre-conditions) and what processes IDs it is currently executing under.



                $ svcs -lp /network/http:apache22
                fmri svc:/network/http:apache22
                name Apache 2.2 HTTP server
                enabled true
                state online
                next_state none
                state_time Tue Dec 27 09:53:38 2016
                logfile /var/svc/log/network-http:apache22.log
                restarter svc:/system/svc/restarter:default
                contract_id 76060
                manifest /lib/svc/manifest/network/http-apache22.xml
                manifest /lib/svc/manifest/network/http-squid.xml
                dependency require_all/error svc:/milestone/network:default (online)
                dependency require_all/none svc:/system/filesystem/local:default (online)
                dependency optional_all/error svc:/system/filesystem/autofs:default (online)
                process 2474 /usr/apache2/2.2/bin/httpd -k start
                process 13181 /usr/apache2/2.2/bin/httpd -k start
                process 13183 /usr/apache2/2.2/bin/httpd -k start
                process 13184 /usr/apache2/2.2/bin/httpd -k start
                process 13185 /usr/apache2/2.2/bin/httpd -k start
                process 13186 /usr/apache2/2.2/bin/httpd -k start
                process 13187 /usr/apache2/2.2/bin/httpd -k start





                share|improve this answer























                  up vote
                  1
                  down vote










                  up vote
                  1
                  down vote









                  Unlike on Linux, there's a unified service system on Solaris. It is called SMF. To check if a service is running use the svcs command. svcs -a will give you status of all services configured on the system, including disabled services.



                  Here's an example where I already know the service name, in this case /network/http:apache22, which is my Apache Web server. Using the -l and -p switches I can get a lot of information about the service, including what dependencies it has (pre-conditions) and what processes IDs it is currently executing under.



                  $ svcs -lp /network/http:apache22
                  fmri svc:/network/http:apache22
                  name Apache 2.2 HTTP server
                  enabled true
                  state online
                  next_state none
                  state_time Tue Dec 27 09:53:38 2016
                  logfile /var/svc/log/network-http:apache22.log
                  restarter svc:/system/svc/restarter:default
                  contract_id 76060
                  manifest /lib/svc/manifest/network/http-apache22.xml
                  manifest /lib/svc/manifest/network/http-squid.xml
                  dependency require_all/error svc:/milestone/network:default (online)
                  dependency require_all/none svc:/system/filesystem/local:default (online)
                  dependency optional_all/error svc:/system/filesystem/autofs:default (online)
                  process 2474 /usr/apache2/2.2/bin/httpd -k start
                  process 13181 /usr/apache2/2.2/bin/httpd -k start
                  process 13183 /usr/apache2/2.2/bin/httpd -k start
                  process 13184 /usr/apache2/2.2/bin/httpd -k start
                  process 13185 /usr/apache2/2.2/bin/httpd -k start
                  process 13186 /usr/apache2/2.2/bin/httpd -k start
                  process 13187 /usr/apache2/2.2/bin/httpd -k start





                  share|improve this answer












                  Unlike on Linux, there's a unified service system on Solaris. It is called SMF. To check if a service is running use the svcs command. svcs -a will give you status of all services configured on the system, including disabled services.



                  Here's an example where I already know the service name, in this case /network/http:apache22, which is my Apache Web server. Using the -l and -p switches I can get a lot of information about the service, including what dependencies it has (pre-conditions) and what processes IDs it is currently executing under.



                  $ svcs -lp /network/http:apache22
                  fmri svc:/network/http:apache22
                  name Apache 2.2 HTTP server
                  enabled true
                  state online
                  next_state none
                  state_time Tue Dec 27 09:53:38 2016
                  logfile /var/svc/log/network-http:apache22.log
                  restarter svc:/system/svc/restarter:default
                  contract_id 76060
                  manifest /lib/svc/manifest/network/http-apache22.xml
                  manifest /lib/svc/manifest/network/http-squid.xml
                  dependency require_all/error svc:/milestone/network:default (online)
                  dependency require_all/none svc:/system/filesystem/local:default (online)
                  dependency optional_all/error svc:/system/filesystem/autofs:default (online)
                  process 2474 /usr/apache2/2.2/bin/httpd -k start
                  process 13181 /usr/apache2/2.2/bin/httpd -k start
                  process 13183 /usr/apache2/2.2/bin/httpd -k start
                  process 13184 /usr/apache2/2.2/bin/httpd -k start
                  process 13185 /usr/apache2/2.2/bin/httpd -k start
                  process 13186 /usr/apache2/2.2/bin/httpd -k start
                  process 13187 /usr/apache2/2.2/bin/httpd -k start






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Dec 28 '16 at 16:02









                  Peter Hansson

                  335




                  335
























                      up vote
                      0
                      down vote













                      You can use ps -ef to find the services running or not on a Solaris machine:



                      $ps -ef |grep smbd
                      root 3214 3886 0 20:49:40 ? 0:03 /usr/local/samba64/sbin/smbd -D
                      root 15273 3886 0 Nov 07 ? 0:04 /usr/local/samba64/sbin/smbd -D
                      root 23061 3886 0 11:12:30 ? 0:01 /usr/local/samba64/sbin/smbd -D





                      share|improve this answer



























                        up vote
                        0
                        down vote













                        You can use ps -ef to find the services running or not on a Solaris machine:



                        $ps -ef |grep smbd
                        root 3214 3886 0 20:49:40 ? 0:03 /usr/local/samba64/sbin/smbd -D
                        root 15273 3886 0 Nov 07 ? 0:04 /usr/local/samba64/sbin/smbd -D
                        root 23061 3886 0 11:12:30 ? 0:01 /usr/local/samba64/sbin/smbd -D





                        share|improve this answer

























                          up vote
                          0
                          down vote










                          up vote
                          0
                          down vote









                          You can use ps -ef to find the services running or not on a Solaris machine:



                          $ps -ef |grep smbd
                          root 3214 3886 0 20:49:40 ? 0:03 /usr/local/samba64/sbin/smbd -D
                          root 15273 3886 0 Nov 07 ? 0:04 /usr/local/samba64/sbin/smbd -D
                          root 23061 3886 0 11:12:30 ? 0:01 /usr/local/samba64/sbin/smbd -D





                          share|improve this answer














                          You can use ps -ef to find the services running or not on a Solaris machine:



                          $ps -ef |grep smbd
                          root 3214 3886 0 20:49:40 ? 0:03 /usr/local/samba64/sbin/smbd -D
                          root 15273 3886 0 Nov 07 ? 0:04 /usr/local/samba64/sbin/smbd -D
                          root 23061 3886 0 11:12:30 ? 0:01 /usr/local/samba64/sbin/smbd -D






                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Nov 8 '16 at 6:09









                          3498DB

                          15.6k114762




                          15.6k114762










                          answered Nov 8 '16 at 5:16









                          Gyana Ranjan

                          612




                          612






























                               

                              draft saved


                              draft discarded



















































                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f959956%2fhow-to-check-services-are-running-or-not-in-solaris%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                              Mangá

                               ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕