GithubHelp home page GithubHelp logo

Comments (10)

mit0223 avatar mit0223 commented on June 29, 2024 1

Hi,
We faced same problem when we use the raw request with udp to send syslog packet. We find that the udp transport require the buffer options like followings.

<options>
  <option name="udp_snd_buffer" value="16384"></option>
  <option name="udp_rcv_buffer" value="16384"></option>
 </options>

I think that the options should be pre-set.

from tsung.

nniclausse avatar nniclausse commented on June 29, 2024

Tsung already support raw protocol (see ts_raw plugin). The documentation was missing though, fixed in 36a7182
Is it what you are looking for ?

from tsung.

alicehanhy avatar alicehanhy commented on June 29, 2024

How to get the specific string from the Tcp protocol reponse by regexp ? the reponse is " 408005 6188007051562582020", my script is "

<dyn_variable name="sessionID" re="6[0-9]{18}"/>

"
but the value of the variable sessionID is blank.

from tsung.

alicehanhy avatar alicehanhy commented on June 29, 2024

Ok,I've got the result from reponse correctly,the reason was the regexp in tsung should use "()",the correct script as following:re="(6[0-9]{18})"

from tsung.

nniclausse avatar nniclausse commented on June 29, 2024

ok, fine, I think we can close the issue.

from tsung.

alicehanhy avatar alicehanhy commented on June 29, 2024

Ok

huakaiwusheng_1986

From: Nicolas Niclausse
Date: 2015-09-07 16:27
To: processone/tsung
CC: alicehanhy
Subject: Re: [tsung] can support e raw tcp/udp protocol of rpc call? (#115)
ok, fine, I think we can close the issue.

Reply to this email directly or view it on GitHub.

from tsung.

reith avatar reith commented on June 29, 2024

Can it work with UDP now? I cannot make any UDP traffic, using same configuration as raw_tcp example but replaced server type from "tcp" to "udp".

<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "/usr/share/tsung/tsung-1.0.dtd">
<tsung loglevel="debug" dumptraffic="true" version="1.0">

  <clients>
    <client host="localhost" weight="2" maxusers="10000" use_controller_vm="false"/>
  </clients>

  <servers>
    <server host="127.0.0.1" port="9090" type="udp"></server>
  </servers>

  <load>
    <arrivalphase phase="1" duration="10" unit="minute">
      <users arrivalrate="2" unit="second"></users>
    </arrivalphase>
  </load>


 <sessions>
 <session probability="100" name="raw" type="ts_raw">
    <transaction name="open">
      <request> <raw data="hellloooooo" ack="no_ack"></raw> </request>
    </transaction>
  </session>
 </sessions>
</tsung>

From logs:

stats: {freemem,"tsung_controller@localhost"} 1 2075.96484375 0.0 2098.55859375 2075.96484375 2088.9544270833335 3
stats: session 18 1.8977186414930556 0.1852411166360447 6.77783203125 1.22900390625 2.0139789003314394 66
stats: users_count 18 84
stats: finish_users_count 18 84
stats: error_unknown 16 82

from tsung.

joaohf avatar joaohf commented on June 29, 2024

Hi,

Using the xml above, I got:

=INFO REPORT==== 24-May-2016::09:19:45 ===
           ts_client:(7:<0.164.0>) connect to port 7000
=INFO REPORT==== 24-May-2016::09:19:45 ===
           ts_client:(5:<0.164.0>) Stop in state think, reason= badarg

=ERROR REPORT==== 24-May-2016::09:19:45 ===
** State machine <0.164.0> terminating
** Last message in was {timeout,#Ref<0.0.2.523>,end_thinktime}
** When State == think
**      Data  == {state_rcv,none,
                     {{0,0,0,0},0},
                     undefined,0,10000,"localhost",7000,ts_udp,
                     {proto_opts,negotiate,negotiate,"/http-bind/",false,
                         false,"/chat","binary",10,3,600000,infinity,infinity,
                         32768,32768,undefined,undefined,[],true,true},
                     false,1,undefined,true,undefined,-576460734839818548,11,
                     11,false,undefined,0,[],<<>>,
                     {raw,undefined,undefined,undefined},
                     0,33,524288,524288,
                     [{tsung_userid,33}],
                     ts_raw,[],undefined,full}
** Reason for termination =
** badarg

from tsung.

reith avatar reith commented on June 29, 2024

I hit the same problem while tried to make a DNS stress loader and @mit0223 solution worked. Kudos!
My conclusion is UDP data sending is not possible if buffer size is not set exclusively which looks like a bug.

from tsung.

nniclausse avatar nniclausse commented on June 29, 2024

yes, it's a bug. Fixed, thanks.

from tsung.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.