08-19-2010
Get Pid from a command output
pariosd -status
NodeName ID ROLE STATE PROTECTION
---------------------------------------------------------------------------
tn320_scm10 10 ACTIVE UP No Protection
tn320_scm11 11 UNKNOWN UNKNOWN
LocalApps PID STATE
-----------------------------------------------
HAM 3567641 RUNNING
SCM 3600404 RUNNING
ADF 3600411 RUNNING
EFM 3600412 RUNNING
WSM 3600413 RUNNING
AOP 3600414 RUNNING
INTDRV 3600415 RUNNING
CONFDPROXY 3600416 RUNNING
SYSCALL 3760161 RUNNING
LOGMGR 3760163 RUNNING
NODEMGR 3772452 RUNNING
ALARMMGR 3797029 RUNNING
ISSU 3797031 RUNNING
CHASMGR 3797032 RUNNING
ETHMGR 3797033 RUNNING
AOPMGR 3797034 RUNNING
ADFMGR 3797035 RUNNING
EFMMGR 3797036 RUNNING
OSCMGR 3797037 RUNNING
WSMMGR 3797038 RUNNING
SERVMGR 3829807 RUNNING
GMPLSNNI 3829808 RUNNING
I need to get the pid for each of the process shown above in sh script.
Please help me
Ravi
---------- Post updated at 04:33 PM ---------- Previous update was at 04:28 PM ----------
To be more specific,
After getting the PID of the process, i need to create a core dump for each of the process. how i can go thru a loop for collecting only the pid necessary
Thanks,
Ravi
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
1. If I use an software application(which connects to the database in the server) in my local pc, how many PID should be registered? Would there be PID for the session and another PID for socket connection?
2. I noticed (through netstat) that when I logged in using the my software application,... (1 Reply)
Discussion started by: pcx26
1 Replies
2. UNIX for Advanced & Expert Users
Hi
Reqmt: I am working on Sys 1 and passes a command to Sys2 using a utility which has ssh coded in it. Is there any way to get the process id of the command in Sys 2 from my Sys1 ? Note: The utility is not editable, so you cannot get it through it and I am not logged in in Sys2.
Thanks... (2 Replies)
Discussion started by: anu_math9
2 Replies
3. UNIX for Dummies Questions & Answers
Hi folks,
Please advise which command/command line shall I run;
1) to display the command and its output on console
2) simultaneous to save the command and its output on a file
I tried tee command as follows;
$ ps aux | grep mysql | tee /path/to/output.txt
It displayed the... (7 Replies)
Discussion started by: satimis
7 Replies
4. Shell Programming and Scripting
Hi All,
I am getting the PID of a process using its name using the following command
in a script
mypid=`ps aux | awk '/test5/ && !/awk/ { print $2 }'`
echo PID is $mypid
The problem is the PID is not getting printed. But when i run the command directly in shell, the PID got printed.
... (2 Replies)
Discussion started by: amio
2 Replies
5. Shell Programming and Scripting
Hi to everybody.
Is it possible to nohup a process and redirect the output to a file containing the PID?
E.g. if
nohup filename > out.nohup
associate the PID=8074 to filename, is it possible to call the output file something like out_8074.nohup instead of out.nohup? By this way it would... (0 Replies)
Discussion started by: plsrn
0 Replies
6. AIX
Hi all,
I am generating the coredump of my JBoss, and by default it puts it in to a particular directory. i.e. JBOSS_HOME/. I would like this output file to be created, lets say in /tmp/dump/.
I tried the following:
kill -3 9404940>/tmp/dump/out.txt
But it created... (3 Replies)
Discussion started by: haroon_a
3 Replies
7. UNIX for Dummies Questions & Answers
Hi everyone,
I am new here in www.unix.com, i found this site because I am looking for an answer to this problem of mine.
I need to know a UNIX command to display an inode's thread id and process id.
Hope someone can help me on this.
Thanks :D (8 Replies)
Discussion started by: rodkun
8 Replies
8. UNIX for Dummies Questions & Answers
Hi,
We've a process on AIX UNIX server which is executed by multiple uses during a day. I wish to create a log file for every time the process is executed. I wish to know how unique are PID(s) on AIX UNIX servers if I were to name the log files with <date> and <PID>?
E.g. If I create my... (1 Reply)
Discussion started by: vkumbhakarna
1 Replies
9. Shell Programming and Scripting
Hi All,
A process completed already and I have the PID. I want to know the which command used for this PID. 'ps' command and '/proc' folder having the list current process only. Is there a way to search completed process PID?
Thanks,
Manimuthu (5 Replies)
Discussion started by: k_manimuthu
5 Replies
10. Shell Programming and Scripting
I am using UNIX to create a script on our system. I have setup my commands to append their output to an outage file. However, some of the commands return no output and so I would like something to take their place.
What I need
The following command is placed at the prompt:
TICLI... (4 Replies)
Discussion started by: jbrass
4 Replies
LEARN ABOUT CENTOS
cpanplus::hacking
CPANPLUS::Hacking(3) User Contributed Perl Documentation CPANPLUS::Hacking(3)
NAME
CPANPLUS::Hacking - developing CPANPLUS
DESCRIPTION
This document attempts to describe how to develop with the CPANPLUS environment most easily, how certain things work and why.
This is basically a quick-start guide to people who want to add features or patches to CPANPLUS.
OBTAINING CPANPLUS
Checkout CPANPLUS from its GIT repository at <https://github.com/jib/cpanplus-devel> .
INSTALLING CPANPLUS
CPANPLUS follows the standard perl module installation process:
perl Makefile.PL
make
make test
make install
CONFIGURING CPANPLUS
When running "perl Makefile.PL" you will be prompted to configure. If you have already done so, and merely wish to update the "Makefile",
simply run:
perl Makefile.PL JFDI=1
This will keep your configuration intact. Note however, if there are changes to the default configuration file "Config.pm-orig", you should
either delete your current config file and reconfigure, or patch your config file from the new entries in "Config.pm-orig".
RUNNING CPANPLUS FROM DEVELOPMENT ENVIRONMENT
If you'd rather not install the development version to your "site_perl" directory, that's no problem. You can set your "PERL5LIB"
environment variable to CPANPLUS' "lib" directory, and you can run it from there.
RUNNING CPANPLUS TESTS
Tests are what tells us if CPANPLUS is working. If a test is not working, try to run it explicitly like this:
perl -I/path/to/cpanplus/lib t/XX_name_of_test.t 1
The extra '1' makes sure that all the messages and errors (they might be errors we're testing for!) are being printed rather than kept
quiet. This is a great way to find out the context of any failures that may occur.
If you believe this test failure proves a bug in CPANPLUS, the long output of the test file is something we'd like to see alongside your
bug report.
FINDING BUGS
Sometimes you might find bugs in CPANPLUS' behaviour. If you encounter these in a development snapshot, we'd appreciate a complete patch
(as described below in the "SENDING PATCHES" section.
If it's way over your head, then of course reporting the bug is always better than not reporting it at all. Before you do so though, make
sure you have the latest development snapshot, and the bug still persists there. If so, report the bug to this address:
bug-cpanplus@rt.cpan.org
A good "patch" would have the following characteristics:
Problem description
Describe clearly what the bug is you found, and what it should have done instead.
Program demonstrating the bug
Show us how to reproduce the bug, in a simple of a program as possible
[OPTIONAL] A patch to the test suite to test for the bug
Amend our test suite by making sure this bug will be found in this, and future versions of CPANPLUS (see "SUPPLYING PATCHES")
[OPTIONAL] A patch to the code + tests + documentation
Fix the bug, update the docs & tests. That way your bug will be gone forever :)
SUPPLYING PATCHES
Patches are a good thing, and they are welcome. Especially if they fix bugs you've found along the way, or that others have reported.
We prefer patches in the following format:
o In "diff -u" or "diff -c" format
o From the root of the snapshot
o Including patches for code + tests + docs
o Sent per mail to bug-cpanplus@rt.cpan.org
o With subject containing "[PATCH]" + description of the patch
You will always be informed if a patch is applied or rejected, and in case of rejection why that is (perhaps you can tweak the patch to
have it accepted after all).
perl v5.16.3 2013-05-12 CPANPLUS::Hacking(3)