Re: port details from the process id

2016-01-04 Thread perl kamal
Thanks for your valuable comments. On Thu, Dec 24, 2015 at 2:09 AM, Shlomi Fish wrote: > Hi perl kamal, > > On Wed, 23 Dec 2015 19:58:04 +0530 > perl kamal wrote: > > > Hi, > > I am trying to retrieve the port details by the process id as like below, > > but i

Re: port details from the process id

2015-12-23 Thread Shlomi Fish
Hi perl kamal, On Wed, 23 Dec 2015 19:58:04 +0530 perl kamal wrote: > Hi, > I am trying to retrieve the port details by the process id as like below, > but it fails. > my $port = `ss -l -p -n | grep $pid| grep -v grep 2>&1`; > In addition to what Andrew said, note that

Re: port details from the process id

2015-12-23 Thread Andrew Solomon
$port); this will be removed. Andrew On Wed, Dec 23, 2015 at 2:28 PM, perl kamal wrote: > Hi, > I am trying to retrieve the port details by the process id as like below, > but it fails. > my $port = `ss -l -p -n | grep $pid| grep -v grep 2>&1`; > > When I manually issue the c

port details from the process id

2015-12-23 Thread perl kamal
Hi, I am trying to retrieve the port details by the process id as like below, but it fails. my $port = `ss -l -p -n | grep $pid| grep -v grep 2>&1`; When I manually issue the command with the pid, it yields the output. Will you please suggest/correct me.Thanks.

Re: getting process id under NT

2008-08-03 Thread Ron Bergin
[EMAIL PROTECTED] (Happytown) wrote: > > > > > > On Jul 26, 3:14 am, [EMAIL PROTECTED] (Epanda) wrote: > > > > > > > Hi, > > > > > > > I would like to know if it is possible to get win32 process ID under > > > > > > Win

Re: getting process id under NT

2008-08-02 Thread epanda
gt; > > I have seen your web link but I don't think it can show me the PID if > > > I give the name of an existing and running Win NT application. > > > > > On 28 juil, 05:24, [EMAIL PROTECTED] (Happytown) wrote: > > > > > > On Jul 26, 3:14�am, [EMA

Re: getting process id under NT

2008-07-30 Thread happytown
and running Win NT application. > > > On 28 juil, 05:24, [EMAIL PROTECTED] (Happytown) wrote: > > > > On Jul 26, 3:14 am, [EMAIL PROTECTED] (Epanda) wrote: > > > > > Hi, > > > > > I would like to know if it is possible to get win32 process ID un

Re: getting process id under NT

2008-07-29 Thread Ron Bergin
gt; > > On Jul 26, 3:14 am, [EMAIL PROTECTED] (Epanda) wrote: > > > > Hi, > > > > I would like to know if it is possible to get win32 process ID under > > > Windows NT without using Win32::OLE because this one does not work > > > under NT. > > >

Re: getting process id under NT

2008-07-29 Thread epanda
> I would like to know if it is possible to get win32 process ID under > > Windows NT without using Win32::OLE because this one does not work > > under NT. > > > Thanks > > Maybe, this module can help > you:http://search.cpan.org/~cosimo/Win32-API-0.55/API.pm --

Re: getting process id under NT

2008-07-28 Thread happytown
On Jul 26, 3:14 am, [EMAIL PROTECTED] (Epanda) wrote: > Hi, > > I would like to know if it is possible to get win32 process ID under > Windows NT without using Win32::OLE because this one does not work > under NT. > > Thanks Maybe, this module can help you: http://search.c

getting process id under NT

2008-07-26 Thread epanda
Hi, I would like to know if it is possible to get win32 process ID under Windows NT without using Win32::OLE because this one does not work under NT. Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Process ID

2007-09-24 Thread Matthew Whipple
perldoc -funtie or more thoroughly perldoc perltie untie is the way to go if you're dealing with a tied variable...if you're not then it won't do anything (or at least it shouldn't). The perltie doc will also hint at the greater range of tie'ing available above database hashes. Somu wrote: > I

Process ID

2007-09-24 Thread Somu
I meant untie $process ; instead of the close function. In the docs, it says untie is better than close. Why is it so? I only use untie while closing perl database hashes.. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Process ID

2007-09-24 Thread Matthew Whipple
untie or unlink? You had used unlink previously which closed and deleted a temporary file while close only closes the file which would be the proper way to terminate a pipe such as used in the solution. Somu wrote: > Great! Thanks.. How about using untie instead of close? Can i know , > phat is

Process ID

2007-09-24 Thread Somu
Great! Thanks.. How about using untie instead of close? Can i know , phat is the difference between the two? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Process ID

2007-09-24 Thread John W. Krahn
Ken Foskey wrote: On Mon, 2007-09-24 at 05:13 +0530, Somu wrote: Thanks for the help. I did it using system "tasklist >> temp"; open FH , "temp" ; statements.. unlink ("temp"); #EOF Consider this code snippet then, does this in one step. I am writing the output to a log only you can put

Re: Process ID

2007-09-24 Thread Ken Foskey
On Mon, 2007-09-24 at 05:13 +0530, Somu wrote: > Thanks for the help. I did it using > > system "tasklist >> temp"; > > open FH , "temp" ; > statements.. > unlink ("temp"); #EOF Consider this code snippet then, does this in one step. I am writing the output to a log only you can put all the

Process ID

2007-09-23 Thread Somu
Thanks for the help. I did it using system "tasklist >> temp"; open FH , "temp" ; statements.. unlink ("temp"); #EOF -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Process ID

2007-09-23 Thread shmoib
On Sep 18, 5:34 pm, [EMAIL PROTECTED] (Steve Bertrand) wrote: > Somu wrote: > > How do i find out the process id of any process. When we see the task > > manager in Windows, we can see the programs running in the PC. Is > > there any way to know the same with perl? Does pr

Re: Process ID

2007-09-18 Thread Steve Bertrand
Somu wrote: > How do i find out the process id of any process. When we see the task > manager in Windows, we can see the programs running in the PC. Is > there any way to know the same with perl? Does process id of a program > change each time the program is run? #!/usr/bin/perl

Re: Process ID

2007-09-18 Thread Chas Owens
On 9/18/07, Somu <[EMAIL PROTECTED]> wrote: > How do i find out the process id of any process.When we see the task > manager in Windows, we can see the programs running in the PC. Is > there any way to know the same with perl? This is system dependent. For MS Windows machines try

Process ID

2007-09-18 Thread Somu
How do i find out the process id of any process. When we see the task manager in Windows, we can see the programs running in the PC. Is there any way to know the same with perl? Does process id of a program change each time the program is run? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Fork - Process ID

2005-05-09 Thread John W. Krahn
[EMAIL PROTECTED] wrote: The reason your code prints pid twice, is in the placement of your print statment. Since you placed your print code after your fork statment, both parent and child read that statment. Inside that block Parent will see pid of ' 0 ' for child, which is normaly a condition use

Re: Fork - Process ID

2005-05-09 Thread mgoland
- Original Message - From: "Paul D. Kraus" <[EMAIL PROTECTED]> Date: Monday, May 9, 2005 10:18 am Subject: Fork - Process ID > Sceniro. > I have many cron jobs that run perl scripts. These perl scripts launch > TbredBasic Applications. The problem I keep findi

RE: Fork - Process ID

2005-05-09 Thread Larsen, Errin M HMMA/IT
> -Original Message- > From: Paul D. Kraus [mailto:[EMAIL PROTECTED] > Sent: Monday, May 09, 2005 9:19 AM > To: Perl Beginners List > Subject: Fork - Process ID > > > Sceniro. > I have many cron jobs that run perl scripts. These perl > scripts launc

Fork - Process ID

2005-05-09 Thread Paul D. Kraus
always BASIC. I wanted to write a program that would write out the process id and the perl program that spawned it to a file then destroy that file when the program fails. This way I can just look at the "log" and see that program X is what keeps hanging. So I have been experminting wit

Re: process id (pls do reply)

2003-09-09 Thread Gavin Laking
On Tue, 9 Sep 2003 22:07:43 +1000 [EMAIL PROTECTED] (Vema Venkata) wrote: > How do i get the process id into a variable ? > can any one help > > $pid = qx(ps -f|grep srvtst26); > print "Server Started : $pid \n Try giving a description of your problem in the subject line i

Re: PROCESS ID

2003-08-27 Thread david
Eric Walker wrote: > Hello all > I want to us the variable $< to get the REAL UID of the perl program > that is running. How can I get the users name from that number it gives > me? the getpwuid function in scalar context gives you the user of the uid: [panda]$ perl -le 'print scalar getpwuid($

RE: PROCESS ID

2003-08-27 Thread Eric Walker
I don'tknow if this is the best way but I ended up doing this: my $UID = getpwuid($<); my @GROUPS = split(" ",`groups $UID`); Which gets the groups that the user who is running my script belongs too. correct me if I am wrong? EDOG On Wed, 2003-08-27 at 16:00, Dan Muey wrote: > Hello all

RE: PROCESS ID

2003-08-27 Thread Dan Muey
> Hello all Howdy > I want to us the variable $< to get the REAL UID of the perl > program that is running. How can I get the users name from > that number it gives me? Depends on the system. Have you looked on cpan for a module that does that? You can always qx() the same way you'd do it

PROCESS ID

2003-08-27 Thread Eric Walker
Hello all I want to us the variable $< to get the REAL UID of the perl program that is running. How can I get the users name from that number it gives me? Thanks Eric Walker

Re: obtaining a process ID.

2002-12-13 Thread Mark Goland
ber 13, 2002 1:48 PM Subject: Re: obtaining a process ID. > > Thanks all for the suggestions. > > Looks like I'm stuck using the ps command. I'm writing this script on an > appliance system with very limited perl modules loaded (can't load more > because it needs

Re: obtaining a process ID.

2002-12-13 Thread be.gomes
hu, 12 Dec 2002 12:09:02 -0500 zentara <[EMAIL PROTECTED]> wrote: > On Wed, 11 Dec 2002 18:38:31 -0500, > [EMAIL PROTECTED] (B-E-G > Gomes) wrote: > > > > >Looking for a simple method of getting a > single process ID (for a > >process such as syslogd) and s

Re: obtaining a process ID.

2002-12-12 Thread John W. Krahn
Be Gomes wrote: > > I am familiar with ps, this is how I am currently getting the process ID: > > #!/usr/bin/perl -w > use strict; > my $pid = `ps -axo pid,ucomm |grep proxyd|cut -f 1 -d \"p\"`; > > But I was wondering if anyone new another means of doing s

Re: obtaining a process ID.

2002-12-12 Thread zentara
On Wed, 11 Dec 2002 18:38:31 -0500, [EMAIL PROTECTED] (B-E-G Gomes) wrote: > >Looking for a simple method of getting a single process ID (for a >process such as syslogd) and store it in a scalar. > >I've found a few methods of doing so but they haven't been pretty.

Re: obtaining a process ID.

2002-12-12 Thread Sudarshan Raghavan
On Thu, 12 Dec 2002, Ramprasad A Padmanabhan wrote: > No Mystik he did not mean own PID he meant PID of any process > > the only way you can do it is with ps or send a mail to a unix group > for better ideas > > I always do this > > chomp($PID = `ps -ax |grep -v grep |grep $PROCESS | awk

Re: obtaining a process ID.

2002-12-12 Thread Ramprasad A Padmanabhan
] From: <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: Ramprasad A Padmanabhan <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED], B-E-G Gomes <[EMAIL PROTECTED]>, [EMAIL PROTECTED] Subject: Re: obtaining a process ID. Date: Thu, 12 Dec 2002 07:32:33 -0500 I am familiar

Re: obtaining a process ID.

2002-12-12 Thread Mystik Gotan
SN: [EMAIL PROTECTED] From: <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: Ramprasad A Padmanabhan <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED], B-E-G Gomes <[EMAIL PROTECTED]>, [EMAIL PROTECTED] Subject: Re: obtaining a process ID. Date: Thu, 12 Dec 2002 07:32:33 -05

Re: obtaining a process ID.

2002-12-12 Thread be.gomes
I am familiar with ps, this is how I am currently getting the process ID: #!/usr/bin/perl -w use strict; my $pid = `ps -axo pid,ucomm |grep proxyd|cut -f 1 -d \"p\"`; But I was wondering if anyone new another means of doing so. Thanks. -gomes On Thu, 12 Dec 2002 13:24:20 +0530 R

Re: obtaining a process ID.

2002-12-11 Thread Ramprasad A Padmanabhan
man ps B-E-G Gomes wrote: Looking for a simple method of getting a single process ID (for a process such as syslogd) and store it in a scalar. I've found a few methods of doing so but they haven't been pretty. I'm taking suggestions :) -gomes -- To unsubscribe, e-mail: [

obtaining a process ID.

2002-12-11 Thread B-E-G Gomes
Looking for a simple method of getting a single process ID (for a process such as syslogd) and store it in a scalar. I've found a few methods of doing so but they haven't been pretty. I'm taking suggestions :) -gomes -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additio

Re: Grabbing a process ID

2002-10-31 Thread Felix Geerinckx
on Wed, 30 Oct 2002 19:48:24 GMT, [EMAIL PROTECTED] (Guy Davis) wrote: > I am calling another perl script and it has failed occasionally > from errors that I have not yet tracked down. What I want to do is > grab and store the process id. Then check to see if that process > id is s

Re: Grabbing a process ID

2002-10-30 Thread John W. Krahn
Charlotte Oliver wrote: > > Additionally, if you're looking for a particular process, you could do: > > ps -aux | grep "processname" > > That will limit the output only to the particular thing you're looking > for, but will show all instances of it. Of course if you are on Linux you could do:

RE: Grabbing a process ID

2002-10-30 Thread Beau E. Cox
-Original Message- From: Guy Davis [mailto:guy@;yournaturewithin.com] Sent: Wednesday, October 30, 2002 9:48 AM To: [EMAIL PROTECTED] Subject: Grabbing a process ID If I'm using the system command on a linux box is there any way to get the process id returned? I am calling another perl

RE: Grabbing a process ID

2002-10-30 Thread Kipp, James
information on forking in the recent archives of this mail list: http://archive.develooper.com/beginners@;perl.org/ > -Original Message- > From: Guy Davis [mailto:guy@;yournaturewithin.com] > Sent: Wednesday, October 30, 2002 2:48 PM > To: [EMAIL PROTECTED] > Subject: Grabbi

RE: Grabbing a process ID

2002-10-30 Thread Charlotte Oliver
- > From: Tucker, Ernie [mailto:ETucker@;chartercom.com] > Sent: Wednesday, October 30, 2002 2:48 PM > To: 'Guy Davis'; [EMAIL PROTECTED] > Subject: RE: Grabbing a process ID > > > ps -aux > > -Original Message- > From: Guy Davis [mailto:guy@;yournaturewithi

RE: Grabbing a process ID

2002-10-30 Thread Tucker, Ernie
ps -aux -Original Message- From: Guy Davis [mailto:guy@;yournaturewithin.com] Sent: Wednesday, October 30, 2002 1:48 PM To: [EMAIL PROTECTED] Subject: Grabbing a process ID If I'm using the system command on a linux box is there any way to get the process id returned? I am ca

Grabbing a process ID

2002-10-30 Thread Guy Davis
If I'm using the system command on a linux box is there any way to get the process id returned? I am calling another perl script and it has failed occasionally from errors that I have not yet tracked down. What I want to do is grab and store the process id. Then check to see if that proce