Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Defunct processes hogging CPU?

62 views
Skip to first unread message

Scott

unread,
Feb 25, 2002, 12:07:50 PM2/25/02
to
Hi,

I've noticed on our OSR5.0.5 system, that defunct processes (or processes
that have been grabbed by init, where users have not logged off properly),
seem to be hogging the CPU.
These processes always have a very high C value on the PS listing, are
always at the top of top, and send the load average on w sky high.
Also, if there's two or three of these, sar reports idle time or 0%, it's
normally rarely below 85!
As soon as I've killed them off, everything returns to normal.

Why should SCO bother with these redundant processes?

Thanks for any help,
Scott.


Lori

unread,
Feb 25, 2002, 4:56:09 PM2/25/02
to
We have the same problem in 3.2v4.2
Our users either lose their telnet connection thru their terminal emulator,
or they just click on the X and close the session leaving pieces of the
program still running.

I have to clean these up daily.

Does anyone use terminal emulator software that won't allow you to close the
window without properly logging off the unix box first?

"Scott" <ne...@sccsx-ltd.co.uk> wrote in message
news:u7kru9a...@corp.supernews.com...

John DuBois

unread,
Feb 25, 2002, 9:56:03 PM2/25/02
to
In article <u7kru9a...@corp.supernews.com>,

These are not defunct processes. Defunct processes (zombies) are dead by
definition, and cannot consume CPU time. The usual cause of the problem you
are seeing is an application that ignores failure indication when reading from
the tty and so after the tty is closed goes into a read loop consuming as much
CPU time as it can. You can try setting SECSTOPIO to 1 (5.0.4 and later
only!), so that the process will get an extra signal when it tries this. If
that doesn't work, you can try setting a CPU time limit to minimize the CPU
thrashing that misbehaving processes cause (invoke the application through a
ksh script that first does 'ulimit -t nnn').

John
--
John DuBois spc...@armory.com KC6QKZ/AE http://www.armory.com/~spcecdt/

Bela Lubkin

unread,
Feb 25, 2002, 10:45:14 PM2/25/02
to sco...@xenitec.on.ca
John DuBois wrote:

There was actually a problem along these lines that was _caused_ by
SECSTOPIO being 1. So whatever its current value is, you might changing
it to the other. The variable exists in all releases of SCO Unix
starting with 3.2v2.0, I believe.

>Bela<

Brian K. White

unread,
Feb 26, 2002, 4:36:23 AM2/26/02
to

"Lori" <lhe...@bellsouth.net> wrote in message
news:gfye8.44695$2v1.1...@e3500-atl1.usenetserver.com...

> We have the same problem in 3.2v4.2
> Our users either lose their telnet connection thru their terminal
emulator,
> or they just click on the X and close the session leaving pieces of the
> program still running.
>
> I have to clean these up daily.
>
> Does anyone use terminal emulator software that won't allow you to close
the
> window without properly logging off the unix box first?

facetwin and anzio and I'm sure many others have config options for that.
but that only handles the users hitting X, not network congestion / dialup
flakiness issues.
(actually, facetwin's connection config file can be edited manually to set
an option that disables all the menus save one little "about" button.)

also it's possible to get a terminal window "stuck" on with that option
enabled sometimes, the windows gets into a state where there is no program
running yet it refuses to close untill you "exit your application..."

what you really need to do is endow a tcp/ip based terminal emulator server
with the HUPCL option that has always been part of serial connections. The
server should "ping" the client periodically, (frequency should be
configurable) and if the client fails to respond within some configurable
number of pings, the server should issue a HUP to the clients open programs.

I have begged facetwin for this but ... *shrug*

I don't know what other methods might be used to set up a keep-alive system
like that.

One thing you can do is set idleout to some very short value like 5 minutes,
and use a terminal that includes a keep-alive feature where it will send a
character or characters of your choosing every n seconds (only when
otherwise idle) as long as you have the window open. (anzio and putty has
this feature) And set it to send \000 (a nul) every 200 or 300 seconds.

so as long as the window is open and the connection is good, the emulator
will send nulls every few minutes while you are idle.

if the connection goes down or the PC goes off on power-save, or the user
hits X, the terminal emulator is no longer sending nulls every few minutes,
so in five minutes the idleout program will close the users headless
programs.

If I wasn't practically forced to use facetwin for other reasons I would in
fact do this very thing at lots of sites where the users seem to have a
thick layer of clue-teflon. (I have also begged facetwin for the "send nulls
when idle" feature to no effect)

Maybe I should work up some sort of simple demonstration to use at certain
sites, with the guilty parties and the boss and a terminal and a calculator
and cap off the little show with a clear and unavoidable estimate of how
much wasted $$$ the user is _directly_ responsible for over the course of
the last year and a level, questioning stare in the eyes as if to say "So,
you want to keep hitting that X button because it's just soooo convenient? I
guess then that it's worth $xxx every month to you, right? And we can start
billing _you_ for this part instead of your boss here, Right?"

*sigh* ahhh fantasies... :) (what have I become, that now, _this_ is the
nature of my fantasies?)

I wish there were one terminal emulator that had all the features I consider
necessary instead of three favorites that each have something the others
don't, but each lack something at least one of the others has... *sigh* but
that's a long story best given it's own thread some other time...

--
Brian K. White -- br...@aljex.com -- http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx Linux SCO Prosper/FACTS AutoCAD #callahans Satriani

Scott

unread,
Feb 26, 2002, 9:34:26 AM2/26/02
to
Thanks.

We thought about using idleout, but it looks a little dangerous as it seems
to just kill -9 the login shell.
I noticed it uses the output from who -u, does anyone know how the idle time
is calculated?
Is it keyboard activity, CPU activity or just IO to/from the terminal?

Thanks,
Scott.
"Brian K. White" <br...@aljex.com> wrote in message
news:rGIe8.43095$td.13...@news2.nash1.tn.home.com...

Bill Vermillion

unread,
Feb 26, 2002, 10:50:26 AM2/26/02
to
In article <u7n7ali...@corp.supernews.com>,
Scott <ne...@sccsx-ltd.co.uk> wrote:
>Thanks.

>We thought about using idleout, but it looks a little dangerous as it seems
>to just kill -9 the login shell.

kill -9 really is the worst way to do this. If a -15 (TERM) were
sent first then you would get a software termination signal so the
application should shut down just as if the user logged out. If TERM
does work then a -1 (HUP) would be sent and if that doesn't work
only then send a -9 (KILL).

Far too often I've seen the -9 as the only method used. That like
shooting your employees and then wondering what they were working
on instead of giving them notice two weeks notice (TERM), or saying
'clean out your desk and security will escort you from the
building' (HUP).


--
Bill Vermillion - bv @ wjv . com

John DuBois

unread,
Feb 26, 2002, 10:12:10 PM2/26/02
to
>I noticed it uses the output from who -u, does anyone know how the idle time
>is calculated?
>Is it keyboard activity, CPU activity or just IO to/from the terminal?

who -u uses the modify time of the tty, which is the last time that the tty was
written to. This isn't a particularly good indicator of user activity. Get

ftp://deepthought.armory.com/pub/admin/nidleout

and do 'nidleout -h' for a discussion of idleout philosophy.

Scott

unread,
Feb 27, 2002, 9:05:04 AM2/27/02
to
Thank you.

This and your ptyclean script look most useful!

"John DuBois" <spc...@deeptht.armory.com> wrote in message
news:3c7c4e8a$0$36736$8ee...@newsreader.tycho.net...

0 new messages