Vema Venkata wrote:
> #!/proj/ahd02/CAisd/ActivePerl-5.6.0.618/bin/perl
> #/usr/local/bin/perl
>
> use POSIX qw(strftime);
>
> $now_string = strftime "%a %b %e %H:%M:%S %Y", localtime;
Huh? What is happening here. Your subject line whines for a response, and yet in
your code you totally disreg
On Sep 9, Vema Venkata said:
>How do i get the process id into a variable ?
>
>$pid = qx(ps -f|grep srvtst26);
> print "Server Started : $pid \n
qx() returns the output. You want to use open():
$pid = open PS, "ps -f | grep srvtst26 |"
or die "'ps -f | grep srvtst26' error: $!";
You can
#!/proj/ahd02/CAisd/ActivePerl-5.6.0.618/bin/perl
#/usr/local/bin/perl
use POSIX qw(strftime);
$now_string = strftime "%a %b %e %H:%M:%S %Y", localtime;
$xapipgm = "/proj/ahd02/CAisd/site/mods/scripts/srvtst26.pl";
$pid = qx(pgrep -f srvtst26);
if ($pid =! 0){
print "AHD XAPI SERver Runnin
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 it helps.
The process
there is a var with it already set:
perldoc perlvar
see $PID or $$
On Tue, Sep 09, 2003 at 10:07:43PM +1000, 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
--
Mat Harrison
Techni
Vema Venkata wrote:
How do i get the process id into a variable ?
can any one help
Process Id of what?
$$ will contain the process id your current perl script. perldoc perlvar
If you want to get the process id based on the command name,
Proc::ProcessTable will interest you.
$pid = qx(ps -f|gre
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
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]