Thanks Eric. My machine will run headless in the next few weeks but it won't usually be turned off so the degradation of performance matters. I checked my code and it is highly unlikely that a quit message isn't being sent unless the socket is somehow closed on my end without being properly flushed. I'm using python's sockets. Perhaps some socket options would also be useful. SO_KEEPALIVE and SO_LINGER come to mind. I'd be happy to help you debug or test the issues and beta potential changes. - Mike
-----Original Message----- From: Eric H. Johnson [mailto:[email protected]] Sent: Monday, April 20, 2009 3:25 PM To: 'Enhanced Machine Controller (EMC)' Subject: Re: [Emc-users] Problems with emcrsh using large percentage of CPU Michael, Those are mostly known problems. I have not really experienced the CPU lockup you mention, but I run headless, which means that when ecmrsh is exiting, the system is being turned off too. Although I do see the other problems when doing development. It does check for a broken connection and tries to terminate that socket connection. I will check other socket handling examples, especially in conjunction with pthreads to see if there is a better way to check for broken connections. As for the 97% cpu usage, that almost has to be an infinite loop. So long as the socket read blocks properly, there should be no infinite loops. And a quick look at the code doesn't reveal any obvious way it could get into an infinite loop. I will have to see if I can generate that on my system. Regards, Eric I've been using emcrsh for the last two months and it is a wonderful tool. Thank you. I've noticed that emcrsh doesn't always exit properly. This results in a lingering emcrsh process that eats up 97% of the CPU. Things still work but they work slower. I send a 'quit' message at the end of my code but that may not always happen if there is an error in my script. It appears that the socket isn't smart enough to perform a de facto quit if it is accidentally disconnected. I also (rarely) have trouble with emcrsh working when emc is initialized. ------------------------------------------------------------------------ ------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
