Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Finding apache process id that is spawned by a wget Post 302411400 by Corona688 on Thursday 8th of April 2010 11:42:23 AM
Old 04-08-2010
Quote:
Originally Posted by mrploddy
This returns to PHP the process ID of the wget process. However what I'm looking for is to get the process ID of the apache process that wget starts and runs. However the apache process that is doing the work doesn't appear to be any relation to the wget process (eg the apache process isn't a child process of wget).
They are connected by nothing but a network socket and have nothing in common otherwise. Think about it -- plug a different URL into wget and the process you spawn could be a thousand miles away! Smilie

If you want to spawn a local process, spawn a local process -- run the script yourself instead of wget-ing a URL that causes the web server to do it. Otherwise the process's PID and so forth is soley the web server's concern.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Is there any cmd to kill a process including its childs ( or sub processes spawned by

Dear Unix Gurus, Here is my query. If i start a script,it inturn calls many other scripts ..and most of them continue to run in parallel. Suppose,if i want to stop my script for some reason,i need to kill -9 each of the processes running.It becomes clumsy if the sub processes r more. ... (15 Replies)
Discussion started by: gvsreddy_539
15 Replies

2. Shell Programming and Scripting

Keep process running (wget) and logout

well, i have only been learning about linux, unix and shells for a few days. For my online game to work, i need run a file each 10 seconds. Running that file will update mysql data, causing my online game to "tick". This adds resources and fights battles in game. I know that i need to use a... (3 Replies)
Discussion started by: mikey1090
3 Replies

3. Shell Programming and Scripting

need help with this background wget process.

I run an online game, and every 10 seconds or so i need to "run" a file. In other words in needs to be executed. Its a PHP file. The file updates vital things in my game, each time it does it its know as a "tick". Here is the code i am using. (wget... (2 Replies)
Discussion started by: mikey1090
2 Replies

4. Shell Programming and Scripting

Finding the process id of the process using the ports

Hi Any idea how to get the process id of the process using the ports lsof -i :portnumber does not work in my machine. I am on sun Solaris SPARC. Any suggestion is highly appreciated (1 Reply)
Discussion started by: kinny
1 Replies

5. UNIX for Advanced & Expert Users

Finding process id of subsequent process

hi all, I am trying to find the process id of the subsequent process created via fork and exec calls in perl. For eg: envVarSetter dataCruncher.exe < input.txt > output.txt When I fork and exec the above command, it returns only the pid of envVarSetter and I don't know how to find the... (9 Replies)
Discussion started by: matrixmadhan
9 Replies

6. Shell Programming and Scripting

Suppressing output of a spawned telnet process

Hi, I'm trying to spawn a telnet process and trying to do some actions in the remote host using expect script. I would like to know how to suppress all the output in order the user using the script should not be able to see any actions done on the remote host. I tried using the "log_user 0"... (8 Replies)
Discussion started by: arun_maffy
8 Replies

7. Shell Programming and Scripting

How to keep process running after apache restart.

I have posted this on the Web subforum but it seems that nobody knows to do this, maybe someone has a solution here. Thank you I have a PHP application that starts a couple of processes on the server...the problem is that if I restart apache those running apps will die. How can I start them... (1 Reply)
Discussion started by: valiadi
1 Replies

8. Shell Programming and Scripting

Process behavior different when spawned from single terminal

So this one just plain confuses me. I have a bunch of somewhat CPU intensive processes that all communicate using a shared memory region. Some of these programs are threaded and some also change the scheduling to FIFO or round robin. The good news is that everything works as long as I spawn... (3 Replies)
Discussion started by: talkingfennel
3 Replies

9. Shell Programming and Scripting

Finding process which ended another process

Hello, The scenario is as follows, I have a background process running initially for which i know the PID on machine1. I use ssh from machine 2 to execute a script in machine 1. For some reason the back ground process is terminated. I would like to know which process caused the... (6 Replies)
Discussion started by: prasbala
6 Replies

10. Red Hat

Process not running: /opt/java15/jdk/bin/java -classpath /opt/apache/apache-ant-1.7.0-mod/lib/ant-la

Have no idea on what the below error message is: Process not running: /opt/java15/jdk/bin/java -classpath /opt/apache/apache-ant-1.7.0-mod/lib/ant-launcher.jar org.apache.tools.ant.launch.Launcher -buildfile build.xml dist. Any help? (3 Replies)
Discussion started by: gull05
3 Replies
fsx(8)							      System Manager's Manual							    fsx(8)

NAME
fsx - file system exerciser SYNOPSIS
/usr/field/fsx [-h] [-ofile] [-tn] [-fpath] [-pm] OPTIONS
The fsx options are: Prints the help messages for the fsx command. Saves the output diagnostics in file. Run time in minutes (n). The default is to run until the process receives a Ctrl/C or a kill -15 pid command. Number (m) of fsx processes to spawn. The maximum is 250; the default is 20. Path name of directory on file system you wish to test. For example, /mnt or /usr. The default is /usr/field. DESCRIPTION
The fsx exerciser spawns the background process fsxr, and these two processes exercise a file system by creating, opening, writing, open- ing, reading, validating, closing, and unlinking a test file. These test files are created in the /usr/field directory (the default) unless the -fpath option is used. You can spawn up to 250 (default is 20) fsx processes (fsxr1, fsxr2, ... fsxrn where n is the number of processes spawned). The exerciser will run until a Ctrl/C or kill -15 pid command is sent to the process. A logfile for you to examine and then remove is created in the current working directory. If there are errors in the logfile, make sure you check the syslog file where the driver and kernel error messages are saved. RESTRICTIONS
If you must run a system exerciser over an NFS link or on a diskless system, there are some restrictions. For exercisers such as fsx(8), which must write into a file system, the target file system must be writable by root. Also, the directory in which any of the exercisers are executed must be writable by root because temporary files are written into the current directory. These latter restrictions are some- times difficult to overcome because often NFS file systems are mounted in a way that prevents root from writing into them. Some of the restrictions may be overcome by copying fsx and fsxr to another directory and then executing it. Avoid using the fsx exerciser over an NFS or diskless file system. Each time you run fsx, it creates a log file. The exerciser allows you to accumulate up to 9 log files. If you run fsx to create a tenth log file, it exits and displays the following error messages: fsx: Remove old log files fsx: Can not start report generator, test aborted When this situation occurs, remove at least one log file and run fsx again. EXAMPLES
The following example runs 10 fsx processes on /mnt until the process receives a Ctrl/C or kill -15 pid command: % /usr/field/fsx -p10 -f/mnt The following example runs 20 fsx processes on /usr/field for 120 minutes in the background: % /usr/field/fsx -t120 & SEE ALSO
Commands: cmx(8), diskx(8), memx(8), shmx(8), tapex(8) fsx(8)
All times are GMT -4. The time now is 07:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy