Loading ...
Sorry, an error occurred while loading the content.

Question on using datetime format

Expand Messages
  • Horsie
    I have a data file with TCP packets arrived: 1st column is time stamp; 2nd column is the starting sequence number; 3rd column is the ending sequence number. I
    Message 1 of 7 , May 22 2:39 PM
    • 0 Attachment
      I have a data file with TCP packets arrived:
      1st column is time stamp;
      2nd column is the starting sequence number;
      3rd column is the ending sequence number.

      I would like to draw a bar graph to illustrate how packets arrived
      along the time line.

      2007-01-24.19:24:27.076245 1 1461
      2007-01-24.19:24:27.077761 1461 2921
      2007-01-24.19:24:27.107724 2921 4381
      2007-01-24.19:24:27.107733 4381 5841
      2007-01-24.19:24:27.107736 5841 7301
      2007-01-24.19:24:27.110223 7301 8761
      2007-01-24.19:24:27.110230 8761 10221
      2007-01-24.19:24:27.110235 10221 11681
      2007-01-24.19:24:27.139203 11681 13141

      My question is that I don't know how to specify xautorange,
      xaxis.stubs and xaxis.tics in this case:
      I tried the following, but it didn't seem to work too graciouly.

      #proc areadef
      title: received packets
      titledetails: align=C size=10
      rectangle: 1 1 8 6
      xscaletype: datetime yyyy-mm-dd.hh:mm:%2.6f
      yscaletype: linear
      //xrange: 2007-01-24.19:24:27.076245 2007-01-24.19:24:27.139203
      xautorange: datafield=1 margin=0.001second
      yautorange: datafield=2,3

      #proc xaxis
      tics: yes
      minorticinc: %.1f seconds
      stubs: datematic
      //stubformat: hh:mm:%2.1f

      #proc bars
      locfield: 1
      segmentfields: 2,3
      barwidth: 0.1
      color: color=red
      outline: yes


      I tried to use
      xscaletype: time mm:%02.06f
      It didn't seem to give me a better result either.

      Can anyone help me with this? Thank you very much!
    • Stephen C. Grubb
      Hello, one problem is the granularity of your time points appears to be in microseconds. Is a datetime x axis really what you need here? How much time will
      Message 2 of 7 , May 24 7:47 AM
      • 0 Attachment
        Hello,

        one problem is the granularity of your time points appears to be in
        microseconds. Is a datetime x axis really what you need here? How much
        time will your presented x axis typically cover (min to max)?

        With the data shown here I would split off the microsecond component into
        a separate field and use that.

        Steve


        On Wed, 23 May 2007, Chunling Ma wrote:

        > Hi,
        >
        > I was trying to plot/illustrate TCP packets received on a connection using proc bars.
        >
        > The data file looks like this:
        > 2007-01-24.19:24:27.076245 1 1461
        > 2007-01-24.19:24:27.077761 1461 2921
        > 2007-01-24.19:24:27.107724 2921 4381
        > 2007-01-24.19:24:27.107733 4381 5841
        > 2007-01-24.19:24:27.107736 5841 7301
        > 2007-01-24.19:24:27.110223 7301 8761
        > 2007-01-24.19:24:27.110230 8761 10221
        > 2007-01-24.19:24:27.110235 10221 11681
        > 2007-01-24.19:24:27.139203 11681 13141
        > 2007-01-24.19:24:27.139211 13141 14601
        >
        > 1st column: time stamp
        > 2nd column: start sequence number
        > 3rd column: end sequence number
        >
        > I used datetime as xscaletype. My question is that I don't know how to use xautorange, xaxis.stubs, and xaixs.tics in this case to generate a gracious graph.
        >
        > Below is some snippet of what is in my proc script file:
        >
        > #proc areadef
        > title: received packets
        > titledetails: align=C size=10
        > rectangle: 1 1 8 6
        > xscaletype: datetime yyyy-mm-dd.hh:mm:%2.6f
        > yscaletype: linear
        > //xautorange: datafield=1
        > xrange: 2007-01-24.19:24:27.076245 2007-01-24.19:24:27.139211
        > yautorange: datafield=2,3
        >
        > #proc xaxis
        > tics: yes
        > stubs: inc 1 second
        > minorticinc: %.2f seconds
        > //stubformat: yyyy-mm-dd.hh:mm:%2.6f
        >
        > #proc yaxis
        > stubs: inc
        > label: pkts recved
        >
        > #proc bars
        > locfield: 1
        > segmentfields: 2,3
        > barwidth: 0.1
        > color: color=red
        > outline: yes
        >
        > Can anyone help me with that? Thank you very much!
        >
        > Chunling
        >
        >
        >
        >
        >
        >
        >
        > ____________________________________________________________________________________Pinpoint customers who are looking for what you sell.
        > http://searchmarketing.yahoo.com/


        Stephen C. Grubb scg@... x-6633
        Scientific Software Engineer, The Jackson Laboratory
        600 Main Street Bar Harbor, Maine 04609 USA
      • Horsie
        Thank you, Steve. I would like to cover 30 seconds of packets arrivals. so I guess I will need at least seconds and microseconds in this case, right? What do
        Message 3 of 7 , May 24 12:33 PM
        • 0 Attachment
          Thank you, Steve.

          I would like to cover 30 seconds of packets arrivals. so I guess I
          will need at least seconds and microseconds in this case, right?

          What do you mean to split off the microsecond into a separate field?
          You mean one field still remains as datetime such as
          yyyy-mm-dd.hh:mm:ss, and another field is microsecond alone? How do I
          use 2 fields combined for x aixs in this case?

          Chunling

          --- In ploticus@yahoogroups.com, "Stephen C. Grubb" <scg@...> wrote:
          >
          > Hello,
          >
          > one problem is the granularity of your time points appears to be in
          > microseconds. Is a datetime x axis really what you need here? How much
          > time will your presented x axis typically cover (min to max)?
          >
          > With the data shown here I would split off the microsecond component
          into
          > a separate field and use that.
          >
          > Steve
          >
          >
          > On Wed, 23 May 2007, Chunling Ma wrote:
          >
          > > Hi,
          > >
          > > I was trying to plot/illustrate TCP packets received on a
          connection using proc bars.
          > >
          > > The data file looks like this:
          > > 2007-01-24.19:24:27.076245 1 1461
          > > 2007-01-24.19:24:27.077761 1461 2921
          > > 2007-01-24.19:24:27.107724 2921 4381
          > > 2007-01-24.19:24:27.107733 4381 5841
          > > 2007-01-24.19:24:27.107736 5841 7301
          > > 2007-01-24.19:24:27.110223 7301 8761
          > > 2007-01-24.19:24:27.110230 8761 10221
          > > 2007-01-24.19:24:27.110235 10221 11681
          > > 2007-01-24.19:24:27.139203 11681 13141
          > > 2007-01-24.19:24:27.139211 13141 14601
          > >
          > > 1st column: time stamp
          > > 2nd column: start sequence number
          > > 3rd column: end sequence number
          > >
          > > I used datetime as xscaletype. My question is that I don't know
          how to use xautorange, xaxis.stubs, and xaixs.tics in this case to
          generate a gracious graph.
          > >
          > > Below is some snippet of what is in my proc script file:
          > >
          > > #proc areadef
          > > title: received packets
          > > titledetails: align=C size=10
          > > rectangle: 1 1 8 6
          > > xscaletype: datetime yyyy-mm-dd.hh:mm:%2.6f
          > > yscaletype: linear
          > > //xautorange: datafield=1
          > > xrange: 2007-01-24.19:24:27.076245 2007-01-24.19:24:27.139211
          > > yautorange: datafield=2,3
          > >
          > > #proc xaxis
          > > tics: yes
          > > stubs: inc 1 second
          > > minorticinc: %.2f seconds
          > > //stubformat: yyyy-mm-dd.hh:mm:%2.6f
          > >
          > > #proc yaxis
          > > stubs: inc
          > > label: pkts recved
          > >
          > > #proc bars
          > > locfield: 1
          > > segmentfields: 2,3
          > > barwidth: 0.1
          > > color: color=red
          > > outline: yes
          > >
          > > Can anyone help me with that? Thank you very much!
          > >
          > > Chunling
          > >
          > >
          > >
          > >
          > >
          > >
          > >
          > >
          ____________________________________________________________________________________Pinpoint
          customers who are looking for what you sell.
          > > http://searchmarketing.yahoo.com/
          >
          >
          > Stephen C. Grubb scg@... x-6633
          > Scientific Software Engineer, The Jackson Laboratory
          > 600 Main Street Bar Harbor, Maine 04609 USA
          >
        • Stephen C. Grubb
          Chunling, I would say that datetime scaling is overkill if you are just displaying 30 seconds worth of data at a time. You can use proc getdata s filter
          Message 4 of 7 , May 29 5:40 AM
          • 0 Attachment
            Chunling,

            I would say that datetime scaling is overkill if you are just displaying
            30 seconds worth of data at a time.

            You can use proc getdata's 'filter' attribute to break up or otherwise
            process your datetime field in various ways. Check out the proc getdata
            man page for some examples of this.

            For instance, you might want to keep only minutes, seconds, and
            microseconds. Then you could use simple numeric scaling for the X axis.

            I'm not sure how you are selecting 30 second intervals.. if they are
            randomly selected then you'd have to account for the occasional boundary
            condition when 59 minutes becomes 00.

            Hope this is useful,

            Steve


            On Thu, 24 May 2007, Horsie wrote:

            > Thank you, Steve.
            >
            > I would like to cover 30 seconds of packets arrivals. so I guess I
            > will need at least seconds and microseconds in this case, right?
            >
            > What do you mean to split off the microsecond into a separate field?
            > You mean one field still remains as datetime such as
            > yyyy-mm-dd.hh:mm:ss, and another field is microsecond alone? How do I
            > use 2 fields combined for x aixs in this case?
            >
            > Chunling
            >
            > --- In ploticus@yahoogroups.com, "Stephen C. Grubb" <scg@...> wrote:
            > >
            > > Hello,
            > >
            > > one problem is the granularity of your time points appears to be in
            > > microseconds. Is a datetime x axis really what you need here? How much
            > > time will your presented x axis typically cover (min to max)?
            > >
            > > With the data shown here I would split off the microsecond component
            > into
            > > a separate field and use that.
            > >
            > > Steve
            > >
            > >
            > > On Wed, 23 May 2007, Chunling Ma wrote:
            > >
            > > > Hi,
            > > >
            > > > I was trying to plot/illustrate TCP packets received on a
            > connection using proc bars.
            > > >
            > > > The data file looks like this:
            > > > 2007-01-24.19:24:27.076245 1 1461
            > > > 2007-01-24.19:24:27.077761 1461 2921
            > > > 2007-01-24.19:24:27.107724 2921 4381
            > > > 2007-01-24.19:24:27.107733 4381 5841
            > > > 2007-01-24.19:24:27.107736 5841 7301
            > > > 2007-01-24.19:24:27.110223 7301 8761
            > > > 2007-01-24.19:24:27.110230 8761 10221
            > > > 2007-01-24.19:24:27.110235 10221 11681
            > > > 2007-01-24.19:24:27.139203 11681 13141
            > > > 2007-01-24.19:24:27.139211 13141 14601
            > > >
            > > > 1st column: time stamp
            > > > 2nd column: start sequence number
            > > > 3rd column: end sequence number
            > > >
            > > > I used datetime as xscaletype. My question is that I don't know
            > how to use xautorange, xaxis.stubs, and xaixs.tics in this case to
            > generate a gracious graph.
            > > >
            > > > Below is some snippet of what is in my proc script file:
            > > >
            > > > #proc areadef
            > > > title: received packets
            > > > titledetails: align=C size=10
            > > > rectangle: 1 1 8 6
            > > > xscaletype: datetime yyyy-mm-dd.hh:mm:%2.6f
            > > > yscaletype: linear
            > > > //xautorange: datafield=1
            > > > xrange: 2007-01-24.19:24:27.076245 2007-01-24.19:24:27.139211
            > > > yautorange: datafield=2,3
            > > >
            > > > #proc xaxis
            > > > tics: yes
            > > > stubs: inc 1 second
            > > > minorticinc: %.2f seconds
            > > > //stubformat: yyyy-mm-dd.hh:mm:%2.6f
            > > >
            > > > #proc yaxis
            > > > stubs: inc
            > > > label: pkts recved
            > > >
            > > > #proc bars
            > > > locfield: 1
            > > > segmentfields: 2,3
            > > > barwidth: 0.1
            > > > color: color=red
            > > > outline: yes
            > > >
            > > > Can anyone help me with that? Thank you very much!
            > > >
            > > > Chunling
            > > >
            > > >
            > > >
            > > >
            > > >
            > > >
            > > >
            > > >
            > ____________________________________________________________________________________Pinpoint
            > customers who are looking for what you sell.
            > > > http://searchmarketing.yahoo.com/
            > >
            > >
            > > Stephen C. Grubb scg@... x-6633
            > > Scientific Software Engineer, The Jackson Laboratory
            > > 600 Main Street Bar Harbor, Maine 04609 USA
            > >
            >
            >
            >


            Stephen C. Grubb scg@... x-6633
            Scientific Software Engineer, The Jackson Laboratory
            600 Main Street Bar Harbor, Maine 04609 USA
          • Chunling Ma
            Steve, I see your point. But right now, my problem is that I collected data for a few seconds (at most 10 seconds actually) every 30 minutes for one week. So
            Message 5 of 7 , May 29 8:34 AM
            • 0 Attachment
              Steve,

                  I see your point. But right now, my problem is that I collected data for a few seconds (at most 10 seconds actually) every 30 minutes for one week. So there were some data points that crossed boundaries of minutes, hours, even days. That's why I used the datetime format. Is there a way that ploticus can handle this? I used to use gnuplot, and it was able to plot this case. But I was thinking of converting to ploticus from now on since the pictures it generate look nicer. If it can't handle this case, I guess I would have to stay with gnuplot. Thank you very much!

              Chunling
              ----- Original Message ----
              From: Stephen C. Grubb <scg@...>
              To: ploticus@yahoogroups.com
              Sent: Tuesday, May 29, 2007 8:40:37 AM
              Subject: Re: [ploticus] Re: Question on using datetime format

              Chunling,

              I would say that datetime scaling is overkill if you are just displaying
              30 seconds worth of data at a time.

              You can use proc getdata's 'filter' attribute to break up or otherwise
              process your datetime field in various ways. Check out the proc getdata
              man page for some examples of this.

              For instance, you might want to keep only minutes, seconds, and
              microseconds. Then you could use simple numeric scaling for the X axis.

              I'm not sure how you are selecting 30 second intervals.. if they are
              randomly selected then you'd have to account for the occasional boundary
              condition when 59 minutes becomes 00.

              Hope this is useful,

              Steve

              On Thu, 24 May 2007, Horsie wrote:

              > Thank you, Steve.
              >
              > I would like to cover 30 seconds of packets arrivals. so I guess I
              > will need at least seconds and microseconds in this case, right?
              >
              > What do you mean to split off the microsecond into a separate field?
              > You mean one field still remains as datetime such as
              > yyyy-mm-dd.hh: mm:ss, and another field is microsecond alone? How do I
              > use 2 fields combined for x aixs in this case?
              >
              > Chunling
              >
              > --- In ploticus@yahoogroup s.com, "Stephen C. Grubb" <scg@...> wrote:
              > >
              > > Hello,
              > >
              > > one problem is the granularity of your time points appears to be in
              > > microseconds. Is a datetime x axis really what you need here? How much
              > > time will your presented x axis typically cover (min to max)?
              > >
              > > With the data shown here I would split off the microsecond component
              > into
              > > a separate field and use that.
              > >
              > > Steve
              > >
              > >
              > > On Wed, 23 May 2007, Chunling Ma wrote:
              > >
              > > > Hi,
              > > >
              > > > I was trying to plot/illustrate TCP packets received on a
              > connection using proc bars.
              > > >
              > > > The data file looks like this:
              > > > 2007-01-24.19: 24:27.076245 1 1461
              > > > 2007-01-24.19: 24:27.077761 1461 2921
              > > > 2007-01-24.19: 24:27.107724 2921 4381
              > > > 2007-01-24.19: 24:27.107733 4381 5841
              > > > 2007-01-24.19: 24:27.107736 5841 7301
              > > > 2007-01-24.19: 24:27.110223 7301 8761
              > > > 2007-01-24.19: 24:27.110230 8761 10221
              > > > 2007-01-24.19: 24:27.110235 10221 11681
              > > > 2007-01-24.19: 24:27.139203 11681 13141
              > > > 2007-01-24.19: 24:27.139211 13141 14601
              > > >
              > > > 1st column: time stamp
              > > > 2nd column: start sequence number
              > > > 3rd column: end sequence number
              > > >
              > > > I used datetime as xscaletype. My question is that I don't know
              > how to use xautorange, xaxis.stubs, and xaixs.tics in this case to
              > generate a gracious graph.
              > > >
              > > > Below is some snippet of what is in my proc script file:
              > > >
              > > > #proc areadef
              > > > title: received packets
              > > > titledetails: align=C size=10
              > > > rectangle: 1 1 8 6
              > > > xscaletype: datetime yyyy-mm-dd.hh: mm:%2.6f
              > > > yscaletype: linear
              > > > //xautorange: datafield=1
              > > > xrange: 2007-01-24.19: 24:27.076245 2007-01-24.19: 24:27.139211
              > > > yautorange: datafield=2, 3
              > > >
              > > > #proc xaxis
              > > > tics: yes
              > > > stubs: inc 1 second
              > > > minorticinc: %.2f seconds
              > > > //stubformat: yyyy-mm-dd.hh: mm:%2.6f
              > > >
              > > > #proc yaxis
              > > > stubs: inc
              > > > label: pkts recved
              > > >
              > > > #proc bars
              > > > locfield: 1
              > > > segmentfields: 2,3
              > > > barwidth: 0.1
              > > > color: color=red
              > > > outline: yes
              > > >
              > > > Can anyone help me with that? Thank you very much!
              > > >
              > > > Chunling
              > > >
              > > >
              > > >
              > > >
              > > >
              > > >
              > > >
              > > >
              > ____________ _________ _________ _________ _________ _________ _Pinpoint
              > customers who are looking for what you sell.
              > > > http://searchmarket ing.yahoo. com/
              > >
              > >
              > > Stephen C. Grubb scg@... x-6633
              > > Scientific Software Engineer, The Jackson Laboratory
              > > 600 Main Street Bar Harbor, Maine 04609 USA
              > >
              >
              >
              >

              Stephen C. Grubb scg@... x-6633
              Scientific Software Engineer, The Jackson Laboratory
              600 Main Street Bar Harbor, Maine 04609 USA




              Yahoo! oneSearch: Finally, mobile search that gives answers, not web links.
            • Stephen C. Grubb
              Hi Chunling, I understand now what you re trying to do and agree it would be nice if ploticus could do this, but spent a few minutes trying various things and
              Message 6 of 7 , May 31 5:42 AM
              • 0 Attachment
                Hi Chunling,

                I understand now what you're trying to do and agree it would be nice if
                ploticus could do this, but spent a few minutes trying various things and
                can't get any good results.

                With datetime scaling it seems to be require at least 1 second between
                axis min and max. Further, the axis routine can't operate at less than
                minutes granularity.

                If I were doing this I would probably write a small external filter
                program (C, perl, whatever) to process the data before it reaches ploticus
                (it could be invoked via proc getdata 'command'). This filter would check
                for a change in the seconds field... after that occurs it would add
                1000000 to the microseconds field. This would handle all boundary issues.
                It would then output the datetime and the massaged microseconds field.
                Then pl could plot using the microseconds field (only) as a plain numeric.
                I would then identify the date and time in the plot title.


                Steve


                On Tue, 29 May 2007, Chunling Ma wrote:

                > Steve,
                >
                > I see your point. But right now, my problem is that I collected data
                > for a few seconds (at most 10 seconds actually) every 30 minutes for one
                > week. So there were some data points that crossed boundaries of minutes,
                > hours, even days. That's why I used the datetime format. Is there a way
                > that ploticus can handle this? I used to use gnuplot, and it was able to
                > plot this case. But I was thinking of converting to ploticus from now on
                > since the pictures it generate look nicer. If it can't handle this case,
                > I guess I would have to stay with gnuplot. Thank you very much!
                >
                > Chunling
              Your message has been successfully submitted and would be delivered to recipients shortly.