07-28-2009
Hi Cero,
Thank you very much; I did not know those commands.
a.out is actually a fastcgi program and I need to kill every running processes of that program. Would
fuser -k /a/a.out
do the trick?
I am a bit confused because the man page of fuser reads:
-k Kill processes accessing the file. Unless changed with -signal, SIGKILL is sent. An fuser process never kills itself, but may kill other fuser processes. The effective user ID of the process executing fuser is set to its real user ID before attempting to kill.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
OS: Unix or Linux
I (only) know the pid of the process which was running earlier (say 5 hrs back) but it is not running now.
Is there a way I could find the details of that process? (atleast the name of the process). Please let me know. (2 Replies)
Discussion started by: vijay.d
2 Replies
2. Shell Programming and Scripting
Hi.
I was testing some staff and wrote simple script, which only writes date to log every 15 seconds.
Like that
#1.sh
while true;do
echo `date` >> 1.log
sleep 15
done
And than i ran this process with `at -s -f 1.sh now`. And now it is running and i don't know how to catch it.
I tryed... (1 Reply)
Discussion started by: kukuruku
1 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I'm a newbie when it comes to using UNIX, and I'm hoping someone here can help me out. I have a set of processes that I want to run sequentially:
process1.py
process2.py
process3.py
I want to know I can run these sequentially using their process IDs (PIDs). Ideally, I want to... (2 Replies)
Discussion started by: shelata
2 Replies
4. Shell Programming and Scripting
Hi all,
I am having a little bit of trouble trying to find something out. I am trying to script a start/stop php file, for some gaming servers i host. The server have 2 lots of processes running on them, and the customers need to be able to start and stop them at their will.
So i know how to... (1 Reply)
Discussion started by: Syth
1 Replies
5. Shell Programming and Scripting
Hi,
I have following samp.txt file in unix.
samp.txt
01Roy2D3M000000
02Rad2D3M222222
.
.
.
.
10Mik0A2M343443
Desired Output
01Roy2A3M000000
02Rad2A3M222222
.
. (5 Replies)
Discussion started by: techmoris
5 Replies
6. Solaris
Hi Friends,
How can we find the process ID of a running process using the process name. In AIX I used to use the command "ps -ef | grep <process name>", it used to give me the owner of that process, Process ID and the threads running and the name of the process in the end.
However in... (2 Replies)
Discussion started by: sahilsardana
2 Replies
7. Shell Programming and Scripting
I want to kill a process run by a user of another group.
How do I do that..? (3 Replies)
Discussion started by: Haimanti
3 Replies
8. UNIX for Dummies Questions & Answers
Hi everyone. I've been reading around and am a little bit overwhelmed, hoping to find a kind soul out there to hold my hand through writing my first script. This need has emerged at work and I haven't much experience writing shell scripts, but this is a problem we have with a production environment... (13 Replies)
Discussion started by: thirdcoaster
13 Replies
9. Shell Programming and Scripting
hi guys
i had written a shell script Display Information of all the File Systems
i want to find the pid and kill the process after few minutes.how can i obtain the pid and kill it???
sample.sh
df -a >> /tmp/size.log
and my cron to execute every minute every hour every day
* *... (5 Replies)
Discussion started by: azherkn3
5 Replies
10. Shell Programming and Scripting
Dear All,
I need to transfer all files present in one location to another but those files should be of specific extension like.
Find and copy all files of extension .xls, .pdf, .txt from location usr/tmp to location /per/Treat (6 Replies)
Discussion started by: yadavricky
6 Replies
PIDOF(8) Linux System Administrator's Manual PIDOF(8)
NAME
pidof -- find the process ID of a running program.
SYNOPSIS
pidof [-s] [-x] [-o omitpid] [-o omitpid..] program [program..]
DESCRIPTION
Pidof finds the process id's (pids) of the named programs. It prints those id's on the standard output. This program is on some systems
used in run-level change scripts, especially when the system has a System-V like rc structure. In that case these scripts are located in
/etc/rc?.d, where ? is the runlevel. If the system has a start-stop-daemon (8) program that should be used instead.
OPTIONS
-s Single shot - this instructs the program to only return one pid.
-x Scripts too - this causes the program to also return process id's of shells running the named scripts.
-o Tells pidof to omit processes with that process id. The special pid %PPID can be used to name the parent process of the pidof pro-
gram, in other words the calling shell or shell script.
NOTES
pidof is simply a (symbolic) link to the killall5 program, which should also be located in /sbin.
When pidof is invoked with a full pathname to the program it should find the pid of, it is reasonably safe. Otherwise it is possible that
it returns pids of running programs that happen to have the same name as the program you're after but are actually other programs.
SEE ALSO
shutdown(8), init(8), halt(8), reboot(8)
AUTHOR
Miquel van Smoorenburg, miquels@cistron.nl
01 Sep 1998 PIDOF(8)