Sponsored Content
Top Forums Shell Programming and Scripting Determine Number of Processes Running Post 302151815 by Tytalus on Monday 17th of December 2007 12:33:06 PM
Old 12-17-2007
ps -ef | wc -l
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

$A is a number / any other string? How to determine ?

I have a variable (say $A) and while passing it gets either a number or some other string. Now how can test (with if else) whether the variable is just a ne or something else ? Thanks a lot to all in advance C Saha (2 Replies)
Discussion started by: csaha
2 Replies

2. Programming

In C Program, determine if job is running

Is it possible to run the following Unix command in a C program and obtain results as to whether the job is running or not? ps -ef | grep 'job_name' | grep -v grep I'm fairly new at C and need to know what code I'd need in the C program. Thanks, in advance, for your assistance. (12 Replies)
Discussion started by: BCarlson
12 Replies

3. Shell Programming and Scripting

Keep a certain number of background processes running

I've got a bit of code I'm trying to work on... What i want to happen is ... at all times have four parallel mysql dump and imports running. I found the follow code snippet on the forum and modified it to work by starting four concurrent processes but it waits until all four are done before... (7 Replies)
Discussion started by: dgob123
7 Replies

4. UNIX for Advanced & Expert Users

How to determine the number of NFS threads RUNNING on the system

Hi, Anyone can tell me how to get the number of NFS threads RUNNING on the system for Solaris 10? Someone told me for Solaris 9, the method is "echo "*svc$<svcpool" | adb -k. But, I've tried to google the method for Solaris 10 and did not find the corresponding method, please help... (1 Reply)
Discussion started by: wang.caiqi
1 Replies

5. Shell Programming and Scripting

How to Control Number of Processes Running

Hi Is there a way to count how many processes a script has started, count how many of these have finished, and make the script wait if their difference goes over a given threshold? I am using a script to repeatedly execute a code (~100x) which converts 2 data files into one .plt which is in... (4 Replies)
Discussion started by: drbones
4 Replies

6. Shell Programming and Scripting

determine the active processes on the system which are running since long time

Hi , Please help me shell script to determine the active processes on the system which are running since long time (2 Replies)
Discussion started by: itian2010
2 Replies

7. Shell Programming and Scripting

determine the number of spaces

Here is a weird question :) i am trying to create a script written in bash that will create configuration files for nagios. As some of you aware is has to be written in the below format: define service{ option1 value1 option2 value2... (6 Replies)
Discussion started by: ppolianidis
6 Replies

8. UNIX for Dummies Questions & Answers

How do you print the number of processes that each user is currently running in Unix?

Ok, so I know there's a way to do this, but I've been trying to find out all afternoon with no luck. I think it should print out something like this: 1 bin 2 daemon 6 duo Where the numbers on the left are the number of processes being run by the user whose name is listed on the right. Is... (4 Replies)
Discussion started by: Duo11
4 Replies

9. UNIX for Dummies Questions & Answers

Determine maximum allowable processes on a platform

Hello Unix gurus, I'm creating this analysis to determine whether the maximum allowable process is nearly reached then alarm the user with it. Can someone please help me on how I can determine the maximum allowable process that a platform can handle? BTW, below are the details that might be... (0 Replies)
Discussion started by: Jin_
0 Replies

10. UNIX for Dummies Questions & Answers

How do I find the number of processes running on root?

Is there a certain man command I'm missing here? I searched in ps but I couldn't find something that would give me the number of processes running on root. I only want to see the number of processes, not the processes itself. (2 Replies)
Discussion started by: l3monz
2 Replies
poolbind(1M)															      poolbind(1M)

NAME
poolbind - bind processes, tasks, or projects or query binding of processes to resource pools SYNOPSIS
/usr/sbin/poolbind -p poolname [ -i idtype] id... /usr/sbin/poolbind -q pid... /usr/sbin/poolbind -Q pid... The poolbind command allows an authorized user to bind zones, projects, tasks, and processes to pools. It can also allow a user to query a process to determine which pool the process is bound to. The following options are supported: -i idtype This option, together with the idlist arguments, specifies one or more processes to which the poolbind command is to apply. The inter- pretation of idlist depends on the value of idtype. The valid idtype arguments and corresponding interpretations of idlist are as fol- lows: pid idlist is a list of process IDs. Binds the specified processes to the specified pool. This is the default behavior if no idtype is specified. taskid idlist is a list of task IDs. Bind all processes within the list of task IDs to the specified pool. projid idlist is a list of project IDs. Bind all processes within the list of projects to the specified pool. Each project ID can be spec- ified as either a project name or a numerical project ID. See project(4). zoneid idlist is a list of zone IDs. Bind all processes within the list of zones to the specified pool. Each zone ID can be specified as either a zone name or a numerical zone ID. See zones(5). -p poolname Specifies the name of a pool to which the specified zone, project, tasks, or processes are to be bound. -q pid ... Queries the pool bindings for a given list of process IDs. If the collection of resources associated with the process does not corre- spond to any currently existing pool, or if there are multiple pools with the set of resources that the process is bound to, the query fails for that particular process ID. -Q pid ... Queries the resource bindings for a given list of process IDs. The resource bindings are each reported on a separate line. Example 1: Binding All Processes The following command binds all processes in projects 5 and 7 to the pool web_app: example# /usr/sbin/poolbind -p web_app -i projid 5 7 Example 2: Binding the Running Shell The following command binds the running shell to the pool web_app: example# /usr/sbin/poolbind -p web_app $$ Example 3: Querying the Pool Bindings The following command queries the bindings to verify that the shell is bound to the given pool: example# /usr/sbin/poolbind -q $$ Example 4: Querying the Resource Bindings The following command queries the bindings to verify that the shell is bound to the given resources: example# /usr/sbin/poolbind -Q $$ The following exit values are returned: 0 Successful completion. 1 Requested operation could not be completed. 2 Invalid command line options were specified. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWpool | +-----------------------------+-----------------------------+ |Interface Stability | See below. | +-----------------------------+-----------------------------+ The invocation is Evolving. The output is Unstable. pooladm(1M), poolcfg(1M), libpool(3LIB), project(4), attributes(5), zones(5) System Administration Guide: N1 Grid Containers, Resource Management, and Solaris Zones 3 Feb 2005 poolbind(1M)
All times are GMT -4. The time now is 01:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy