Airodump in the background takes 90% of Cpu in normal mode with 3-4% as well?

Try to run airodump in the background. that he does not stop, looked around for access points and wrote the log to a file.
Like, nothing complicated.

#!/usr/bin/perl
use strict;
exec("airodump-ng mon0 -a 30 --berlin --output-format csv -w logFile >/dev/null 2>&1 &");


top:
1839 root 20 0 3.6 m 1.6 m 0 93.8 6.0:10.14 S ` airodump-ng
93.8% CPU usage

despite the fact that if you run not in the background
exec("airodump-ng mon0 -a 30 --berlin --output-format csv -w logFile >/dev/null 2>&1");


download already 4-6 %
top:
1859 root 20 0 3.3 m 1.3 m 4.7 4.9 0:01.53 S ` airodump-ng
June 14th 19 at 20:45
2 answers
June 14th 19 at 20:47
Solution
#!/usr/bin/perl
eval {
 local $SIG{INT} = sub { die };
 $pid = open(DUMP, "|airodump-ng mon0 1>/dev/null 2>/dev/null");
# * * *
close(DUMP);
 };
Instead of stars you need something to add? Because I still 100% load - earlene.Terry commented on June 14th 19 at 20:50
Nothing special, do not add.
I have
sleep(10)
system("killall airodup-ng");


As I understand it, the easiest way to kill the process using killall
normal kill does not always work and memory remain hanging "dead" processes.
If you require multiple processov running airodump-ng, it is easier to run different binaries. And to complete them separately, by different names.
Well it is, it might be useful. - nikita.Stracke commented on June 14th 19 at 20:53
June 14th 19 at 20:49
I finally was able to run airodump-ng in background by using tmux the following way:
tmux new-d -> creates a new tmux window in background 
tmux send-Rt 0 airodump-ng wlan0 SPACE ENTER -> sends the given keys to the backgound terminal

This way, airodump-ng works and doesnt take 100% CPU like with screen.

https://unix.stackexchange.com/questions/355808/ho...
Something in my process was not designed
sudo tmux send-Rt 0 airodump-ng -w wifi --write-interval 1 --output-format csv --ivs mon0 1>/dev/null 2>/dev/null
No errors, nothing. Just like nothing happened - earlene.Terry commented on June 14th 19 at 20:52

Find more questions by tags Perl