? about using multi-level menu system using dispatch method

M

mmccaws2

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
 
R

RedGrittyBrick

mmccaws2 said:
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
 
M

mmccaws2

<snip>




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.


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

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
 

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

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top