Can't find Cron-Initiated Processes Initiated on Amazon EC2 Server

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite
1












On my remote Amazon EC2 instance, I've scheduled a Cron job to run a program once every hour. The program takes about 55 minutes to run, and sends me an email when it starts and when it stops.



It has been working well, but recently it seems as if the programs have abruptly began taking longer ('end email' arrives well over 55 minutes after start email). This also means potentially multiple processes are being run at the same time. I would like to confirm this by viewing all current processes being run - but for some reason, when I type 'ps' only two processes are shown: bash, and the ps command itself.



Any idea why the processes aren't being shown in ps? How can I find them? Once again, I'm SSHing into my Amazon EC2 instance - not sure if that's affecting which processes show up.



Thanks so much!







share|improve this question




















  • Are you typing ps with no options? By default, that will list only processes associated with the current terminal. To see all processes, you will need something like ps -e or (BSD-style) ps ax
    – steeldriver
    Oct 14 '17 at 17:00










  • Yes- that ended up being the issue! I thought ps would show all processes. The solution that ended up working was ps -eo pid,comm,cmd,start,etime - which showed all my processes, the process id's and the start time and how long the had been running. This allowed me to clearly identify processes which had been running too long and had to be killed.
    – doodeecheng5
    Oct 15 '17 at 1:53














up vote
0
down vote

favorite
1












On my remote Amazon EC2 instance, I've scheduled a Cron job to run a program once every hour. The program takes about 55 minutes to run, and sends me an email when it starts and when it stops.



It has been working well, but recently it seems as if the programs have abruptly began taking longer ('end email' arrives well over 55 minutes after start email). This also means potentially multiple processes are being run at the same time. I would like to confirm this by viewing all current processes being run - but for some reason, when I type 'ps' only two processes are shown: bash, and the ps command itself.



Any idea why the processes aren't being shown in ps? How can I find them? Once again, I'm SSHing into my Amazon EC2 instance - not sure if that's affecting which processes show up.



Thanks so much!







share|improve this question




















  • Are you typing ps with no options? By default, that will list only processes associated with the current terminal. To see all processes, you will need something like ps -e or (BSD-style) ps ax
    – steeldriver
    Oct 14 '17 at 17:00










  • Yes- that ended up being the issue! I thought ps would show all processes. The solution that ended up working was ps -eo pid,comm,cmd,start,etime - which showed all my processes, the process id's and the start time and how long the had been running. This allowed me to clearly identify processes which had been running too long and had to be killed.
    – doodeecheng5
    Oct 15 '17 at 1:53












up vote
0
down vote

favorite
1









up vote
0
down vote

favorite
1






1





On my remote Amazon EC2 instance, I've scheduled a Cron job to run a program once every hour. The program takes about 55 minutes to run, and sends me an email when it starts and when it stops.



It has been working well, but recently it seems as if the programs have abruptly began taking longer ('end email' arrives well over 55 minutes after start email). This also means potentially multiple processes are being run at the same time. I would like to confirm this by viewing all current processes being run - but for some reason, when I type 'ps' only two processes are shown: bash, and the ps command itself.



Any idea why the processes aren't being shown in ps? How can I find them? Once again, I'm SSHing into my Amazon EC2 instance - not sure if that's affecting which processes show up.



Thanks so much!







share|improve this question












On my remote Amazon EC2 instance, I've scheduled a Cron job to run a program once every hour. The program takes about 55 minutes to run, and sends me an email when it starts and when it stops.



It has been working well, but recently it seems as if the programs have abruptly began taking longer ('end email' arrives well over 55 minutes after start email). This also means potentially multiple processes are being run at the same time. I would like to confirm this by viewing all current processes being run - but for some reason, when I type 'ps' only two processes are shown: bash, and the ps command itself.



Any idea why the processes aren't being shown in ps? How can I find them? Once again, I'm SSHing into my Amazon EC2 instance - not sure if that's affecting which processes show up.



Thanks so much!









share|improve this question











share|improve this question




share|improve this question










asked Oct 14 '17 at 16:35









doodeecheng5

111




111











  • Are you typing ps with no options? By default, that will list only processes associated with the current terminal. To see all processes, you will need something like ps -e or (BSD-style) ps ax
    – steeldriver
    Oct 14 '17 at 17:00










  • Yes- that ended up being the issue! I thought ps would show all processes. The solution that ended up working was ps -eo pid,comm,cmd,start,etime - which showed all my processes, the process id's and the start time and how long the had been running. This allowed me to clearly identify processes which had been running too long and had to be killed.
    – doodeecheng5
    Oct 15 '17 at 1:53
















  • Are you typing ps with no options? By default, that will list only processes associated with the current terminal. To see all processes, you will need something like ps -e or (BSD-style) ps ax
    – steeldriver
    Oct 14 '17 at 17:00










  • Yes- that ended up being the issue! I thought ps would show all processes. The solution that ended up working was ps -eo pid,comm,cmd,start,etime - which showed all my processes, the process id's and the start time and how long the had been running. This allowed me to clearly identify processes which had been running too long and had to be killed.
    – doodeecheng5
    Oct 15 '17 at 1:53















Are you typing ps with no options? By default, that will list only processes associated with the current terminal. To see all processes, you will need something like ps -e or (BSD-style) ps ax
– steeldriver
Oct 14 '17 at 17:00




Are you typing ps with no options? By default, that will list only processes associated with the current terminal. To see all processes, you will need something like ps -e or (BSD-style) ps ax
– steeldriver
Oct 14 '17 at 17:00












Yes- that ended up being the issue! I thought ps would show all processes. The solution that ended up working was ps -eo pid,comm,cmd,start,etime - which showed all my processes, the process id's and the start time and how long the had been running. This allowed me to clearly identify processes which had been running too long and had to be killed.
– doodeecheng5
Oct 15 '17 at 1:53




Yes- that ended up being the issue! I thought ps would show all processes. The solution that ended up working was ps -eo pid,comm,cmd,start,etime - which showed all my processes, the process id's and the start time and how long the had been running. This allowed me to clearly identify processes which had been running too long and had to be killed.
– doodeecheng5
Oct 15 '17 at 1:53










2 Answers
2






active

oldest

votes

















up vote
1
down vote













You have to use some flags to display all the processes, including the ones launched in the background by root, for example ps aux , and grep your process name.




  • -a : Display information about other users' processes as well as your own


  • -u : Display the processes belonging to the specified usernames

Check man ps for more information.






share|improve this answer



























    up vote
    1
    down vote













    As suggested by the other users, I needed to add more details to my ps command. What ended up working for me was:



    ps -eo pid,comm,cmd,start,etime


    This showed all processes (-e) and gave the information I specified (-o): the process id (pid) so I could kill the task, the command (comm) - i.e. python, bash, etc., the cmd (the full path to the program), the start time, and the elapsed time.






    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',
      convertImagesToLinks: false,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      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%2f398131%2fcant-find-cron-initiated-processes-initiated-on-amazon-ec2-server%23new-answer', 'question_page');

      );

      Post as a guest






























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      1
      down vote













      You have to use some flags to display all the processes, including the ones launched in the background by root, for example ps aux , and grep your process name.




      • -a : Display information about other users' processes as well as your own


      • -u : Display the processes belonging to the specified usernames

      Check man ps for more information.






      share|improve this answer
























        up vote
        1
        down vote













        You have to use some flags to display all the processes, including the ones launched in the background by root, for example ps aux , and grep your process name.




        • -a : Display information about other users' processes as well as your own


        • -u : Display the processes belonging to the specified usernames

        Check man ps for more information.






        share|improve this answer






















          up vote
          1
          down vote










          up vote
          1
          down vote









          You have to use some flags to display all the processes, including the ones launched in the background by root, for example ps aux , and grep your process name.




          • -a : Display information about other users' processes as well as your own


          • -u : Display the processes belonging to the specified usernames

          Check man ps for more information.






          share|improve this answer












          You have to use some flags to display all the processes, including the ones launched in the background by root, for example ps aux , and grep your process name.




          • -a : Display information about other users' processes as well as your own


          • -u : Display the processes belonging to the specified usernames

          Check man ps for more information.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Oct 14 '17 at 17:03









          mazs

          2,5151522




          2,5151522






















              up vote
              1
              down vote













              As suggested by the other users, I needed to add more details to my ps command. What ended up working for me was:



              ps -eo pid,comm,cmd,start,etime


              This showed all processes (-e) and gave the information I specified (-o): the process id (pid) so I could kill the task, the command (comm) - i.e. python, bash, etc., the cmd (the full path to the program), the start time, and the elapsed time.






              share|improve this answer
























                up vote
                1
                down vote













                As suggested by the other users, I needed to add more details to my ps command. What ended up working for me was:



                ps -eo pid,comm,cmd,start,etime


                This showed all processes (-e) and gave the information I specified (-o): the process id (pid) so I could kill the task, the command (comm) - i.e. python, bash, etc., the cmd (the full path to the program), the start time, and the elapsed time.






                share|improve this answer






















                  up vote
                  1
                  down vote










                  up vote
                  1
                  down vote









                  As suggested by the other users, I needed to add more details to my ps command. What ended up working for me was:



                  ps -eo pid,comm,cmd,start,etime


                  This showed all processes (-e) and gave the information I specified (-o): the process id (pid) so I could kill the task, the command (comm) - i.e. python, bash, etc., the cmd (the full path to the program), the start time, and the elapsed time.






                  share|improve this answer












                  As suggested by the other users, I needed to add more details to my ps command. What ended up working for me was:



                  ps -eo pid,comm,cmd,start,etime


                  This showed all processes (-e) and gave the information I specified (-o): the process id (pid) so I could kill the task, the command (comm) - i.e. python, bash, etc., the cmd (the full path to the program), the start time, and the elapsed time.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Oct 15 '17 at 1:56









                  doodeecheng5

                  111




                  111



























                       

                      draft saved


                      draft discarded















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f398131%2fcant-find-cron-initiated-processes-initiated-on-amazon-ec2-server%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Popular posts from this blog

                      How to check contact read email or not when send email to Individual?

                      Bahrain

                      Postfix configuration issue with fips on centos 7; mailgun relay