Sponsored Content
Top Forums Shell Programming and Scripting Bash script multithread in group of 3 Post 302426164 by clx on Tuesday 1st of June 2010 03:08:22 AM
Old 06-01-2010
Again, that depends on how they are going to be executed ( sequential or parallel ).
if they are "independent" of each other, you can run them in parallel mode. (taking consideration of how bulky they are to handle the CPU utilization)

if you can only run the script when previous finishes, I don't think you can do anything to make it faster by grouping of them.

Also, if they are taking time, may be you can do something to tune them.
 

9 More Discussions You Might Find Interesting

1. Programming

Timeout with multithread server

I wrote a server which creates a thread for every client connection. I have to include timeout function that will kill the server thread if the client doesn't respond for specific time. That too using signal(SIGALRM). For this i am using alarm() function. When the server thread detects signal it... (1 Reply)
Discussion started by: Nads
1 Replies

2. Programming

Multithread,libcurl

Hi i m codding a programm,it can download any packet from ftp,I use libcurl library. But i want to use threads for downloading.(Multithreading).i cant get ftp file size from ftp and divide packet small pieces,like threads use. Please share your experince with me ,thanks. (0 Replies)
Discussion started by: canerbulut
0 Replies

3. Programming

Multithread app - Read-Only Data

Hello, I'm coding an application using pthreads.At some point the threads will read some read-only variables.Is it safe NOT to use mutexes, in order to make the program lighter since mutex operations are resource-demanding... Thanks (1 Reply)
Discussion started by: jonas.gabriel
1 Replies

4. Programming

[C] Multithread Server

Hi all,i'm new on this forum, excuse me for my english. I have wrote a server that accept connection from multiple client with the fork,but every client had to insert data in a linear list. The problem is that every client insert data in an own copy of the linear list and this is caused by... (7 Replies)
Discussion started by: kemistry
7 Replies

5. Shell Programming and Scripting

how to make your bash script run on a machine with csh and bash

hi, i have a script that runs on bash and would like to run it on a machine that has csh and bash. the default setting on that machine is csh. i dont want to change my code to run it with a csh shell. is there any way i can run the script (written in bash) on this machine? in other words is there... (3 Replies)
Discussion started by: npatwardhan
3 Replies

6. Solaris

How to find an application running on multithread?

Dear Friends, We have one T5240 server with 128vcpus in our lab.Performance of the server is very poor. Application uses only 2% of processor..I heard that single thread application performs slowly in coolthread.How can we find whether the application running on multithread or single thread? If... (7 Replies)
Discussion started by: nicktrix
7 Replies

7. Red Hat

Kcryptd - Which kernel supports MultiThread

I am currently have Centos 5.5 which consumes more CPU waiting for Kcrypt process. Later came to know that kcrypt is single threaded and hence consumes one CPU, results in performance degradation. Does any one really knows/practically experimented multithread of Kcryptd process with any of... (1 Reply)
Discussion started by: ragavendraganes
1 Replies

8. Shell Programming and Scripting

Sending email to group in bash

In shell scripting, TestEmail is an existing group email. I am using the below command to send emails who are existed under TestEmail . Unable to receive the email. I have tried group ="id1 id2 " .Its working and i tried creating alias as well. Can we do it without creating alias or group ="id1... (1 Reply)
Discussion started by: thomas9192
1 Replies

9. Shell Programming and Scripting

How to block first bash script until second bash script script launches web server/site?

I'm new to utilities like socat and netcat and I'm not clear if they will do what I need. I have a "compileDeployStartWebServer.sh" script and a "StartBrowser.sh" script that are started by emacs/elisp at the same time in two different processes. I'm using Cygwin bash on Windows 10. My... (3 Replies)
Discussion started by: siegfried
3 Replies
PHAR(1) 							   User Commands							   PHAR(1)

NAME
phar, phar.phar - PHAR (PHP archive) command line tool SYNOPSIS
phar <command> [options] ... DESCRIPTION
The PHAR file format provides a way to put entire PHP applications into a single file called a "phar" (PHP Archive) for easy distribution and installation. With the phar command you can create, update or extract PHP archives. Commands: add compress delete extract help help-list info list meta-del meta-get meta-set pack sign stub-get stub-set tree version add command Add entries to a PHAR package. Required arguments: -f file Specifies the phar file to work on. ... Any number of input files and directories. If -i is in use then ONLY files and matching the given regular expression are being packed. If -x is given then files matching that regular expression are NOT being packed. Optional arguments: -a alias Provide an alias name for the phar file. -c algo Compression algorithm (see COMPRESSION ) -i regex Specifies a regular expression for input files. -l level Number of preceding subdirectories to strip from file entries -x regex Regular expression for input files to exclude. compress command Compress or uncompress all files or a selected entry. Required arguments: -c algo Compression algorithm (see COMPRESSION ) -f file Specifies the phar file to work on. Optional arguments: -e entry Name of entry to work on (must include PHAR internal directory name if any). delete command Delete entry from a PHAR archive Required arguments: -e entry Name of entry to work on (must include PHAR internal directory name if any). -f file Specifies the phar file to work on. extract command Extract a PHAR package to a directory. Required arguments: -f file Specifies the phar file to work on. Optional arguments: -i regex Specifies a regular expression for input files. -x regex Regular expression for input files to exclude. ... Directory to extract to (defaults to '.'). help command This help or help for a selected command. Optional arguments: ... Optional command to retrieve help for. help-list command Lists available commands. info command Get information about a PHAR package. By using -k it is possible to return a single value. Required arguments: -f file Specifies the phar file to work on. Optional arguments: -k index Subscription index to work on. list command List contents of a PHAR archive. Required arguments: -f file Specifies the phar file to work on. Optional arguments: -i regex Specifies a regular expression for input files. -x regex Regular expression for input files to exclude. meta-del command Delete meta information of a PHAR entry or a PHAR package. If -k is given then the metadata is expected to be an array and the given index is being deleted. If something was deleted the return value is 0 otherwise it is 1. Required arguments: -f file Specifies the phar file to work on. Optional arguments: -e entry Name of entry to work on (must include PHAR internal directory name if any). -k index Subscription index to work on. meta-get command Get meta information of a PHAR entry or a PHAR package in serialized from. If no output file is specified for meta data then stdout is being used. You can also specify a particular index using -k. In that case the metadata is expected to be an array and the value of the given index is returned using echo rather than using serialize. If that index does not exist or no meta data is present then the return value is 1. Required arguments: -f file Specifies the phar file to work on. Optional arguments: -e entry Name of entry to work on (must include PHAR internal directory name if any). -k index Subscription index to work on. meta-set command Set meta data of a PHAR entry or a PHAR package using serialized input. If no input file is specified for meta data then stdin is being used. You can also specify a particular index using -k. In that case the metadata is expected to be an array and the value of the given index is being set. If the metadata is not present or empty a new array will be created. If the metadata is present and a flat value then the return value is 1. Also using -k the input is been taken directly rather then being serialized. Required arguments: -f file Specifies the phar file to work on. -m meta Meta data to store with entry (serialized php data). Optional arguments: -e entry Name of entry to work on (must include PHAR internal directory name if any). -k index Subscription index to work on. pack command Pack files into a PHAR archive. When using -s <stub>, then the stub file is being excluded from the list of input files/dirs.To create an archive that contains PEAR class PHP_Archive then point -p argument to PHP/Archive.php. Required arguments: -f file Specifies the phar file to work on. ... Any number of input files and directories. If -i is in use then ONLY files and matching the given regular expression are being packed. If -x is given then files matching that regular expression are NOT being packed. Optional arguments: -a alias Provide an alias name for the phar file. -b bang Hash-bang line to start the archive (e.g. #!/usr/bin/php). The hash mark itself '#!' and the newline character are optional. -c algo Compression algorithm (see COMPRESSION ) -h hash Selects the hash algorithm (see HASH ) -i regex Specifies a regular expression for input files. -l level Number of preceding subdirectories to strip from file entries -p loader Location of PHP_Archive class file (pear list-files PHP_Archive).You can use '0' or '1' to locate it automatically using the mentioned pear command. When using '0' the command does not error out when the class file cannot be located. This switch also adds some code around the stub so that class PHP_Archive gets registered as phar:// stream wrapper if necessary. And finally this switch will add the file phar.inc from this package and load it to ensure class Phar is present. -s stub Select the stub file. -x regex Regular expression for input files to exclude. -y key Private key for OpenSSL signing. sign command Set signature hash algorithm. Required arguments: -f file Specifies the phar file to work on. -h hash Selects the hash algorithm (see HASH ) Optional arguments: -y key Private key for OpenSSL signing. stub-get command Get the stub of a PHAR file. If no output file is specified as stub then stdout is being used. Required arguments: -f file Specifies the phar file to work on. Optional arguments: -s stub Select the stub file. stub-set command Set the stub of a PHAR file. If no input file is specified as stub then stdin is being used. Required arguments: -f file Specifies the phar file to work on. Optional arguments: -b bang Hash-bang line to start the archive (e.g. #!/usr/bin/php). The hash mark itself '#!' and the newline character are optional. -p loader Location of PHP_Archive class file (pear list-files PHP_Archive).You can use '0' or '1' to locate it automatically using the mentioned pear command. When using '0' the command does not error out when the class file cannot be located. This switch also adds some code around the stub so that class PHP_Archive gets registered as phar:// stream wrapper if necessary. And finally this switch will add the file phar.inc from this package and load it to ensure class Phar is present. -s stub Select the stub file. tree command Get a directory tree for a PHAR archive. Required arguments: -f file Specifies the phar file to work on. Optional arguments: -i regex Specifies a regular expression for input files. -x regex Regular expression for input files to exclude. version command Get information about the PHAR environment and the tool version. COMPRESSION
Algorithms: 0 No compression none No compression auto Automatically select compression algorithm gz GZip compression gzip GZip compression bz2 BZip2 compression bzip2 BZip2 compression HASH
Algorithms: md5 MD5 sha1 SHA1 sha256 SHA256 sha512 SHA512 openssl OpenSSL SEE ALSO
For a more or less complete description of PHAR look here: http://php.net/phar BUGS
You can view the list of known bugs or report any new bug you found at: http://bugs.php.net AUTHORS
The PHP Group: Thies C. Arntzen, Stig Bakken, Andi Gutmans, Rasmus Lerdorf, Sam Ruby, Sascha Schumann, Zeev Suraski, Jim Winstead, Andrei Zmievski. Work for the PHP archive was done by Gregory Beaver, Marcus Boerger. A List of active developers can be found here: http://www.php.net/credits.php And last but not least PHP was developed with the help of a huge amount of contributors all around the world. VERSION INFORMATION
This manpage describes phar, version 7.1.19. COPYRIGHT
Copyright (C) 1997-2018 The PHP Group This source file is subject to version 3.01 of the PHP license, that is bundled with this package in the file LICENSE, and is available through the world-wide-web at the following url: http://www.php.net/license/3_01.txt If you did not receive a copy of the PHP license and are unable to obtain it through the world-wide-web, please send a note to license@php.net so we can mail you a copy immediately. The PHP Group 2018 PHAR(1)
All times are GMT -4. The time now is 04:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy