Output a Vuser IP address in script replay log.

Use lr_get_vuser_ip() function in the Vuser script

Note: This function is a part of function reference in LR 7.x but was undocumented in LR 6.5

Use the lr_get_vuser_ip() function within a lr_output_message() function in the vuser_init() section. This function will return the Vuser IP address as a C string. For example,

lr_output_message("Vuser IP -> %s", lr_get_vuser_ip());

This is advantageous because you can now use the Vusers output log of errors and its IP in conjunction with the Web server logs (which should list IP addresses) to track down errors faster and more accurately.

To have the IP address show in the Controller Vuser Status field, use the function

lr_vuser_status_message("Vuser IP -> %s", lr_get_vuser_ip());

Advertisements

One thought on “Output a Vuser IP address in script replay log.

  1. Bala

    Start auto log messages stack – Iteration 12900. [MsgId: MMSG-10545]
    Starting action Ac. [MsgId: MMSG-15919]
    Action.c(3): Vuser IP -> 10.96.116.119 [MsgId: MMSG-17999]
    Error: Two Way Communication Error: Function two_way_comm_post_message / two_way_comm_post_message_ex failed. [MsgId: MERR-60990]
    Error: Service client with id=1 failed to post a message ,reason – communication error. [MsgId: MERR-29739]
    Error: Failed to post xdr buffers data array by post_ex. [MsgId: MERR-16895]
    Error: Failed to send xdr buffers data array to the transaction server. [MsgId: MERR-16897]
    Error: Failed to add transaction to the transactions data array for optimization. [MsgId: MERR-16894]
    End auto log messages stack. [MsgId: MMSG-10544]

    Is it a success or failed IP Spoofing.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s