To get PID of a command passed to a secondary system


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users To get PID of a command passed to a secondary system
# 1  
Old 06-30-2008
To get PID of a command passed to a secondary system

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
Regards
Anu
# 2  
Old 07-02-2008
Quote:
Originally Posted by anu_math9
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.
If you can't get into the utility used to spawn the process remotely, and you can't connect to the remote sysetm, then no, you can't get the PID on the remote system sorry (unless the utility has an option to return this PID).
# 3  
Old 07-02-2008
Quote:
Originally Posted by Smiling Dragon
If you can't get into the utility used to spawn the process remotely, and you can't connect to the remote sysetm, then no, you can't get the PID on the remote system sorry (unless the utility has an option to return this PID).

Hey! Thank you for that ya.....I was thinking if we could get the codebase of the ssh or any other utility connecting to remote system and extract the PIDs through that.Can anyone send me the link where I can get those codes of utilities in UNIX.

The Utility which I used in shell is the OSC client which connects to servers and get the details.

Regards
Anu
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

Unable to add 300gb secondary disk to running 11.11 HPUX system

This has got to be the system from hell. Once again, on the RP4440 (after the supplier replaced the entire box due to the bad RTC battery), finally have it all reloaded with the packages the developers need. The last thing is to add the secondary disk to the OS. BCH sees both OS and secondary... (2 Replies)
Discussion started by: mrmurdock
2 Replies

2. Shell Programming and Scripting

How to find the corresponding command for a existing PID?

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

3. Shell Programming and Scripting

Variable not passed to the sed command

Hello, I am writing a script which is not giving the desired result. When I check the content of the 'InputFile_009_0.sh', it shows following with missing Index in this command sed -i "s/L1ITMBLT.root/L1ITMBLT_"".root/g" run_DttfFromCombinedPrimitives_cfg.py of . Any help? ... (13 Replies)
Discussion started by: emily
13 Replies

4. Shell Programming and Scripting

Using GID,Secondary ID in useradd command

Hi All, I am writing the script for user creation and want to use GID and Secondary group id from previous similar profile.Any one help me how we will take out GID & Secondary and use in useradd command. $ id -a test uid=6236(test) gid=999(local) groups=999(local),9003(testadmin) Above... (4 Replies)
Discussion started by: susindram
4 Replies

5. Programming

How to get the size of the datatype passed as the command line argumet?

#include <stdio.h> int main(int argc, char *argv) { printf("%d\n", sizeof(argv)); return 0; } when I run the executable a.out after compiling the above program as: a.out short (or) a.out "long double", I expected to get the output as 2 and 12, but I am always getting the size of... (2 Replies)
Discussion started by: royalibrahim
2 Replies

6. Shell Programming and Scripting

shell script for ftp files passed in command line argument

i want to write a shell script function that will ftp the files passed in the command line . i have written a shell script for ftp but how will it do for all files passed in command line argument , i am passing 4 files as argument ./ftp.sh file1 file2 file3 file4 code written by me... (5 Replies)
Discussion started by: rateeshkumar
5 Replies

7. Shell Programming and Scripting

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 ... (5 Replies)
Discussion started by: hariprasad123
5 Replies

8. UNIX for Advanced & Expert Users

Creating System Call, need PID of caller

Hey I am creating a new system call that needs to know the PID of the calling process. I am new to coding in the kernel, so I don't know if this is possible... Any help would be nice. Thanks! Hapatchi (4 Replies)
Discussion started by: Hapatchi
4 Replies

9. Shell Programming and Scripting

How to find pid of PS which executed by perl system function

hello All, I need to invoke by perl script some program/command and monitor it for 5 minutes . In case it still running for more then 5 min I need to send a signal which will stop it. I implemeted this as shown below by using eval & alarm and I'd like to know if there is a better way to... (1 Reply)
Discussion started by: Alalush
1 Replies

10. UNIX for Advanced & Expert Users

how to configure the lp system to filter files passed to it

I registered a printer hp123 on Sun Solaris Server. I think my printer is expecting a carriage return and linefeed combination at the end of each line (DOS standard), but unix files only have linefeeds at the end of each line. How can I configure the lp system to filter files passed to it?... (1 Reply)
Discussion started by: simt
1 Replies
Login or Register to Ask a Question