Re: 'top' command question





Karl Larsen wrote:
NoOp wrote:
On 07/07/2008 05:22 PM, Robert Dailey wrote:

Hi,

Right now I'm trying to find all running processes in 'top' by command
name. For example, I want to find all processes with a command of
'iperf', I have an iperf daemon running and I need to find the PID for
it in the list so I can kill it with <k>. How can I navigate the list
of processes in 'top'? Note that I'm using Ubuntu Server 8.

Thanks.


Start top with a delay, so that it slows down the update:

top -d10

Then use Shift 'R' to swap the top and bottom pages so that you can see
what they are. But it's easier to use ps aux:

ps aux | grep iperf

the first number to the right of the User will be the PID.



For a really long time I have used $ps -A which lists all the
kernels activities and when you see the one you want to stop you do that
by remembering the number of the item like 6324 and you kill it with
$sudo kill 6324.

You should also look at the pgrep and pkill man pages. They make this
easier.

Regards,
Tony.
--
Tony Arnold, Tel: +44 (0) 161 275 6093
Head of IT Security, Fax: +44 (0) 870 136 1004
University of Manchester, Mob: +44 (0) 773 330 0039
Manchester M13 9PL. Email: tony.arnold@xxxxxxxxxxxxxxxx

--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



Relevant Pages

  • Re: top command question
    ... Right now I'm trying to find all running processes in 'top' by command ... 'iperf', I have an iperf daemon running and I need to find the PID for ... it in the list so I can kill it with. ...
    (Ubuntu)
  • top command question
    ... Right now I'm trying to find all running processes in 'top' by command ... 'iperf', I have an iperf daemon running and I need to find the PID for ... Note that I'm using Ubuntu Server 8. ...
    (Ubuntu)
  • Re: top command question
    ... Right now I'm trying to find all running processes in 'top' by command ... 'iperf', I have an iperf daemon running and I need to find the PID for ... But it's easier to use ps aux: ...
    (Ubuntu)
  • Re: FreeBSD 8.0 ixgbe Poor Performance
    ... Running iperf in UDP test mode is still yielding ~2.5Gbps. ... the latest driver needs to be built in a FreeBSD STABLE tree. ... the configurations to system default as I was getting no where with ... My iperf command line for the client is: ...
    (freebsd-performance)
  • Re: exit status of background jobs
    ... and if it runs too long then kill it. ... while ((count < TIMEOUT)); do ... As you can see, I grab the exit status of the command in question into a "/tmp" file, where I subsequently read it back. ...
    (comp.unix.shell)