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
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
$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
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.
[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
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
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
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.
>
> >
> 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
--
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
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/
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
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/
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
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/
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
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
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/
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
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
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
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
[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
- 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
> -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
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
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
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($
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
> 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
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
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
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
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
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.
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
]
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
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
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
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: [
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
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
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:
-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
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
-
> 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
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
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
48 matches
Mail list logo