Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How a process can check if a particular process is running on different machine? Post 302650263 by saurabhnsit2001 on Saturday 2nd of June 2012 03:37:28 AM
Old 06-02-2012
How a process can check if a particular process is running on different machine?

I have process1 running on one machine and generating some log file. Now another process which can be launched on any machine wants to know if process1 is running or not and also in case it is running it wants to stream the logs file generated by process1 on terminal from which process2 is launched.

Process2 will be invoked as follows: process2 -dir "DirPath". In this DirPath process1 has written a file which has information like "pid of process1", "hostname of process 1" and "log file of process1". So process2 can access this file and has all the information about process1. Now process2 wants to know if process1 is currently running or not and if it is running then it needs to stream data written by process1 in logfile to the terminal from which process2 is launched.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to check if another instance of the process is running

Hi, I am writing a shell script to invoke a C++ program. Before I start the C++ program (oi7loadbalancer), I am checking if the process is already running. I start the process only if it is not already running. I have the following check in my script. proccount=`ps -f -u $USER_NAME | grep... (8 Replies)
Discussion started by: sim
8 Replies

2. UNIX for Dummies Questions & Answers

leave a process running in a remote machine

Hi, I would like to run a process in my gentoo machine from a consolte (putty) in Windows and would like that this process keep on going when I close the console in Windows (i.e closing this session). The process should take a long time and I do not want to leave the Windows machine running... (3 Replies)
Discussion started by: pbasil
3 Replies

3. Shell Programming and Scripting

check process running

I have this script: ------------------------------------------------------- #!/bin/ksh # if ] || ] then echo "Executing main_load.sh script" /usr1/psc_load/jobs/cron/main_load.sh "ods" else echo "File not found, do nothing" fi exit 0 ... (4 Replies)
Discussion started by: rose1207
4 Replies

4. Solaris

Check whether ftpd process is running or not?

Hi, I want to check whether the ftpd process is running or not. Is there any solaris command that can help me in this? Or is there any other way in which I can check this? Is it possible to check programmatically (preferrably in a C++ code)? Eagerly awaiting a reply. Thanx. (8 Replies)
Discussion started by: The.White.Rider
8 Replies

5. UNIX for Advanced & Expert Users

how to check how long the process has been running.

I have a requirement to check how long a process is running on unix system.If i use ps -ef i am getting the following message guest 2453638 1998920 0 16:16:05 - 0:00 dsapi_slave 9 8 0 but this is showing only time not the date.Can any one please advice me any script to find out how... (2 Replies)
Discussion started by: ukatru
2 Replies

6. Shell Programming and Scripting

Check if Process is running

Hi , I have a csh code below which check the process if it's running. Can any expert advise me on the following: 1) what does this notationmean ">!" and how is it different from the append ">" notation ? 2) how does "setenv" work in this code ? # Check whether there is a running... (3 Replies)
Discussion started by: Raynon
3 Replies

7. UNIX and Linux Applications

How to check if process is running?

Hi I would like to check if an instance of a script is already running. I've seen many different examples, but I haven't the slightest idea as to how to do this. Can you please help. Thank you. (5 Replies)
Discussion started by: ladyAnne
5 Replies

8. Programming

How do I check if a process is running in C

How to I check if a process is running in C? I'm trying to use ps aux |grep "process name" but failing in doing that. How do I do that? Thanks, (1 Reply)
Discussion started by: cprogdude
1 Replies

9. Shell Programming and Scripting

need to check if the process is running

Hi, I check if the process is running or not using the below. /usr/ucb/ps auxww | grep 109 |grep rmi | awk '{print $2}' 9718 Thus we see 9718 is the PID. It return blank if the process is not running. I need to perform some action if the process is not running and leave it if... (8 Replies)
Discussion started by: shifahim
8 Replies

10. UNIX for Beginners Questions & Answers

Idle command to kill the process running n unx box machine

Hi Team , I have one process named as cec_analysiseool that is running on unix box machine now i want to kill this process so please advise what will be the ideal command to kill this , what i have tried is :confused: kill -9 `ps -ef | grep cec_analysiseool | grep -v grep | awk '{print $2}'` (2 Replies)
Discussion started by: unclesamm
2 Replies
L2TPNS(8)						    System Management Commands							 L2TPNS(8)

NAME
l2tpns - Layer 2 tunneling protocol network server (LNS) SYNOPSIS
l2tpns [-d] [-v] [-c file] [-h hostname] DESCRIPTION
l2tpns is a daemon for terminating layer 2 tunneling protocol (L2TP: RFC 2661) sessions. Once running, l2tpns may be controlled by telnetting to port 23 on the machine running the daemon and with the nsctl utility. OPTIONS
-d Detach from terminal and fork into the background. By default l2tpns will stay in the foreground. -v Increase verbosity for debugging. Can be used multiple times. -c file Specify configuration file. -h hostname Force hostname to hostname. FILES
/etc/l2tpns/startup-config The default configuration file. /etc/l2tpns/ip_pool IP address pool configuration. /etc/l2tpns/users Username/password configuration for access to admin interface. SIGNALS
SIGHUP Reload the config from disk and re-open log file. SIGTERM, SIGINT Stop process. Tunnels and sessions are not terminated. This signal should be used to stop l2tpns on a cluster node where there are other machines to continue handling traffic. SIGQUIT Shut down tunnels and sessions, exit process when complete. SEE ALSO
startup-config(5), nsctl(8) AUTHOR
This manual page was written by Jonathan McDowell <noodles@earth.li>, for the Debian GNU/Linux system (but may be used by others). L2TPNS 2005/06/12 06:09:35 L2TPNS(8)
All times are GMT -4. The time now is 09:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy