How to check what is running in a server?












4















  1. Is there any particular command to find out what servers (like: apache2, mysql-server, backup-server etc) are running inside a dedicated server?


  2. If I will reboot my dedicated server will they all start automatically?


  3. What is the safe way of reboot a dedicated server with all its applications server running inside it?



Note: I am in a dedicated Debian server.










share|improve this question
























  • "curl -I your-URL" will give you the output as, on which server the application s running.
    – user92748
    Nov 25 '14 at 12:24
















4















  1. Is there any particular command to find out what servers (like: apache2, mysql-server, backup-server etc) are running inside a dedicated server?


  2. If I will reboot my dedicated server will they all start automatically?


  3. What is the safe way of reboot a dedicated server with all its applications server running inside it?



Note: I am in a dedicated Debian server.










share|improve this question
























  • "curl -I your-URL" will give you the output as, on which server the application s running.
    – user92748
    Nov 25 '14 at 12:24














4












4








4


1






  1. Is there any particular command to find out what servers (like: apache2, mysql-server, backup-server etc) are running inside a dedicated server?


  2. If I will reboot my dedicated server will they all start automatically?


  3. What is the safe way of reboot a dedicated server with all its applications server running inside it?



Note: I am in a dedicated Debian server.










share|improve this question
















  1. Is there any particular command to find out what servers (like: apache2, mysql-server, backup-server etc) are running inside a dedicated server?


  2. If I will reboot my dedicated server will they all start automatically?


  3. What is the safe way of reboot a dedicated server with all its applications server running inside it?



Note: I am in a dedicated Debian server.







linux






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 14 '12 at 17:24









Renan

14.4k65377




14.4k65377










asked Aug 30 '12 at 10:58









Subhransu MishraSubhransu Mishra

3046921




3046921












  • "curl -I your-URL" will give you the output as, on which server the application s running.
    – user92748
    Nov 25 '14 at 12:24


















  • "curl -I your-URL" will give you the output as, on which server the application s running.
    – user92748
    Nov 25 '14 at 12:24
















"curl -I your-URL" will give you the output as, on which server the application s running.
– user92748
Nov 25 '14 at 12:24




"curl -I your-URL" will give you the output as, on which server the application s running.
– user92748
Nov 25 '14 at 12:24










4 Answers
4






active

oldest

votes


















5














I assume that application servers are using ports [Apache, Mysql do]
If so you can use netstat -lepunt to find out the services running in your server.



If you want to know the services are started at boot time check for init scripts in /etc/init.d/.



Most of the time services like Apache and MySQL servers are started at boot time if they are installed using a package manager. If not you can create an init script to start them at the boot time.






share|improve this answer





















  • Please let me know the command with extension to safely reboot the dedicated server.
    – Subhransu Mishra
    Aug 30 '12 at 11:29










  • to reboot gracefully: shutdown -r now
    – cas
    Aug 30 '12 at 11:32



















5














ps aux will also list all the processes running on the server. You can look for the related services there.






share|improve this answer





























    2














    htop gives a nice overview of the processes that are running and the resources that are in use.






    share|improve this answer





























      0














      Try these to see servers listening on TCP/UDP ports. I like it to have an overview of a server's purpose.



      netstat -lepunt | perl -nle 's!^.*d+/!! && print if ($_);' | sort -u


      or



      ss -tualp | perl -nle 's/^.*users:.."(.*?)".*/$1/ && print;' | sort -u


      Then you might want to also check the content of /etc/crontab to see what else the machine is doing (like backups for example).



      And if running Apache, something like this may be useful:



      grep -h -i ServerName /etc/apache2/{sites,conf}-enabled/* | grep -v '^s*#'





      share|improve this answer























        Your Answer








        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "106"
        };
        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',
        autoActivateHeartbeat: false,
        convertImagesToLinks: false,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: null,
        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%2funix.stackexchange.com%2fquestions%2f46709%2fhow-to-check-what-is-running-in-a-server%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        4 Answers
        4






        active

        oldest

        votes








        4 Answers
        4






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        5














        I assume that application servers are using ports [Apache, Mysql do]
        If so you can use netstat -lepunt to find out the services running in your server.



        If you want to know the services are started at boot time check for init scripts in /etc/init.d/.



        Most of the time services like Apache and MySQL servers are started at boot time if they are installed using a package manager. If not you can create an init script to start them at the boot time.






        share|improve this answer





















        • Please let me know the command with extension to safely reboot the dedicated server.
          – Subhransu Mishra
          Aug 30 '12 at 11:29










        • to reboot gracefully: shutdown -r now
          – cas
          Aug 30 '12 at 11:32
















        5














        I assume that application servers are using ports [Apache, Mysql do]
        If so you can use netstat -lepunt to find out the services running in your server.



        If you want to know the services are started at boot time check for init scripts in /etc/init.d/.



        Most of the time services like Apache and MySQL servers are started at boot time if they are installed using a package manager. If not you can create an init script to start them at the boot time.






        share|improve this answer





















        • Please let me know the command with extension to safely reboot the dedicated server.
          – Subhransu Mishra
          Aug 30 '12 at 11:29










        • to reboot gracefully: shutdown -r now
          – cas
          Aug 30 '12 at 11:32














        5












        5








        5






        I assume that application servers are using ports [Apache, Mysql do]
        If so you can use netstat -lepunt to find out the services running in your server.



        If you want to know the services are started at boot time check for init scripts in /etc/init.d/.



        Most of the time services like Apache and MySQL servers are started at boot time if they are installed using a package manager. If not you can create an init script to start them at the boot time.






        share|improve this answer












        I assume that application servers are using ports [Apache, Mysql do]
        If so you can use netstat -lepunt to find out the services running in your server.



        If you want to know the services are started at boot time check for init scripts in /etc/init.d/.



        Most of the time services like Apache and MySQL servers are started at boot time if they are installed using a package manager. If not you can create an init script to start them at the boot time.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Aug 30 '12 at 11:08









        Manula WaidyanathaManula Waidyanatha

        1,6831011




        1,6831011












        • Please let me know the command with extension to safely reboot the dedicated server.
          – Subhransu Mishra
          Aug 30 '12 at 11:29










        • to reboot gracefully: shutdown -r now
          – cas
          Aug 30 '12 at 11:32


















        • Please let me know the command with extension to safely reboot the dedicated server.
          – Subhransu Mishra
          Aug 30 '12 at 11:29










        • to reboot gracefully: shutdown -r now
          – cas
          Aug 30 '12 at 11:32
















        Please let me know the command with extension to safely reboot the dedicated server.
        – Subhransu Mishra
        Aug 30 '12 at 11:29




        Please let me know the command with extension to safely reboot the dedicated server.
        – Subhransu Mishra
        Aug 30 '12 at 11:29












        to reboot gracefully: shutdown -r now
        – cas
        Aug 30 '12 at 11:32




        to reboot gracefully: shutdown -r now
        – cas
        Aug 30 '12 at 11:32













        5














        ps aux will also list all the processes running on the server. You can look for the related services there.






        share|improve this answer


























          5














          ps aux will also list all the processes running on the server. You can look for the related services there.






          share|improve this answer
























            5












            5








            5






            ps aux will also list all the processes running on the server. You can look for the related services there.






            share|improve this answer












            ps aux will also list all the processes running on the server. You can look for the related services there.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Aug 30 '12 at 12:32









            perlboatperlboat

            31315




            31315























                2














                htop gives a nice overview of the processes that are running and the resources that are in use.






                share|improve this answer


























                  2














                  htop gives a nice overview of the processes that are running and the resources that are in use.






                  share|improve this answer
























                    2












                    2








                    2






                    htop gives a nice overview of the processes that are running and the resources that are in use.






                    share|improve this answer












                    htop gives a nice overview of the processes that are running and the resources that are in use.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Sep 14 '12 at 20:43









                    AlexanderAlexander

                    5,90822043




                    5,90822043























                        0














                        Try these to see servers listening on TCP/UDP ports. I like it to have an overview of a server's purpose.



                        netstat -lepunt | perl -nle 's!^.*d+/!! && print if ($_);' | sort -u


                        or



                        ss -tualp | perl -nle 's/^.*users:.."(.*?)".*/$1/ && print;' | sort -u


                        Then you might want to also check the content of /etc/crontab to see what else the machine is doing (like backups for example).



                        And if running Apache, something like this may be useful:



                        grep -h -i ServerName /etc/apache2/{sites,conf}-enabled/* | grep -v '^s*#'





                        share|improve this answer




























                          0














                          Try these to see servers listening on TCP/UDP ports. I like it to have an overview of a server's purpose.



                          netstat -lepunt | perl -nle 's!^.*d+/!! && print if ($_);' | sort -u


                          or



                          ss -tualp | perl -nle 's/^.*users:.."(.*?)".*/$1/ && print;' | sort -u


                          Then you might want to also check the content of /etc/crontab to see what else the machine is doing (like backups for example).



                          And if running Apache, something like this may be useful:



                          grep -h -i ServerName /etc/apache2/{sites,conf}-enabled/* | grep -v '^s*#'





                          share|improve this answer


























                            0












                            0








                            0






                            Try these to see servers listening on TCP/UDP ports. I like it to have an overview of a server's purpose.



                            netstat -lepunt | perl -nle 's!^.*d+/!! && print if ($_);' | sort -u


                            or



                            ss -tualp | perl -nle 's/^.*users:.."(.*?)".*/$1/ && print;' | sort -u


                            Then you might want to also check the content of /etc/crontab to see what else the machine is doing (like backups for example).



                            And if running Apache, something like this may be useful:



                            grep -h -i ServerName /etc/apache2/{sites,conf}-enabled/* | grep -v '^s*#'





                            share|improve this answer














                            Try these to see servers listening on TCP/UDP ports. I like it to have an overview of a server's purpose.



                            netstat -lepunt | perl -nle 's!^.*d+/!! && print if ($_);' | sort -u


                            or



                            ss -tualp | perl -nle 's/^.*users:.."(.*?)".*/$1/ && print;' | sort -u


                            Then you might want to also check the content of /etc/crontab to see what else the machine is doing (like backups for example).



                            And if running Apache, something like this may be useful:



                            grep -h -i ServerName /etc/apache2/{sites,conf}-enabled/* | grep -v '^s*#'






                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Dec 31 '18 at 11:54

























                            answered Dec 31 '18 at 11:41









                            mivkmivk

                            1,5041415




                            1,5041415






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Unix & Linux Stack Exchange!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f46709%2fhow-to-check-what-is-running-in-a-server%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

                                Morgemoulin

                                Scott Moir

                                Souastre