From owner-freebsd-questions Tue Dec 4 14:40:21 2001 Delivered-To: freebsd-questions@freebsd.org Received: from phear.darq.net (phear.darq.net [213.253.1.14]) by hub.freebsd.org (Postfix) with SMTP id 2FB1B37B417 for ; Tue, 4 Dec 2001 14:40:12 -0800 (PST) Received: (qmail 31166 invoked by uid 1000); 4 Dec 2001 22:40:10 -0000 Date: Tue, 4 Dec 2001 22:40:10 +0000 From: Ian Morrison To: questions@freebsd.org Subject: Re: How to make a start/stop/restart script Message-ID: <20011204224010.A2341@phear.darq.net> References: <200111271313.AA4194478@enterit.com> <1007486364.2236.11.camel@lapdancer.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5i In-Reply-To: <1007486364.2236.11.camel@lapdancer.dk>; from neigaard@e-box.dk on Tue, Dec 04, 2001 at 06:19:23PM +0100 X-Url: http://www.darq.net/ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Dec 04, 2001 at 06:19:23PM +0100, Søren Neigaard wrote: > I tried to fool around on my Linux box, but I cant seem to understand > this ps|grep thing. Sometimes when I do a "ps -aux" I get some Java > processes with the string "mailsmsgateway" in them, but if I do a "ps > -aux|grep mailsmsgateway" I get nothing?? Why? grep simply deals with whatever input you give it, in this case, the output of the ps program. the output of ps varies, depending on the dimensions of the terminal - on a standard console this might be 80x25. i suspect that grep isn't "seeing" the string mailsmsgateway in its entirety, because depending on things like start time, pid, and username, it might not fit (in its entirety) in your window. to get the full output of ps, add 'ww' to your command. -w Use 132 columns to display information, instead of the default, which is your window size. If the -w option is specified more than once, ps will use as many columns as necessary without re- gard for your window size. so in effect, ps auxww will do what you're after. ian -- :: darq.net /#/ :: crazy crazy crazy madness | sanity is To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message