X-MimeOLE: Produced By Microsoft Exchange V6.5
Received: by onstor-exch02.onstor.net 
	id <01C8676F.5FD68084@onstor-exch02.onstor.net>; Mon, 4 Feb 2008 13:49:02 -0700
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-class: urn:content-classes:message
Subject: RE: BSD Question for LSI Escalation
Date: Mon, 4 Feb 2008 13:49:02 -0700
Message-ID: <BB375AF679D4A34E9CA8DFA650E2B04E03E9A5BA@onstor-exch02.onstor.net>
In-Reply-To: <20080204081516.1bd1a28b@ripper.onstor.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: BSD Question for LSI Escalation
Thread-Index: AchnSSFWjmQv2OG6R1WMP/ZPu93IQwAJT6EQ
From: "Chris Vandever" <chris.vandever@onstor.com>
To: "Andy Sharp" <andy.sharp@onstor.com>

No luck.  I tried accessing /dev/tty00:

eng28# echo 'hi' > /dev/tty00
eng28# echo 'hi' > /dev/console
hi

and got no output.

There is no /etc/inittab, and /etc/gettytab doesn't have anything useful
in it.

ps doesn't seem to know what tty I'm on:

eng28# ps -l
  UID   PID  PPID CPU PRI NI   VSZ   RSS WCHAN   STAT TT       TIME
COMMAND
    0  6309 13211   1  29 20   444   272 -      R+    ??    0:00.01 ps
-l
    0 13211     1   0  18 20   552   380 pause  Ss    ??    0:00.19 -csh
(csh)

who only shows /dev/console, which doesn't help me:

eng28# who
root     console  Feb  1 17:13

I think I'm going to be stuck writing to a file and doing fsync's
instead, which may or may not interact well with the problem I'm trying
to track.  Oh, well.

Thanks for the suggestions.

ChrisV

-----Original Message-----
From: Andy Sharp=20
Sent: Monday, February 04, 2008 8:15 AM
To: Chris Vandever
Subject: Re: BSD Question for LSI Escalation

OK, I looked it up, it should be /dev/tty00

On Mon, 4 Feb 2008 00:33:23 -0800 "Chris Vandever"
<chris.vandever@onstor.com> wrote:

> Thanks.  I'll try your suggestions.
>=20
> ChrisV
>=20
>=20
> -----Original Message-----
> From: Andy Sharp
> Sent: Sun 2/3/2008 8:57 PM
> To: Chris Vandever
> Subject: Re: BSD Question for LSI Escalation
> =20
> On Fri, 1 Feb 2008 20:20:59 -0800 "Chris Vandever"
> <chris.vandever@onstor.com> wrote:
>=20
> > I need to pick your brain on this one.
> >=20
> > I'm working on an escalation for LSI where bsd hangs in reboot
> > (maybe 10% of the time).  I added instrumentation to /sbin/reboot
> > to print how far I get.  Reboot, in its infinite wisdom, forks a
> > child and the child calls revoke("/dev/console"), which as far as I
> > can tell closes all open fd's for the device.  So, I added code to
> > the parent to re-open "/dev/console" and dup it to stdin/out/err.
> > This works fine when nfxsh calls system("reboot"), but there is
> > zero output when chassisd does the same thing.  I'm thinking it's
> > because chassisd runs as a daemon.  Is there some other dev I can
> > open from a daemon that will give me output on the ssc console?
> >=20
> > Thanks.
> >=20
> > ChrisV
> >=20
>=20
> There should be a regular serial device that corresponds to the serial
> port in use.  /dev/console is largely an alias.  I don't know what
> it's called in BSD but you should be able to tell by what is
> in /etc/inittab or by using ps when BSD is up and running and seeing
> what device is listed for login or csh, depending on whether you're
> logged in on the console or not.  Unfortunately I don't have any
> systems with BSD cf cards in them right now for me to boot up and see
> for myself.
>=20
> Good luck,
>=20
> a
>=20
