ps -ef does not displaying the running process


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ps -ef does not displaying the running process
# 1  
Old 11-23-2009
ps -ef does not displaying the running process

Hi,

I am using the monitor shell script to check the particular process is running or not.If it is not running this monitor shell script will automatically start the process.I am using the ps -ef command to check the process availablity.But the problem is some times the ps -ef | grep "Process name" is not working(does not displaying anything in the console).so my monitor script assumes that the process is not running and trying to start the process.Is there any other way to ensure the process availablity?
# 2  
Old 11-23-2009
Sorry, I didnot understand the question completely.

If ps -ef | grep processname is not displaying anything, there is no such process currently running or the expected process has finished running by the time, ps did a scan in the process table.

Alternatively, if the system has got a VFS ( virtual fiile system ), check for a directory in the name of process id in /proc/
# 3  
Old 11-23-2009
Hi,
Thanks for your reply.

My problem is eventhough the process is running

ps -ef | grep "process name"

does not displaying the running process name in the console.
# 4  
Old 11-23-2009
Quote:
Originally Posted by sureshbabuc
Hi,
Thanks for your reply.

My problem is eventhough the process is running

ps -ef | grep "process name"

does not displaying the running process name in the console.
that is not possible,
just double checking -
Code:
is there any spelling mistake in the process name typed?
are you very sure process is still running?

# 5  
Old 11-23-2009
Maybe below command give you some helps.

Code:
/usr/ucb/ps -auwwwx |grep "process name"

# 6  
Old 11-23-2009
I am very mich sure that the process is still running.No spelling mistakes.

---------- Post updated at 02:28 PM ---------- Previous update was at 02:22 PM ----------

I am very mich sure that the process is still running.No spelling mistakes.we are using solaris sparc architecture machine.Also its not happening 99% of the time.
# 7  
Old 11-23-2009
This is a known problem with "ps -ef".
Better to record the PID of the background process when it starts and then only check that PID.
Easier if we can see the script that starts the process and the script that tests whether the process is running.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Command to get exact tomcat process I am running ignoring other java process

Team, I have multiple batchjobs running in VM, if I do ps -ef |grep java or tomcat I am getting multiple process list. How do I get my exact tomcat process running and that is unique? via shell script? (4 Replies)
Discussion started by: Ghanshyam Ratho
4 Replies

2. HP-UX

PS output is not displaying full process running

I have 4 HPUX 11.31 servers with the same Quality Pack bundles. "AS FAR AS I CAN TELL" no system files have been modified. /usr/bin/ps is the same date size and creation date terminfo file (x-->xterm) is the same date size and creation date shell (ksh) is the same date size and creation date ... (4 Replies)
Discussion started by: mrmurdock
4 Replies

3. UNIX for Advanced & Expert Users

Process remians in Running state causing other similar process to sleep and results to system hang

Hi Experts, I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state. On doing cat /proc/<pid>wchan showing the "__init_begin" in the output. Can you please help me here... (6 Replies)
Discussion started by: naveeng
6 Replies

4. UNIX for Advanced & Expert Users

Process remians in Running state causing other similar process to sleep and results to system hang

Hi Experts, I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state. On doing cat /proc/<pid>wchan showing the "__init_begin" in the output. Can you please help me here... (1 Reply)
Discussion started by: naveeng
1 Replies

5. BSD

Process remians in Running state causing other similar process to sleep and results to system hang

Hi Experts, I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state. On doing cat /proc/<pid>wchan showing the "__init_begin" in the output. Can you please help me here... (0 Replies)
Discussion started by: naveeng
0 Replies

6. Shell Programming and Scripting

Variable not displaying while running in cron job

hi , While running my script individually the variable is working fine. But when i am running the same script from cron job it's displaying nothing. Can any one comment on this. (4 Replies)
Discussion started by: josephroyal
4 Replies

7. Shell Programming and Scripting

script to monitor process running on server and posting a mail if any process is dead

Hello all, I would be happy if any one could help me with a shell script that would determine all the processes running on a Unix server and post a mail if any of the process is not running or aborted. Thanks in advance Regards, pradeep kulkarni. :mad: (13 Replies)
Discussion started by: pradeepmacha
13 Replies

8. Shell Programming and Scripting

Displaying current user process

When I typed in ps -a I get this: PID TTY TIME CMD 31799 pts/3 00:00:00 vim 31866 pts/3 00:00:00 vim And to check who is currently logged in, I type who Felix Whoals Tada Whoals Lala Whoals How can I get the user process for all current users who logged in?? I think I need to combine... (14 Replies)
Discussion started by: felixwhoals
14 Replies

9. UNIX for Advanced & Expert Users

How to create a dummy process of a process already running?

Hi Everybody, I want to create a shell script named as say "jip" and it is runned. And i want that when i do ps + grep for the process than this jip should be shown as process. Infact there might be process with name jip which is already running. (3 Replies)
Discussion started by: shambhu
3 Replies

10. UNIX for Dummies Questions & Answers

Displaying VERY long process names with ps -ef

Hi, I'm trying to display all process on an AIX server with the string SLRServer in them. Normally "ps -ef|grep SLRServer" would be sufficient, however in this instance the process name is enormous and the part which contains this string has been truncated, as you can see in the example below ... (8 Replies)
Discussion started by: m223464
8 Replies
Login or Register to Ask a Question