Aircrack-ng forum

General Category => General help => Topic started by: enrico on May 15, 2014, 05:06:10 pm

Title: airodump-ng in background
Post by: enrico on May 15, 2014, 05:06:10 pm
Hi all
i have installed aircrack-ng Version 1.2-beta3 in a small server (debian 7.5)and run command
/usr/local/sbin/airodump-ng  --output-format csv  --berlin 5 --beacons --write /tmp/capture mon0.
all ok cpu about 3% but if insert the command
in /etc/rc.local with & to run in background cpu is 99%.
everything works but I do not understand the high consumption of CPU.

Enrico
Title: Re: airodump-ng in background
Post by: misterx on May 15, 2014, 09:39:35 pm
Use screen to start it in the background.
Title: Re: airodump-ng in background
Post by: enrico on May 16, 2014, 11:04:53 am
Hi,
thank you misterx for your answer.

when run command
/usr/local/sbin/airodump-ng  --output-format csv  --berlin 5 --beacons --write /tmp/capture mon0  > /dev/null 2>&1
use 3% of cpu
with htop:
airodump 3%
airodump-ng 0%

when run command
screen -d -m /usr/local/sbin/airodump-ng  --output-format csv  --berlin 5 --beacons --write /tmp/capture mon0  > /dev/null 2>&1
with htop:
use 170% of cpu (dualcore)
screen 62%
airodump-ng 54%
airodump-ng 54%
airodump-ng 3%
Title: Re: airodump-ng in background
Post by: misterx on May 16, 2014, 10:46:45 pm
There are a few useless things: --berlin (affect the display only) and both redirections as well as --beacons (it saves all the beacons in the capture file but you're using CSV only).

Here is how I start mine:

screen -AdmS airodump airodump-ng --output-format csv --write /tmp/capture mon0
Title: Re: airodump-ng in background
Post by: enrico on May 17, 2014, 11:26:55 pm
i start exactly your command below result

top - 01:08:05 up 2 days,  7:24,  1 user,  load average: 2.51, 2.21, 1.25
Tasks:  98 total,   2 running,  96 sleeping,   0 stopped,   0 zombie
%Cpu(s):  1.0 us,  1.2 sy,  0.0 ni, 97.7 id,  0.1 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:   4030140 total,   684576 used,  3345564 free,   166712 buffers
KiB Swap:  1239036 total,        0 used,  1239036 free,   316932 cached

  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
23635 root      20   0 23196 1312  840 R  57.6  0.0   6:37.16 screen
23636 root      20   0 33400 4868 1448 S  51.9  0.1   5:23.51 airodump-ng
21710 root      20   0     0    0    0 S  40.3  0.0   1:46.61 kworker/1:2
23644 root      20   0 22160  604  200 S   5.8  0.0   0:18.28 airodump-ng
25510 root      20   0 23104 1416 1084 R   5.8  0.0   0:00.02 top
Title: Re: airodump-ng in background
Post by: misterx on May 19, 2014, 03:25:56 am
No idea why it's taking that much cpu. What's the CPU on that device?
Title: Re: airodump-ng in background
Post by: enrico on May 19, 2014, 02:00:10 pm
AMD G-T40E Processor
Title: Re: airodump-ng in background
Post by: misterx on May 20, 2014, 02:01:31 am
I have absolutely no idea why it happens.
Title: Re: airodump-ng in background
Post by: SynAck on July 24, 2014, 01:20:21 am
Sorry,
in the top of output of the 'top' command, is shown a 97,7% of idle CPU....that's strange
Title: Re: airodump-ng in background
Post by: misterx on July 24, 2014, 01:39:59 am
It means the CPU usage is 2.3%
Title: Re: airodump-ng in background
Post by: Doom on November 21, 2014, 02:01:08 am
Hello!
I had a same problem with my project AutoReaver: https://code.google.com/p/auto-reaver/
where airodump-ng uses 100% processor while running in background (same with screen).
So I decided to move airodump-ng invocation into konsole like:
Code: [Select]
konsole -e /bin/sh -c 'airodump-ng mon0'
And problem seems to be solved.
Obviously you have to use KDE to do that (or try with other terminal window if using GNOME).
I don't know why this is happening in background or screen, but with konsole processor usage shrank to 2-4%.
Title: Re: airodump-ng in background
Post by: Xumxum on November 05, 2019, 08:07:47 am
Wow this issue is still there in 2019, I am trying to run it as a systemd service and cpu is arond 60 70%...
Title: Re: airodump-ng in background
Post by: Xumxum on November 05, 2019, 10:12:59 am
I found a solution, not sure when this option was added , but after checking the source code, there is a hidden option(-K 1) that informs airodump-ng that it will run in a background and then some interractive thread is not started, thus fixing the issue. Strange not in the manual..
Just run it like this, this fixed the issue for me

airodump-ng -K 1 mon0
Title: Re: airodump-ng in background
Post by: Himura on November 20, 2019, 11:51:17 am
Thanks for the clue. I had the same problem with CPU utilization when running in systemd, and now it's fixed!
By the way, the parameter IS documented, refer to the issue #1901 https://github.com/aircrack-ng/aircrack-ng/issues/1901