Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* init cpu usage around 50%
@ 1994-03-03 17:19 Paul Bininda
  1994-03-09 14:43 ` Burkhard Neidecker-Lutz
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Bininda @ 1994-03-03 17:19 UTC (permalink / raw)



Something very strange is going on on my Alpha (OSF1 V1.3 111).
It seems, the init process gets a SIGCHLD whenever the Bourne shell
opens a pipe. It then re-reads the /etc/inittab.

I have found this using the trace command:

	$ trace -p 1

in one terminal window and saying

	$ echo | echo

in another. The following is the output from the trace command (the arrow
indicates where we are before issuing the command in sh:)

                   |		  
...                v
sigsuspend (0x0) =  -1, (Interrupted system call)
SIGNAL [20 SIGCHLD]
wait4 (-1, 0x11ffff6a0, 1, 0x0) = 2248
wait4 (-1, 0x11ffff6a0, 1, 0x0) = 0
sigreturn (0x11ffff6f8)
sigprocmask (3, 0x0, 0x0) = -65793
open ("/etc/inittab", O_RDONLY, 0666) = 0
ioctl (0, 1074164744, 0x11ffff398) =  -1, (Not a typewriter)
read (0, 0x4000ddc0, 8192) = 2320 [, "# \n# ***********************************"
..., ]
read (0, 0x4000ddc0, 8192) = 0 [, "", ]
lseek (0, 0, SEEK_CUR) = 2320
close (0) = 0
open ("/etc/inittab", O_RDONLY, 0666) = 0
ioctl (0, 1074164744, 0x11ffff3b8) =  -1, (Not a typewriter)
read (0, 0x4000ddc0, 8192) = 2320 [, "# \n# ***********************************"
..., ]
read (0, 0x4000ddc0, 8192) = 0 [, "", ]
lseek (0, 0, SEEK_CUR) = 2320
close (0) = 0
sigprocmask (3, 0xffffffffffffffff, 0xffffffffffffffff) = 0
sigsuspend (0x0) =


The interesting thing is, that only sh shows this behavior. When I
use bash, csh or ksh instead, init remains quiet. What is going on?

What started to make me curious, was a cpu usage of over 50% for the
init process whenever I use a software package which makes heavy use
of shell scripts in some phases. I am now dreaming, that this funny
behavior is a bug which will be fixed soon and that my software
package will then execute twice as fast.

If you do not have the trace program you can at least see init working
itself to death with the syd command from the freeware disk. Start syd
in one terminal window and issue the following sh command in another:

	$ while true; do echo | echo >/dev/null; done

In the syd output I typically get:

 PID  USERNAME NI BP PR S SLP  VSZ  RSS SYSTEMTIME  USERTIME CPU COMMAND
    1 root      0 44 51 R   0 552K 480K      1.423    21.593 41% init
 7401 bip       0 44 50 R   0 1960 296K      2.229     0.038 32% sh
    0 root      0 32 32 R   0 289M  12M   4687.357     0.000 13% <idle>
 2332 bip       0 44 45 R   0 2040 656K     10.356     4.700  4% syd
...

(you may notice, that the accumulated CPU time for init is relatively
low. This is because I just rebooted the machine in the hope that the
problem would go away.)

Can anybody reproduce this behavior? Is it a bug that will be fixed or
is it something completely normal that is explained on page 10 of
"UNIX for Beginners"?

I am looking forward to some comments.

	Paul
--

--
                                          -----  Paul Bininda   
                                          -----  bip@sekas.de


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: init cpu usage around 50%
  1994-03-03 17:19 init cpu usage around 50% Paul Bininda
@ 1994-03-09 14:43 ` Burkhard Neidecker-Lutz
  0 siblings, 0 replies; 2+ messages in thread
From: Burkhard Neidecker-Lutz @ 1994-03-09 14:43 UTC (permalink / raw)


In article <BIP.94Mar3181937@alfalfa.sekas.de> bip@sekas.de (Paul Bininda) writes:
> stuff about init consuming 50% of the CPU.
>

It's a bug, fixed in V2.0.

		Burkhard Neidecker-Lutz

Distributed Multimedia Group, CEC Karlsruhe  
BERKOM II Project
Digital Equipment Corporation
neideck@nestvx.enet.dec.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1994-03-09 14:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-03-03 17:19 init cpu usage around 50% Paul Bininda
1994-03-09 14:43 ` Burkhard Neidecker-Lutz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox