Date: Tue, 4 Dec 2001 22:40:10 +0000 From: Ian Morrison <ian@darq.net> To: questions@freebsd.org Subject: Re: How to make a start/stop/restart script Message-ID: <20011204224010.A2341@phear.darq.net> In-Reply-To: <1007486364.2236.11.camel@lapdancer.dk>; from neigaard@e-box.dk on Tue, Dec 04, 2001 at 06:19:23PM %2B0100 References: <200111271313.AA4194478@enterit.com> <1007486364.2236.11.camel@lapdancer.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011204224010.A2341>
