Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Daemon perl script

Reply
Thread Tools

Daemon perl script

 
 
janicehwang1325@yahoo.com
Guest
Posts: n/a
 
      06-13-2006
hi expert,

I have a client program which is running as daemon and send data to the
server program on the remote site. I m in the testing phase. however,
after running the program for 3 days, suddenly the client program is
killed and no longer active in the client site. wat can be the reason
for this? Is setting scheduling priority using 'renice' can solve the
problem?
Appreciate lots if anyone try to give me some idea.

 
Reply With Quote
 
 
 
 
Bart Van der Donck
Guest
Posts: n/a
 
      06-13-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> I have a client program which is running as daemon and send data to the
> server program on the remote site. I m in the testing phase.


Traditionally, the server program would be described as the 'listening'
deamon, not the client. The client is typically a program that builds
up a connection with the deamon and quits after it's done.

> after running the program for 3 days, suddenly the client program is
> killed and no longer active in the client site. wat can be the reason
> for this?


It's unlikely that the server software is authorized to kill processes
at the client. I think you should look for a mechanism at the client
side that is responsible for the kill:
- timeout settings (OS-level, Apache/CGI level, Perl level, CPU
(re)nice-level...)
- client's internal error handling (program, socket, used modules,...)
- this may sound too trivial, but maybe there was a reboot or restart
of some software

I would counsel to investigate the logs as much as possible to see what
happened at kill time. I'm thinking an "unexpected condition" occured
which made the client software decide to quit.

> Is setting scheduling priority using 'renice' can solve the
> problem?


I would say normally not (though it wouldn't hurt to keep a friendly
CPU). But AFAIK such things don't kill processes unless you explicitly
allow them to do so under certain conditions.

Hope this helps,

--
Bart

 
Reply With Quote
 
 
 
 
farans
Guest
Posts: n/a
 
      06-13-2006
On Mon, 12 Jun 2006 18:27:23 -0700, (E-Mail Removed) wrote:

> hi expert,
>
> I have a client program which is running as daemon and send data to the
> server program on the remote site. I m in the testing phase. however,
> after running the program for 3 days, suddenly the client program is
> killed and no longer active in the client site. wat can be the reason
> for this? Is setting scheduling priority using 'renice' can solve the
> problem?
> Appreciate lots if anyone try to give me some idea.


I don't have an answer for you, only a question:

What were your daemons "last words"?

 
Reply With Quote
 
xhoster@gmail.com
Guest
Posts: n/a
 
      06-13-2006
"(E-Mail Removed)" <(E-Mail Removed)> wrote:
> hi expert,
>
> I have a client program which is running as daemon and send data to the
> server program on the remote site. I m in the testing phase. however,
> after running the program for 3 days, suddenly the client program is
> killed and no longer active in the client site. wat can be the reason
> for this?


There are many. Out of memory, machine reboot, untrapped signal, seg
fault, a perl "die" or "exit" statement was executed, etc. Does your
daemon keep a log file? Does it use it? Have you looked at it?

> Is setting scheduling priority using 'renice' can solve the
> problem?


If the problem is that someone said "What the heck is the program doing
taking all my CPU time?" and then went and killed it (Either because they
are the same user as is running the daemon, or because they have access to
root), then renicing it might solve the problem. Otherwise, it probably
won't.

Xho

--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
 
Reply With Quote
 
janicehwang1325@yahoo.com
Guest
Posts: n/a
 
      06-14-2006
thanks all for the comments. it's really helpful to me. actually after
renicing the program, the program do run without any "killing".
however, my supervisor is changing his mind and the progarm is now
changed. I have another problem occur n will post in another message
later. Pls feel free to have a look

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: PEP 3143: Standard daemon process library (was: Writing awell-behaved daemon) Floris Bruynooghe Python 1 03-24-2009 02:58 PM
Re: PEP 3143: Standard daemon process library (was: Writing awell-behaved daemon) Jean-Paul Calderone Python 0 03-20-2009 01:02 PM
Daemon Win32::Daemon; ph1975@gmail.com Perl Misc 0 09-07-2006 10:58 AM
Perl Help - Windows Perl script accessing a Unix perl Script dpackwood Perl 3 09-30-2003 02:56 AM
get messages from background task to log file (start-stop-daemon with perl script stderr) Grischa Schuering Perl Misc 1 09-29-2003 11:53 PM



Advertisments