Sponsored Content
Operating Systems AIX How to get process name from PID? Post 302861617 by Scott on Wednesday 9th of October 2013 09:24:56 AM
Old 10-09-2013
This should work in AIX (although only able to test is on BSD and RHEL):
Code:
ps -p 3539052 -o comm=

For example:
Code:
[root@ns1 /]# ps -ef | grep [1]471
root      1471     1  0 08:02 ?        00:00:00 /sbin/rsyslogd -i /var/run/syslogd.pid -c 5
[root@ns1 /]# ps -p 1471 -o comm=
rsyslogd

This User Gave Thanks to Scott For This Post:
 

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. Solaris

getting pid of process

hi all, Is there a simple script anyone could through out to me, to find the pid of a process given the name. I actually need to bind this pid to a processor set. I would probably put these comamns in a shell script which would have. a) kick start the executable b) get the pid c) bind it to a... (10 Replies)
Discussion started by: Naanu
10 Replies

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
MPI_Bcast(3OpenMPI)													       MPI_Bcast(3OpenMPI)

NAME
MPI_Bcast - Broadcasts a message from the process with rank root to all other processes of the group. SYNTAX
C Syntax #include <mpi.h> int MPI_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm) Fortran Syntax INCLUDE 'mpif.h' MPI_BCAST(BUFFER, COUNT, DATATYPE, ROOT, COMM, IERROR) <type> BUFFER(*) INTEGER COUNT, DATATYPE, ROOT, COMM, IERROR C++ Syntax #include <mpi.h> void MPI::Comm::Bcast(void* buffer, int count, const MPI::Datatype& datatype, int root) const = 0 INPUT
/OUTPUT PARAMETERS buffer Starting address of buffer (choice). count Number of entries in buffer (integer). datatype Data type of buffer (handle). root Rank of broadcast root (integer). comm Communicator (handle). OUTPUT PARAMETER
IERROR Fortran only: Error status (integer). DESCRIPTION
MPI_Bcast broadcasts a message from the process with rank root to all processes of the group, itself included. It is called by all members of group using the same arguments for comm, root. On return, the contents of root's communication buffer has been copied to all processes. General, derived datatypes are allowed for datatype. The type signature of count, datatype on any process must be equal to the type signa- ture of count, datatype at the root. This implies that the amount of data sent must be equal to the amount received, pairwise between each process and the root. MPI_Bcast and all other data-movement collective routines make this restriction. Distinct type maps between sender and receiver are still allowed. Example: Broadcast 100 ints from process 0 to every process in the group. MPI_Comm comm; int array[100]; int root=0; ... MPI_Bcast( array, 100, MPI_INT, root, comm); As in many of our sample code fragments, we assume that some of the variables (such as comm in the example above) have been assigned appro- priate values. WHEN COMMUNICATOR IS AN INTER-COMMUNICATOR When the communicator is an inter-communicator, the root process in the first group broadcasts data to all the processes in the second group. The first group defines the root process. That process uses MPI_ROOT as the value of its root argument. The remaining processes use MPI_PROC_NULL as the value of their root argument. All processes in the second group use the rank of that root process in the first group as the value of their root argument. The receive buffer arguments of the processes in the second group must be consistent with the send buffer argument of the root process in the first group. NOTES
This function does not support the in-place option. ERRORS
Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ func- tions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI:Exception object. Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. Open MPI 1.2 September 2006 MPI_Bcast(3OpenMPI)
All times are GMT -4. The time now is 01:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy