> Hi
> i want to wirte to a log file "AHDXAPI Server is now started running $now_string";to
> the following path
> /proj/ahd02/CAisd/site/mods/scripts/log/init/ahdxapi.init.log
>
>
> #!/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";
> $ret = qx(pgrep -f srvtst26);
> if ($? eq 0){
> $ret = qx(pgrep -f $xapipgm);
> # $proc= qx(ps -e|grep svrtst26);
> print "AHD XAPI SERver Running with Process ID On $now_string";
> }
> else{
> open (LOG,">>/proj/ahd02/CAisd/site/mods/scripts/log/init/ahdxapi.init.log") ||
> Error('open', 'file');
> print LOG "AHDXAPI Server is now started running $now_string";
> close (LOG);
> $ret = qx(perl $xapipgm
> >>/proj/ahd02/CAisd/site/mods/scripts/log/init/ahdxapi.init.log);
> }
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]