Click here to get back home

? about using multi-level menu system using dispatch method

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
? about using multi-level menu system using dispatch method mmccaws2 04-09-2008
Posted by mmccaws2 on April 9, 2008, 12:25 pm
Please log in for more thread options
It's a general question on how do I make sure that I'm not eating up
memory unnecessarily. I have a script that is used as a user
interface to:
monitoring the status of application's several scripts,
stopping, starting, and creating projects within the application

A project is defined as the set of actions required to be implemented
by the collection of scripts. All the settings are stored in a DB by
this script, then the script can start and stop the application's set
of scripts.

The question is how do I make sure that I'm not unnecessarily eating
memory (is this what you may call creating zombies?). How do I go
about monitoring those resources. Is there a good link or book
addressing this?

Thanks
Mike


Posted by RedGrittyBrick on April 9, 2008, 12:45 pm
Please log in for more thread options
mmccaws2 wrote:
> It's a general question

This is a general answer.

> on how do I make sure that I'm not eating up
> memory unnecessarily.

My first step would be to find out if, in fact, memory is being eaten up
uneccessarily. I'd monitor the program over an extended period of time
using the tools provided by the operating system that show the program's
memory usage.


> I have a script that is used as a user
> interface to:
> monitoring the status of application's several scripts,
> stopping, starting, and creating projects within the application
>
> A project is defined as the set of actions required to be implemented
> by the collection of scripts. All the settings are stored in a DB by
> this script, then the script can start and stop the application's set
> of scripts.


> The question is how do I make sure that I'm not unnecessarily eating
> memory (is this what you may call creating zombies?).

Processes on a Unix-like operating system which have finished their work
wait to tell their parents their exit code - they wait for their parent
to "reap" them. If the parents have lost interest in them, the parents
never "reap" the children and the children, have finished (died) but are
unable to part the mortal plane - they are zombies. This is usually the
result of a programming bug (usually in your program rather than the
language/compiler etc).

AFAIK zombies usually consume minimal resources in terms of memory, etc,
but occupy slots in the process table such that it if they multiply in
an unlimited way, the OS may eventually be unable to start any new
process due to lack of resources (like process table slots). It is a
long time since I first encountered this so the details may differ in
current OSs.

If you get the parents to exit/restart (in the worst case use `kill`)
the zombies will be inherited by the "init" process which will reap them
and make them go away.


> How do I go about monitoring those resources.

How I'd do it depends on
* which resources
* which operating system

--
RGB

Posted by Chris Mattern on April 9, 2008, 3:10 pm
Please log in for more thread options
<snip>
>
> AFAIK zombies usually consume minimal resources in terms of memory, etc,

Zombies consume *no* resources. A zombie process is an entry in the
process table with a return code, nothing more. They consume no
resources whatsoever other than the process table entry.

> but occupy slots in the process table such that it if they multiply in
> an unlimited way, the OS may eventually be unable to start any new
> process due to lack of resources (like process table slots). It is a
> long time since I first encountered this so the details may differ in
> current OSs.

This is correct. The only way zombies can actually hurt the system
is if they actually starve it of available process table slots. Note
that this takes a *lot* of zombies.


--
Christopher Mattern

NOTICE
Thank you for noticing this new notice
Your noticing it has been noted
And will be reported to the authorities

Posted by mmccaws2 on April 9, 2008, 3:42 pm
Please log in for more thread options
> <snip>
>
>
>
> > AFAIK zombies usually consume minimal resources in terms of memory, etc,=

>
> Zombies consume *no* resources. =A0A zombie process is an entry in the
> process table with a return code, nothing more. =A0They consume no
> resources whatsoever other than the process table entry.
>
> > but occupy slots in the process table such that it if they multiply in
> > an unlimited way, the OS may eventually be unable to start any new
> > process due to lack of resources (like process table slots). It is a
> > long time since I first encountered this so the details may differ in
> > current OSs.
>
> This is correct. =A0The only way zombies can actually hurt the system
> is if they actually starve it of available process table slots. =A0Note
> that this takes a *lot* of zombies.
>
> --
> =A0 =A0 =A0 =A0 =A0 =A0 =A0Christopher Mattern
>
> NOTICE
> Thank you for noticing this new notice
> Your noticing it has been noted
> And will be reported to the authorities

both very clear answers. Thanks

I'm on HPUX. I learn from my system admins what they feel is this
system's best way to assess it's memory usage.

Thanks

Mike

Similar ThreadsPosted
Splitting a string to access a multilevel hash August 24, 2006, 4:47 am
Help with understanding/using dispatch tables April 12, 2007, 2:04 pm
modifying hash key (dispatch table) October 28, 2004, 8:05 pm
Custom message formatting callback for Log::Dispatch July 11, 2005, 1:24 am
Overriding a class method with an object method July 2, 2007, 4:33 pm
top menu on a site July 15, 2004, 12:46 am
A menu using framebuffer April 7, 2005, 5:18 pm
menu replacing September 14, 2007, 9:35 am
FAQ: How do I make a pop-up menu in HTML? October 17, 2004, 5:10 am
FAQ 9.7 How do I make a pop-up menu in HTML? March 22, 2005, 12:03 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap