From owner-freebsd-emulation Tue Dec 29 04:51:58 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA27493 for freebsd-emulation-outgoing; Tue, 29 Dec 1998 04:51:58 -0800 (PST) (envelope-from owner-freebsd-emulation@FreeBSD.ORG) Received: from gaia.euronet.nl (gaia.euronet.nl [194.134.0.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA27488 for ; Tue, 29 Dec 1998 04:51:56 -0800 (PST) (envelope-from marcel@scc.nl) Received: from scones.sup.scc.nl (i350.ztm.euronet.nl [194.134.67.111]) by gaia.euronet.nl (8.8.8/8.8.8) with ESMTP id NAA28946; Tue, 29 Dec 1998 13:51:36 +0100 (MET) Received: from scc.nl (scones.sup.scc.nl [192.168.2.4]) by scones.sup.scc.nl (8.9.1/8.9.1) with ESMTP id NAA23958; Tue, 29 Dec 1998 13:51:01 +0100 (CET) (envelope-from marcel@scc.nl) Message-ID: <3688D035.48F8542B@scc.nl> Date: Tue, 29 Dec 1998 13:51:01 +0100 From: Marcel Moolenaar Organization: SCC vof X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 3.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: Greg Lehey CC: freebsd-emulation@FreeBSD.ORG Subject: Re: linux ps(1) for FreeBSD References: <3688B050.B0E97AA9@scc.nl> <19981229212208.V32696@freebie.lemis.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Greg Lehey wrote: > Do you have more details? for example: The Web Request Broker (WRB) is started by: owsctl start wrb The owsctl script eventually executes wrbctl. wrbctl starts a number of processes, of which mnaddrsrv is the first. When mnaddrsrv is launched, wrbctl executes: sh -c (/bin/ps pw 22708 2>/dev/null| grep mnaddrsr) sh in this case is a linux binary (bash), so /bin/ps is in fact /compat/linux/bin/ps. /compat/linux/bin/ps is a script I made to debug OAS: #!/bin/sh echo $* > /tmp/ps.args if [ "x$1" = "xpw" ]; then shift /bin/ps -ww -p $* else /bin/ps -wwx fi grep reads on stdin: 22712 grep GIO fd 0 read 93 bytes " PID TT STAT TIME COMMAND 22708 ?? Ss 0:00.07 /oracle/ows/3.0/bin/mnaddrsrv -D " wrbctl reads on the pipe: 22700 wrbctl GIO fd 4 read 59 bytes "22708 ?? Ss 0:00.07 /oracle/ows/3.0/bin/mnaddrsrv -D " wrbctl now knows the process is running and records the pid in a file. Multiple WRB instances can be started concurrently, so mnaddrsrv can be running more than once. By using the recorded pid and ps|grep, wrbctl can monitor the status of each instance. The admin web server is started by: owsctl start admin owsctl start wrbctl again. wrbctl now reads a couple of config files and runs (I think): sh -c (ps efw | grep wrbdm) ... For some reason oraweb is still started and blocks on linux_socketcall(LINUX_SENDMSG,...), possibly awaiting the creation of some other process, which wasn't created in the time I ate my lunch. marcel ps: linux_socketcall(LINUX_SENDMSG, ...) and linux_socketcall(LINUX_RECVMSG, ...) aren't implemented. I'm running my own patches. See PR 9232. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message