[olug] Unix Tip: IDENTIFY A PROCESSES
David Walker
linux_user at grax.com
Thu Mar 27 00:09:25 UTC 2003
Another way to show what pid is listening to what port is
netstat --inet -nlp
and to see what pid matches what active connection use
netstat --inet -np
(run as root to see full information)
On Wednesday 26 March 2003 04:53 pm, Vincent wrote:
> An often overlooked feature of fuser is to get the pid which has bound a
> port: [-- at --- ~/]$ fuser -n tcp 25
> 25/tcp: 4466
> [-- at --- ~/]$ ps -p `fuser -n tcp 25 | awk '{print $2}'` fu
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> root 4466 0.0 0.0 2448 1228 ? S Mar16 0:53 sendmail:
> accepting connections
>
>
>
>
>
> ----- Original Message -----
>
> From: "Unix Guru Universe" <listserv at ugu.com>
> To: <olug at olug.org>
> Sent: Wednesday, March 26, 2003 1:23 PM
> Subject: [olug] Unix Tip: IDENTIFY A PROCESSES
>
> > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> >
> > UNIX GURU UNIVERSE
> > UNIX HOT TIP
> >
> > Unix Tip 1911 - March 26, 2003
> >
> > http://www.ugu.com/sui/ugu/show?tip.today
> >
> > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> >
> >
> > IDENTIFY A PROCESSES
> >
> > The command fuser is very
> > handy when you want to know
> > which processes or users
> > have a file open. Its basic
> > syntax is:
> >
> > /etc/fuser -u /usr/my_application/foo
> >
> > You must enter the file's full
> > path name, as shown above.
> >
> > The fuser command is located
> > under the /etc directory on HP-UX,
> > AIX and SCO flavors. You must
> > login as root to use it.
> >
> > Its output is a raw list of
> > processes id numbers and users login
> > names.
> >
> > Please refer to your Unix man pages
> > to find more about this useful command.
> >
> >
> > This tip generously supported by: tinaco110 at hotmail.com
> >
> >
> >
> >
> > -------------------------------------------------------------------------
> >- To Subscribe: http://www.ugu.com/sui/ugu/show?tip.subscribe
> > To Unsubscribe: http://www.ugu.com/sui/ugu/show?tip.unsubscribe
> > To Submit A Tip: http://www.ugu.com/sui/ugu/show?tip.today
> >
> > =========================================================================
> >= DISCLAIMER: All UNIX HOT TIPS ARE OWNED BY THE UNIX GURU UNIVERSE AND
> > ARE NOT TO BE SOLD, PRINTED OR USED WITHOUT THE WRITTEN CONSENT OF THE
> > UNIX GURU UNIVERSE. ALL TIPS ARE "USE AT YOUR OWN RISK". UGU ADVISES
> > THAT ALL TIPS BE TESTED IN A NON-PRODUCTION DEVELOPMENT ENVIRONMENT
> > FIRST.
> >
> > Unix Guru Universe - www.ugu.com - tips at ugu.com - Copyright 1994-2001
> > =========================================================================
> >=
> >
> > _______________________________________________
> > OLUG mailing list
> > OLUG at olug.org
> > http://lists.olug.org/mailman/listinfo/olug
>
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> http://lists.olug.org/mailman/listinfo/olug
More information about the OLUG
mailing list