pid differs


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users pid differs
# 1  
Old 12-14-2006
pid differs

I always find that the pid I get from:

/var/run/syslog-ng.pid

and

ps -ef |grep syslog-ng

are different.

this also happens on other pids. why?

If I am going to kill a process, which pid should I use?
# 2  
Old 12-14-2006
mine appear to be the same, i don't see differences in the actual running pid and the .pid numbers.

have you tried stopping the process, removing the pid file manually if it still exists and then starting the process up ? maybe they are stale pids?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Output of echo $$ differs in Script than console

Hi All, I have a very basic query for 'echo $$' command. When I am executing echo $$ on console then it is giving different output than the execution of echo $$ in a script. Console Output: ------------------------- bash-3.2$ echo $$ 15610 bash-3.2$ In Script:... (3 Replies)
Discussion started by: manishdivs
3 Replies

2. UNIX for Advanced & Expert Users

PPID differs in script and prompt

I tried several times to get answer to the below problem. Someone can please help me? $ cat p1.sh #!/bin/sh `./c1.sh &` while # indefinite loop do x=5; done $ cat c1.sh # sleep for 10 sec and exit #!/bin/sh sleep 10; Execute P1 as ./p1 & $ ps -eaf | grep c1... (1 Reply)
Discussion started by: alexalex1
1 Replies

3. Programming

how abstract class differs in Java and C++?

hello all, i want to know if there is any difference in working and syntax declaration of abstract class in Java and C++. (1 Reply)
Discussion started by: haravivar
1 Replies

4. Shell Programming and Scripting

script execution differs in cron

I have the following script (MyScript): #!/bin/sh ps U erv | grep -v grep | grep -F "/usr/bin/collect -o 101" echo "Result: $?" When executed from the command line, I get ... (the line containing /usr/bin/collect -o 101) Result: 0 (which is correct since collect is running) When I... (4 Replies)
Discussion started by: lost_neko
4 Replies

5. Shell Programming and Scripting

ftp. copy if size differs

Hi. On my system there is a script which making backup to ftp site. But it leaves copy of files on local machine. Then i go to Midnight Commander and check manually with MC features - i open ftp directory and copy files <if size differs>. So, how can i do the last thing in shell or other... (1 Reply)
Discussion started by: kukuruku
1 Replies

6. UNIX for Dummies Questions & Answers

Need to get pid of a process and have to store the pid in a variable

Hi, I need to get the pid of a process and have to store the pid in a variable and i want to use this value(pid) of the variable for some process. Please can anyone tell me how to get the pid of a process and store it in a variable. please help me on this. Thanks in advance, Amudha (7 Replies)
Discussion started by: samudha
7 Replies

7. Shell Programming and Scripting

how ./example.sh differs from . /example.sh and ./ example.sh

May i know the difference between the execution of the commands: ./example.sh . /example.sh and ./ example.sh the last and last but one is having space in between that is the difference please suggest me the answer for this...:confused: (4 Replies)
Discussion started by: lokeshpashine
4 Replies

8. UNIX for Dummies Questions & Answers

Session PID & socket connection pid

1. If I use an software application(which connects to the database in the server) in my local pc, how many PID should be registered? Would there be PID for the session and another PID for socket connection? 2. I noticed (through netstat) that when I logged in using the my software application,... (1 Reply)
Discussion started by: pcx26
1 Replies

9. Shell Programming and Scripting

print the first 5 lines in which 2 files differs

it is a simple problem, but I am totally new to shell programming There are 2 files. I have to print the 5 five lines which are different. I appreciate any help. 10x. (2 Replies)
Discussion started by: atticus
2 Replies

10. Programming

printing ppid,child pid,pid

question: for the below program i just printed the value for pid, child pid and parent pid why does it give me 6 values? i assume ppid is 28086 but can't figure out why there are 5 values printed instead of just two! can someone comment on that! #include<stdio.h> #define DIM 8 int... (3 Replies)
Discussion started by: a25khan
3 Replies
Login or Register to Ask a Question