Can't find Cron-Initiated Processes Initiated on Amazon EC2 Server
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
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!
linux ssh cron ps amazon-ec2
add a comment |Â
up vote
0
down vote
favorite
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!
linux ssh cron ps amazon-ec2
Are you typingps
with no options? By default, that will list only processes associated with the current terminal. To see all processes, you will need something likeps -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
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
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!
linux ssh cron ps amazon-ec2
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!
linux ssh cron ps amazon-ec2
asked Oct 14 '17 at 16:35
doodeecheng5
111
111
Are you typingps
with no options? By default, that will list only processes associated with the current terminal. To see all processes, you will need something likeps -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
add a comment |Â
Are you typingps
with no options? By default, that will list only processes associated with the current terminal. To see all processes, you will need something likeps -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
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
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.
answered Oct 14 '17 at 17:03
mazs
2,5151522
2,5151522
add a comment |Â
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
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.
answered Oct 15 '17 at 1:56
doodeecheng5
111
111
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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 likeps -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