Sponsored Content
Operating Systems AIX Getting process ID in a shell script. Post 302369037 by methyl on Friday 6th of November 2009 09:33:36 AM
Old 11-06-2009
The original problem is in this command:
Quote:
ps -eo pid,comm
The option "comm" to "ps" shows shows the name of the process (in this case "java") not the command used to start the process.

This shows the command line (including the string "jboss"), though it could be truncated.
Code:
ps -eo pid,args

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell Script Dependencies other process

Hi I have two queries regarding Shell script: 1. Lets say there are three process, a.sh, b.sh, and c.sh. Now if I have to run c.sh iff a.sh gets over without any error/exception. what would be the code for that. 2. Suppose our shell script is run after running a sql script in ORACLE. Is... (4 Replies)
Discussion started by: pankajkrmishra
4 Replies

2. UNIX for Dummies Questions & Answers

Shell Script to end process help

I'm trying to write shell script that when invoke, has 2 arguements, or 1. If there's one arguement, then that's the process name. If there's 2, then one is the timeout. USAGE: Assign1.sh <process> <timeout> If no timeout was set, then the default timeout is 15 minutes. So after it read the... (6 Replies)
Discussion started by: NoobieBoobie
6 Replies

3. Shell Programming and Scripting

Shell Script to Kill Process(number of process) Unix/Solaris

Hi Experts, we do have a shell script for Unix Solaris, which will kill all the process manullay, it used to work in my previous env, but now it is throwing this error.. could some one please help me to resolve it This is how we execute the script (and this is the requirement) ... (2 Replies)
Discussion started by: jonnyvic
2 Replies

4. Shell Programming and Scripting

Kill a process from parent shell within a shell script

Hi, I am looking for a solution for the following problem: Im Using tcpdump within a shellskript started in a subshell by using brackets: ( /usr/sbin/tcpdump -i ... -c 1 ) - I want the outout of tcpdump saved in a variable - Than tcpdump-Process in the Subshell should be killed - and I... (6 Replies)
Discussion started by: 2retti
6 Replies

5. Shell Programming and Scripting

Shell script for an db import process

Hello, I would like a to have an script that would accept variables for "foruser" and "touser" during an db import.. I am pasting an sample script below... The "and" in the below script needs to changed..to a correct syntax for i in `cat /tmp/from` and for j in `cat /tmp/to` do {... (2 Replies)
Discussion started by: jjoy
2 Replies

6. Shell Programming and Scripting

Terminate a process using shell script

Hi, I am writing a shell script to run a process and write the output of the process to a file. Inside program.sh: ./process.sh > tempfile .. open tempfile do the following But the problem is that process.sh is running indefinitely and program.sh is not executed completely. Can... (4 Replies)
Discussion started by: dreamgirl314
4 Replies

7. Shell Programming and Scripting

Shell script for process monitoring

Im having a bit of troble coming up with a script that does this monitors processes to see if they die, if they do die, restart the process and write out to a log file that the process was restarted with the new PID and the date and time the new process was launched. Any suggestions? (1 Reply)
Discussion started by: jspinal
1 Replies

8. Shell Programming and Scripting

Shell script validation using process.

Hi All, I have a shell script in Linux and it will be invoked by 2 methods, 1) An automated background process . 2) Logining into the box and directly executing the script. I need to put a validation in my shell script such that it will be executed successfully on when an... (11 Replies)
Discussion started by: vininx
11 Replies

9. Red Hat

How to run a process through shell script.?

hey , i have to write a script to run a process through shell script and if the process runs successfully then return success. i used nohup to start the process but nothing occured . #!/bin/sh nohup ./cvt -f MediationSources.xml & can anyone pls help me Thanks (3 Replies)
Discussion started by: ramsavi
3 Replies

10. Shell Programming and Scripting

Shell Script Process id

Hi I have one doubt while calling a shell scripts from another shell script. suppose i have two shell script abc.sh and xyz.sh i call many instance of xyz.sh in abc.sh when i look at process id's using ps command i can see process ids for abc.sh command bur not a single process id of xyz.sh.... (2 Replies)
Discussion started by: AnkitMogha
2 Replies
PLDD(1)                                                          Linux User Manual                                                         PLDD(1)

NAME
pldd - display dynamic shared objects linked into a process SYNOPSIS
pldd pid pldd option DESCRIPTION
The pldd command displays a list of the dynamic shared objects that are linked into the process with the specified process ID. The list includes the libraries that have been dynamically loaded using dlopen(3). OPTIONS
-?, --help Display program help message. --usage Display a short usage message. -V, --version Display the program version. EXIT STATUS
On success, pldd exits with the status 0. If the specified process does not exist, the user does not have permission to access its dynamic shared object list, or no command-line arguments are supplied, pldd exists with a status of 1. If given an invalid option, it exits with the status 64. VERSIONS
pldd is available since glibc 2.15. CONFORMING TO
The pldd command is not specified by POSIX.1. Some other systems have a similar command. NOTES
The command lsof -p PID also shows output that includes the dynamic shared objects that are linked into a process. The gdb(1) info shared command also shows the shared libraries being used by a process, so that one can obtain similar output to pldd using a command such as the following (to monitor the process with the specified pid): $ gdb -ex "set confirm off" -ex "set height 0" -ex "info shared" -ex "quit" -p $pid | grep '^0x.*0x' BUGS
Since glibc 2.19, pldd is broken: it just hangs when executed. It is unclear if it will ever be fixed. EXAMPLE
$ echo $$ # Display PID of shell 1143 $ pldd $$ # Display DSOs linked into the shell 1143: /usr/bin/bash linux-vdso.so.1 /lib64/libtinfo.so.5 /lib64/libdl.so.2 /lib64/libc.so.6 /lib64/ld-linux-x86-64.so.2 /lib64/libnss_files.so.2 SEE ALSO
ldd(1), lsof(1), dlopen(3), ld.so(8) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. GNU 2017-09-15 PLDD(1)
All times are GMT -4. The time now is 09:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy