I have heard that is possible for a perl script to *unintentionally* kill an OS, by using all the system's available memory or maxing out available processes. I believe failing to close file handles is one such example of how this can happen.
So my question is, how can you tell if your program is a memory hog, or is forking processes unbeknownst? Will 'ps -aux|grep me' show these processes. Will using the '-w' directive prevent it? I'm confident nothing I've written is a problem, some of the modules, not so much. Also, does it matter if the script runs as a cronjob?
I'm making the switch to mod_perl at some point so I rather find out sooner, rather than later these potential problems.
I'm on Debian. Any insight into any of this would be greatly appreciated -
J
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.