I need it to open 10 processes, and each time one of them finishes I want to wait few seconds and start another one.
It seems pretty simple, but somehow I can make it work.
I want to be able to log FFMPEG processes because I am trying to work out how long a minute of video takes to convert to help with capacity planning of my video encoding server. How do I enable logging and where is the log file saved. I have FFMPEG installed on a CentOS LAMP machine.
I am currently developing a module for Apache 2/2.2 and need to perform some cleanup before the main Apache process terminates (not the child processes).
I have searched extensively without finding any guidelines on which hook to use. Can anyone help point me in the right direction?
I"m looking for a term here.
in messaging systems you send a request, and it processes and sends a response.
if that same request is sent it should return the same response, (but not necessarily process the details)
This would be like submitting financial details twice.
If I have a process that receives signals from other processes, is there a way for me to somehow tell which process (if any) sent a signal?
strace lets me trace which signals a process has received, but doesn't allow me to trace who issued them.
I am processing large amounts of data in iterations, each and iteration processes around 10-50 000 records. Because of such large number of records, I am inserting them into a global temporary table first, and then process it. Usually, each iteration takes 5-10 seconds.
Would it be wise to truncate the global temporary table after each iteration so that each iteration can start off with an empty table? There are around 5000 iterations.
I have an ActiveRecord::Base class which needs to have a field that is automatically generated when a new instance is made. How should I go about doing this? By defining an initialize function?
class Thing < ActiveRecord::Base
# 'special' (integer) needs to be set to lowest unused number (above 0)
# considering that random rows will be removed via other processes
end
This is as far as I've got! Any ideas?
Is there a way to PHP make asynchronous http calls? I don't care about the response, I just want to do something like file_get_contents(), but not wait on the request to finish before executing the rest of my code. This would be super useful for setting off "events" of a sort in my application, or triggering long processes.
Any ideas?
I need to write a script that will recreate my opt folder if it gets deleted when I remove a package from it. Here's a link to my previous post: dpkg remove to stop processes
Now, the issue I'm running into could be better described here: http://lists.debian.org/debian-devel/2006/03/msg00242.html
I was thinking of just adding a postrem script which checks if an opt directory exists, and if not, creates one. My experience with shell scripts is pretty limited though..
INFORMIX-SE 7.2:
I would like to dedicate a hard disk, exclusively for my dbname.dbs directory which holds all the .dat and .idx files, and create a ramdisk for my /tmp temporary files in order to improve performance. I would also like to strip down the OS from any unecessary files and processes to minimize overhead for my dedicated application. Is this a good idea and are there any roadmaps for accomplishing this?
I would like to use Python's tempfile module to create a temporary file that I will use for communication between processes (use of pipes is awkward).
The documentation I've linked to above shows two functions that almost do what I want:
tempfile.NamedTemporaryFile # For creating named tempfiles
tempfile.SpooledTemporaryFile # For creating tempfiles in memory
but actually I want a tempfile that is both named AND in memory. Any ideas?
I have 2 processes: 1 is writing to a sqlite database, 1 is reading from the same database. Occasioally, I get SQLITE_BUSY on my selects. Is this normal? Is their some option or way I could open the database so that it blocks until it CAN complete the query? (I tried the FULLMUTEX option on the open call but it appeared to have no effect).
What is the best way to queue background processes in PHP...
Zend's job queue seems very nice but I am not able to switch to zend server what are the alternatives for doing this?
How to get PIDs of processes that are using a given file name and mutex name?
(Not by custom kernel driver, but in C# in user mode.)
UPDATE: Thanks to Daniel Renshaw I found a script that lists all handles with PIDs. (Using a not undocumented and unfrozen functions.)
I'm trying to make a script that will place a list (in a .csv file) of processes that are running that take up more than 10 mb of RAM and shows the time + date the script was run. My teacher did this during his lecture but I can't remember how he did it. Just trying to figure out how to be better at IT.
So my question is, can anyone help me with this? I don't even know where to start.
Often we think that an antivirus or similar is more than sufficient,
but many clients could accomplish so many processes that it would
be more safe having a real sandbox environment like unix like OS.
Better virtual machine like VMWare, VirtualBox and similar sandabox,
or there are better ways to keep safe our privacy?
What is the best way to break up a recursive function that is using a ton of resources
For example:
function do_a_lot(){
//a lot of code and processing is done here
//it takes a lot of execution time
if($true){
//if true we have to do all of that processing again
do_a_lot();
}
}
Is there anyway to make the server only have to take the brunt of the first execution and then break up the recursion into separate processes? Or am I dreaming?
There is an existing question regarding difference between Mutex and Critical section but it does not deal with Locks also.
So i want to know whether Critical sections can be used for thread synchronisation between processes.
Also what is meant by signalled states and non-signalled states
I'd like to test whether particular socket options have been set on an existing socket. Ie, pretty much everything you can see in:
#!/usr/bin/env python
'''See possible TCP socket options'''
import socket
sockettypelist = [x for x in dir(socket) if x.startswith('SO_')]
sockettypelist.sort()
for sockettype in sockettypelist:
print sockettype
Anyone know how I can see the options on existing sockets, ie those created by other processes? Alas nearly all the documentation I read on Python socket programming is about making new sockets.
My problem is is that paperclip saves the attachments appropriately, and I assume imagemagick is doing something right. With no errors returning, the images never finish processing.
Does anyone know a way to see what's backgrounding?
Or specifically a way to review imagemagick's processes?
Does CakePHP check inputs to see if they are valid and not injections? If not, how would I go about implementing functions to check inputs? Most of Cake's processes are done behind the scenes, so I'm unsure of where I would do that.
I have a large data file that is creatd from a shell script. Next script processes it by sorting and reading several times, that takes more than 14 hours, it is not viable.
I want to replace this long running script with a program, probably in JAVA, C, or COBOl, that can run on windows or on sun solaris. I have to read a group of records everytime, sort and process and write to the output sort file and at the same time insert into db2/sql tables.
I am using exec() inside a a script that runs as a daemon and forks child processes using the pear class Net_Server.
I am getting a strange issue whereby the return code (the third param of of exec) comes back as -1. When I run the command on the command line, or with exec in a normal php script the return code is 0 as it should be. Anyone have any idea why this is happening, and how to fix it?
I have some php code, that execute for a very long time.
I need to realise next scheme:
User enter on some page(page 1)
This page starts execution of my large PHP script in background .(Every change is writting to database)
We sent every N seconds query to database to get current status of execution.
I don't want to use exec command because 1000 users makes 1000 php processes. It's not way for me...
I have a Queue of items I want to process in a thread, and any instance of a class can add items to the Queue to be processed.
My idea for doing this is to have a static Thread in the class that processes the items, the only problem is that I don't know where to start this thread, since I can't start it in its initialization.
Is there a way I can start a static thread? Or should I be changing the architecture completely?