+
Skip to content

CSV file randomization using /dev/random #803

@sergey-safarov

Description

@sergey-safarov

We need to start 100 SIPp processes using different IP addresses like

sipp -i ${binding_ip} \
  -sf sipp/3pcc-C-A.xml \
  -inf sipp/call-data.csv \
  -m 10 \
  -l 1 \
  -3pcc 127.0.0.1:4002 \
  10.10.4.131:5080

For each SIPp process, will be used

sipp -i 10.10.4.100 ...
sipp -i 10.10.4.101 ...
sipp -i 10.10.4.102 ...
sipp -i 10.10.4.103 ...

To reach this goal, we use the xargs utility

# Run in parallel
seq 1 "$instances" | xargs -P "$instances" -I{} bash -c 'run_sipp.sh "$@"' _ {}

In this case, all SIPp processes started simultaneously and randomized the CSV file using the same sequence (CSV file contains RANDOM as the first string). As a result, we have a lot of duplicated calls from different IP addresses.
It looks like SIPp processes a randomized string in a CSV file using the current time. If I add dandom delay between SIPp process start, then the generated calls looks random.

Could you randomize the string in the CSP file, not using a timestamp, but data from the /dev/random device? And if this device is not available, then fall back to a timestamp.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载