Sponsored Content
Full Discussion: getting pid of process
Operating Systems Solaris getting pid of process Post 302111492 by pressy on Wednesday 21st of March 2007 10:12:17 AM
Old 03-21-2007
small test, seems to work:

Code:
root@mp-wst01 # poolcfg -c 'create pool pressy'
root@mp-wst01 # poolcfg -c 'create pset pressy-set'
root@mp-wst01 # poolcfg -c 'associate pool pressy (pset pressy-set)'
root@mp-wst01 # poolcfg -c 'modify pset pressy-set ( uint pset.min = 1 ; uint pset.max = 2 )'
root@mp-wst01 # pooladm -c
root@mp-wst01 # ps -ef | grep syslogd
    root   489     1   0   Mar 19 ?           0:02 /usr/sbin/syslogd
root@mp-wst01 # poolbind -q 489
489     pool_default
root@mp-wst01 # poolbind -p pressy -i pid `pgrep syslogd`
root@mp-wst01 # poolbind -q 489
489     pressy
root@mp-wst01 #

gP
 

10 More Discussions You Might Find Interesting

1. Programming

Child Process PID

Hi, Can anybody solve this query? A parent process forks 2 child processes. How does the child process know it's PID without the parent process sending it. Apart from the "ps-ef" option, what other options are there if any? (2 Replies)
Discussion started by: skannan
2 Replies

2. Shell Programming and Scripting

Process PID

Hi Friends :p I have a little problem please help me out. I have a Unix based OS Sun Server having oracle 8i as database on it. The server has one client with windows OS. The client uses developer 2000 (GUI) to run query and run processes. I want to know how can I know the PID of a process run... (3 Replies)
Discussion started by: vanand420
3 Replies

3. UNIX for Dummies Questions & Answers

Need to get pid of a process and have to store the pid in a variable

Hi, I need to get the pid of a process and have to store the pid in a variable and i want to use this value(pid) of the variable for some process. Please can anyone tell me how to get the pid of a process and store it in a variable. please help me on this. Thanks in advance, Amudha (7 Replies)
Discussion started by: samudha
7 Replies

4. Shell Programming and Scripting

Get an PID of particular process

Hi I have written a shell script to find and kill the particular process. Here in shell script i have written the code like cnt = $(ps -ef | grep Shree) echo $cnt I am getting the output root 2326 2317 0 14:39:46 pts/1 0:28 Shree -f fdc.fbconf FDCapp.fbapp Here I want to... (2 Replies)
Discussion started by: Shreedhar Naik
2 Replies

5. Shell Programming and Scripting

getting pid from a process

Hi all, i was able to redirect pid of process to a file in the following way ps aux|awk '$11 == "/Applications/ProjectX/DServer" >> /Applications/ProjectX/DServer.pid it works fine but if one folder name caontains space its not working like below ps aux|awk '$11 == "/Applications/Project\... (1 Reply)
Discussion started by: kirankumars
1 Replies

6. Programming

[C] Process pid by name

Hi I use linux OS. I've already written a function that allow me to get the process name by pid. (searching in /proc). Now I'd like to perform the inverse task.I mean get the process pid by its name. I could write a function that search in every folder in /proc for the process name, but i... (2 Replies)
Discussion started by: Dedalus
2 Replies

7. AIX

AIX: PID 0 Process

Hi All, I searched other threads and could not find any relevant post about this. I searched for process 0 in SUN OS and could find the sched/swapper process listed. root 0 0 0 Apr 25 ? 0:06 sched but i couldnt not find the swapper process (PID 0) in AIX. Is that... (4 Replies)
Discussion started by: quintet
4 Replies

8. HP-UX

PID Process Resources

Hi all. I need to get detailed information about a PID. I have an app called Reflection X and it shows many things like Total CPU percent, User CPU (Nice) percent, FS Reads, etc. My question is how can I get all that information on console? Is there an archive with the detailed... (9 Replies)
Discussion started by: the0m3n
9 Replies

9. AIX

Swapper Process #PID more than 1

Hi I would like to know more about swapper process.. I knew that swapper is the first process with PID#0, used to perform process swap operations. It used to swap entire processes But sometimes I find swapper process with PID#264 So my doubt is how many swapper process can exist in a system?... (2 Replies)
Discussion started by: Priya Amaresh
2 Replies

10. AIX

How to get process name from PID?

HI, i used ps -ef | grep 3539052 | grep -v grep and i got a output like ths root 3539052 3407918 0 May 07 - 709:31 /usr/sbin/syslogd but what i need is instead of full path /usr/sbin/syslogd i want only the process name that is 'syslogd' here. (3 Replies)
Discussion started by: sumanthupar
3 Replies
poolcfg(1M)                                                                                                                            poolcfg(1M)

NAME
poolcfg - create and modify resource pool configuration files SYNOPSIS
/usr/sbin/poolcfg -c command [-d | [filename]] /usr/sbin/poolcfg -f command_file [-d | [filename]] /usr/sbin/poolcfg -h The poolcfg command provides configuration operations on pools and sets. These operations are performed upon an existing configuration and take the form of modifications to the specified configuration file. If you use the -d option, the modifications occur to the kernel state. Actual activation of the resulting configuration is achieved by way of the pooladm(1M) command. Pools configuration files are structured files that must have been constructed using poolcfg itself or libpool(3LIB) directly. The configurations which are created by this tool can be used by pooladm to instantiate the configuration upon a target host. The following options are supported: -c command Specify command as an editing command. See USAGE. -d Operate directly on the kernel state. No filename is allowed. -f command_file Take the commands from command_file. command_file consists of editing commands, one per line. -h Display extended information about the syntax of editing commands. Scripts A script consists of editing commands, one per line, of the following: info [entity-name] Display configuration (or specified portion) in human readable form to standard output. If no entity is specified, system information is displayed. Therefore, poolcfg -c 'info' afile is an equivalent invocation to poolcfg -c 'info system name' afile. create entity-name [property-list] Make an entity of the specified type and name. destroy entity-name Remove the specified entity. modify entity-name [property-list] Change the listed properties on the named entity. associate pool-name [resource-list] Connect one or more resources to a pool, or replace one or more existing connections. transfer to [resourcetype] name [component-list] Transfer one or more discrete components to a resource . transfer [quantity] from [resourcetype] [src] to [tgt] Transfer a resource quantity from src to tgt . transfer [quantity] to [resourcetype] [tgt] from [src] Transfer a resource quantity to tgt from src. discover Create a system entity, with one pool entity and resources to match current system configuration. All discovered resources of each resource type are recorded in the file, with the single pool referring to the default resource for each resource type. This command is a NO-OP when poolcfg operates directly on the kernel. See the -d option. You should avoid use of this command. The preferred method for creating a configuration is to export the dynamic configuration using pooladm(1M) with the -s option. rename entity-name to new-name Change the name of an entity on the system to its new name. Property Lists The property list is specified by: ( proptype name = value [ ; proptype name = value ]* ) where the last definition in the sequence for a given proptype, name pair is the one that holds. For property deletion, use ~ proptype name. Resource Lists A resource list is specified by: ( resourcetype name [ ; resourcetype name ]* ) where the last specification in the sequence for a resource is the one that holds. There is no deletion syntax for resource lists. Component Lists A component list is specified by: ( componenttype name [ ; componenttype name ]* ) where the last specification in the sequence for a resource is the one that holds. There is no deletion syntax for component lists. Recognized Entities system Machine level entity pool Named collection of resource associations Resource Types pset Processor set resource Property Types boolean Takes one of two values true or false. int A 64-bit signed integer value. uint A 64-bit unsigned integer value. string Strings are delimited by quotes ("), and support the character escape sequences defined in formats(5). float Scientific notation is not supported. Example 1: Writing a poolcfg Script The following poolcfg script creates a pool named Accounting, and a processor set, small-1. The processor set is created first, then the pool is created and associated with the set. create pset small-1 ( uint pset.min = 1 ; uint pset.max = 4) create pool Accounting associate pool Accounting ( pset small-1 ) Example 2: Reporting on pool_0 The following command reports on pool_0 to standard output in human readable form: # poolcfg -c 'info pool pool_0' /etc/pooladm.conf Example 3: Destroying pool_0 and Its Associations The following command destroys pool_0 and associations, but not the formerly associated resources: # poolcfg -c 'destroy pool pool_0' /etc/pooladm.conf Example 4: Displaying the Current Configuration The following command displays the current configuration: $ poolcfg -c 'info' /etc/pooladm.conf system example_system int system.version 1 boolean system.bind-default true string system.comment Discovered by libpool pool pool_default boolean pool.default true boolean pool.active true int pool.importance 5 string pool.comment string.pool.scheduler FSS pset pset_default pset pset_default int pset.sys_id -1 string pset.units population boolean pset.default true uint pset.max 4294967295 uint pset.min 1 string pset.comment boolean pset.escapable false uint pset.load 0 uint pset.size 2 cpu int cpu.sys_id 0 string cpu.comment cpu int cpu.sys_id 2 string cpu.comment Example 5: Moving cpu with ID 2 to Processor Set pset1 in the Kernel The following command moves cpu with ID 2 to processor set pset1 in the kernel: # poolcfg -dc 'transfer to pset pset1 ( cpu 2 )' Example 6: Moving 2 cpus from Processor Set pset1 to Processor Set pset2 in the Kernel The following command moves 2 cpus from processor set pset1 to processor set pset2 in the kernel: # poolcfg -dc 'transfer 2 from pset pset1 to pset2' 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), poolbind(1M), libpool(3LIB), attributes(5), formats(5) 15 Feb 2005 poolcfg(1M)
All times are GMT -4. The time now is 06:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy