Daemon perl script

J

janicehwang1325

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.
 
B

Bart Van der Donck

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,
 
F

farans

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"?
 
X

xhoster

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
 
J

janicehwang1325

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,141
Latest member
BlissKeto
Top