I find the root cause: shouldn’t use & after “iftop -nt”,because “&” tells bash to fork again.After I test,it’s OK.
From: iftop-users-admin@lists.beasts.org [mailto:iftop-users-admin@lists.beasts.org]
On Behalf Of Darren (Chenji) Xu
Sent: Wednesday, February 12, 2014 2:17 PM
To: iftop-users@lists.beasts.org
Subject: [Iftop-users] the CPU usage is 100% when shell or perl script run iftop
Hi Paul,
Do you encounter this issue? I haven’t found this issue when I used tcpdump.
I think it maybe a iftop bug.
Thanks,
Darren
-------
PS:
#!/bin/bash
#tcpdump -nnlqp tcp &
iftop -nt &