Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallelism Tweaks #58

Merged
merged 2 commits into from
Jul 11, 2017
Merged

Parallelism Tweaks #58

merged 2 commits into from
Jul 11, 2017

Conversation

MrSecure
Copy link
Contributor

@MrSecure MrSecure commented Jul 7, 2017

  • Make the temporary file name random to allow multiple instances to run in parallel
  • Add a trap handler to clean up the temporary file when interrupted/killed
  • Add the account id to the CSV output, in addition to the profile.

Example parallel execution - runs up to 4 simultaneously -P 4

grep -E '^\[([0-9A-Aa-z_-]+)\]'  ~/.aws/credentials | tr -d '][' | shuf |  \
xargs -n 1 -L 1 -I @ -r -P 4 ./prowler -p @ -M csv  2> /dev/null  >> all-accounts.csv

Allows multiple instances of prowler to run in parallel (eg. via xargs
-P ).
Also, add trap handler to remove temp file if interrupted.
@toniblyx
Copy link
Member

Nice one! I'll add that command to the README, it is pretty helpful. Thanks!

@toniblyx toniblyx merged commit 59c8c8a into prowler-cloud:master Jul 11, 2017
@MrSecure MrSecure deleted the parallelism branch July 11, 2017 21:40
@MrSecure MrSecure restored the parallelism branch July 12, 2017 15:41
@MrSecure MrSecure deleted the parallelism branch July 12, 2017 15:42
snaow pushed a commit that referenced this pull request Nov 25, 2024
snaow pushed a commit that referenced this pull request Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants