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

Graphing Online modems

Expand Messages
  • drtrry5
    Hello, I currently have a script that goes out and polls devices on a network for the number of cable modems that it has that are online and offline. While
    Message 1 of 4 , Apr 29 1:37 PM
      Hello,

      I currently have a script that goes out and polls devices on a
      network for the number of cable modems that it has that are online and
      offline. While recording this, it places a time stamp into the table
      on the database. I am currently trying to use this data to create a
      graph of modems which are online and which are offline. The following
      is what i have so far (currently trying to graph online only):

      /usr/bin/ploticus -png -prefab chron data=/tmp/mdmcnt -o
      /var/www/graphs/mdmon.png x=2 y=1 datefmt=yyyy-mm-dd tab=day xinc="1
      day" barwidth=line stubfmt=MMMdd unittype=datetime title="Online
      modems" linedet=color="green"

      Here is the data:
      261986 2008-04-29.13:42
      268978 2008-04-27.12:22
      279328 2008-04-27.12:17
      279327 2008-04-27.12:14
      279319 2008-04-27.12:03
      278790 2008-04-27.10:13
      269277 2008-04-27.10:09
      278759 2008-04-27.10:07
      278729 2008-04-27.10:03
      258357 2008-04-27.10:00

      The debug/error output:
      Got command line arg(s): -png
      Prefabs dir is: /usr/share/ploticus
      Script file is /usr/share/ploticus/chron.pl
      Got command line arg(s): data=/root/test ...setting var data to:
      /root/test.
      Got command line arg(s): -o /root/mdmon.png
      Got command line arg(s): y=1 ...setting var y to: 1.
      Got command line arg(s): x=2 ...setting var x to: 2.
      Got command line arg(s): datefmt=yyyy-mm-dd ...setting var datefmt
      to: yyyy-mm-dd.
      Got command line arg(s): tab=day ...setting var tab to: day.
      Got command line arg(s): xinc=1 day ...setting var xinc to: 1 day.
      Got command line arg(s): barwidth=line ...setting var barwidth to: line.
      Got command line arg(s): stubfmt=MMMdd ...setting var stubfmt to: MMMdd.
      Got command line arg(s): unittype=datetime ...setting var unittype
      to: datetime.
      Got command line arg(s): range=2008-04-26 2008-04-28 ...setting var
      range to: 2008-04-26 2008-04-28.
      Got command line arg(s): title=Online modems ...setting var title to:
      Online modems.
      Got command line arg(s): linedet=color=green ...setting var linedet
      to: color=green.
      Got command line arg(s): echodata=yes ...setting var echodata to: yes.
      Device code is g
      Setting output file name to /root/mdmon.png
      Version: pl 2.33-Jun'06
      Script file is: /usr/share/ploticus/chron.pl
      Script file successfully opened
      Executing settings
      Executing settings
      Executing getdata
      filling data set# 0
      getdata has read 10 records; there are 2 fields per record.
      // proc getdata has read & parsed these data:
      [2008-04-29.12:00][261986]
      [2008-04-27.12:00][268978]
      [2008-04-27.12:00][279328]
      [2008-04-27.12:00][279327]
      [2008-04-27.12:00][279319]
      [2008-04-27.12:00][278790]
      [2008-04-27.12:00][269277]
      [2008-04-27.12:00][278759]
      [2008-04-27.12:00][278729]
      [2008-04-27.12:00][258357]
      Got 10 records, 2 fields per record.
      (endproc)
      Executing processdata
      filling data set# 1 (this will now be the current data set)
      (endproc)
      Executing areadef
      Autorange on x: min=2008-04-26.-2147483648:-2147483648 to
      max=2008-05-01.0:00
      Autorange on y: min=0 to max=3e+06
      pl proc areadef: error 205: range low value has invalid format
      (2008-04-26.-2147483648:-2147483648)
      areadef: lowerleft: 1,2 upperright: 5.5,4
      areadef: xrange is 2008-04-26.-2147483648:-2147483648 to
      2008-05-01.0:00. yrange is 0 to 3e+06.
      Executing yaxis
      Executing xaxis
      pl proc axis: error 5729: warning, too many stubs/major tics, circuit
      breaker tripped
      Executing annotate
      (endproc)
      Executing bars
      Done with page. Writing out result file. Computed bounding box is:
      0.41 , 1.79 to 5.50 , 4.37

      How can i set a min max for xrange if it is going to constantly be
      changing? I supposed i could pull the info and place a variable in min
      max before the command executes? Is there any other way to do this?
    • Sheahan, John
      I ve had to do something similar. I defined the xscaletype and told it what column and format. Then I used variables for the xrange and I set the y axis to
      Message 2 of 4 , Apr 30 9:47 AM
        I've had to do something similar. I defined the xscaletype and told it what column and format. Then I used variables for the xrange and I set the y axis to autorange and then told it what colunm to use and where to start it:
         
        xscaletype: datetime yyyy-mm-dd.hh:mm
        xrange: @STARTDAY.00:00 @DATE.@NOW
        yautorange: datafield=tspeed lowfix=0
         
        john
         


        From: ploticus@yahoogroups.com [mailto:ploticus@yahoogroups.com] On Behalf Of drtrry5
        Sent: Tuesday, April 29, 2008 4:37 PM
        To: ploticus@yahoogroups.com
        Subject: [ploticus] Graphing Online modems

        Hello,

        I currently have a script that goes out and polls devices on a
        network for the number of cable modems that it has that are online and
        offline. While recording this, it places a time stamp into the table
        on the database. I am currently trying to use this data to create a
        graph of modems which are online and which are offline. The following
        is what i have so far (currently trying to graph online only):

        /usr/bin/ploticus -png -prefab chron data=/tmp/mdmcnt -o
        /var/www/graphs/ mdmon.png x=2 y=1 datefmt=yyyy- mm-dd tab=day xinc="1
        day" barwidth=line stubfmt=MMMdd unittype=datetime title="Online
        modems" linedet=color= "green"

        Here is the data:
        261986 2008-04-29.13: 42
        268978 2008-04-27.12: 22
        279328 2008-04-27.12: 17
        279327 2008-04-27.12: 14
        279319 2008-04-27.12: 03
        278790 2008-04-27.10: 13
        269277 2008-04-27.10: 09
        278759 2008-04-27.10: 07
        278729 2008-04-27.10: 03
        258357 2008-04-27.10: 00

        The debug/error output:
        Got command line arg(s): -png
        Prefabs dir is: /usr/share/ploticus
        Script file is /usr/share/ploticus /chron.pl
        Got command line arg(s): data=/root/test ...setting var data to:
        /root/test.
        Got command line arg(s): -o /root/mdmon. png
        Got command line arg(s): y=1 ...setting var y to: 1.
        Got command line arg(s): x=2 ...setting var x to: 2.
        Got command line arg(s): datefmt=yyyy- mm-dd ...setting var datefmt
        to: yyyy-mm-dd.
        Got command line arg(s): tab=day ...setting var tab to: day.
        Got command line arg(s): xinc=1 day ...setting var xinc to: 1 day.
        Got command line arg(s): barwidth=line ...setting var barwidth to: line.
        Got command line arg(s): stubfmt=MMMdd ...setting var stubfmt to: MMMdd.
        Got command line arg(s): unittype=datetime ...setting var unittype
        to: datetime.
        Got command line arg(s): range=2008-04- 26 2008-04-28 ...setting var
        range to: 2008-04-26 2008-04-28.
        Got command line arg(s): title=Online modems ...setting var title to:
        Online modems.
        Got command line arg(s): linedet=color= green ...setting var linedet
        to: color=green.
        Got command line arg(s): echodata=yes ...setting var echodata to: yes.
        Device code is g
        Setting output file name to /root/mdmon. png
        Version: pl 2.33-Jun'06
        Script file is: /usr/share/ploticus /chron.pl
        Script file successfully opened
        Executing settings
        Executing settings
        Executing getdata
        filling data set# 0
        getdata has read 10 records; there are 2 fields per record.
        // proc getdata has read & parsed these data:
        [2008-04-29. 12:00][261986]
        [2008-04-27. 12:00][268978]
        [2008-04-27. 12:00][279328]
        [2008-04-27. 12:00][279327]
        [2008-04-27. 12:00][279319]
        [2008-04-27. 12:00][278790]
        [2008-04-27. 12:00][269277]
        [2008-04-27. 12:00][278759]
        [2008-04-27. 12:00][278729]
        [2008-04-27. 12:00][258357]
        Got 10 records, 2 fields per record.
        (endproc)
        Executing processdata
        filling data set# 1 (this will now be the current data set)
        (endproc)
        Executing areadef
        Autorange on x: min=2008-04- 26.-2147483648: -2147483648 to
        max=2008-05- 01.0:00
        Autorange on y: min=0 to max=3e+06
        pl proc areadef: error 205: range low value has invalid format
        (2008-04-26. -2147483648: -2147483648)
        areadef: lowerleft: 1,2 upperright: 5.5,4
        areadef: xrange is 2008-04-26.- 2147483648: -2147483648 to
        2008-05-01.0: 00. yrange is 0 to 3e+06.
        Executing yaxis
        Executing xaxis
        pl proc axis: error 5729: warning, too many stubs/major tics, circuit
        breaker tripped
        Executing annotate
        (endproc)
        Executing bars
        Done with page. Writing out result file. Computed bounding box is:
        0.41 , 1.79 to 5.50 , 4.37

        How can i set a min max for xrange if it is going to constantly be
        changing? I supposed i could pull the info and place a variable in min
        max before the command executes? Is there any other way to do this?

      • drtrry5
        ... line. ... MMMdd. ... I have fixed my original issue. I have one other question. I have uploaded an example here...
        Message 3 of 4 , Apr 30 10:44 AM
          --- In ploticus@yahoogroups.com, "drtrry5" <drtrry5@...> wrote:
          >
          > Hello,
          >
          > I currently have a script that goes out and polls devices on a
          > network for the number of cable modems that it has that are online and
          > offline. While recording this, it places a time stamp into the table
          > on the database. I am currently trying to use this data to create a
          > graph of modems which are online and which are offline. The following
          > is what i have so far (currently trying to graph online only):
          >
          > /usr/bin/ploticus -png -prefab chron data=/tmp/mdmcnt -o
          > /var/www/graphs/mdmon.png x=2 y=1 datefmt=yyyy-mm-dd tab=day xinc="1
          > day" barwidth=line stubfmt=MMMdd unittype=datetime title="Online
          > modems" linedet=color="green"
          >
          > Here is the data:
          > 261986 2008-04-29.13:42
          > 268978 2008-04-27.12:22
          > 279328 2008-04-27.12:17
          > 279327 2008-04-27.12:14
          > 279319 2008-04-27.12:03
          > 278790 2008-04-27.10:13
          > 269277 2008-04-27.10:09
          > 278759 2008-04-27.10:07
          > 278729 2008-04-27.10:03
          > 258357 2008-04-27.10:00
          >
          > The debug/error output:
          > Got command line arg(s): -png
          > Prefabs dir is: /usr/share/ploticus
          > Script file is /usr/share/ploticus/chron.pl
          > Got command line arg(s): data=/root/test ...setting var data to:
          > /root/test.
          > Got command line arg(s): -o /root/mdmon.png
          > Got command line arg(s): y=1 ...setting var y to: 1.
          > Got command line arg(s): x=2 ...setting var x to: 2.
          > Got command line arg(s): datefmt=yyyy-mm-dd ...setting var datefmt
          > to: yyyy-mm-dd.
          > Got command line arg(s): tab=day ...setting var tab to: day.
          > Got command line arg(s): xinc=1 day ...setting var xinc to: 1 day.
          > Got command line arg(s): barwidth=line ...setting var barwidth to:
          line.
          > Got command line arg(s): stubfmt=MMMdd ...setting var stubfmt to:
          MMMdd.
          > Got command line arg(s): unittype=datetime ...setting var unittype
          > to: datetime.
          > Got command line arg(s): range=2008-04-26 2008-04-28 ...setting var
          > range to: 2008-04-26 2008-04-28.
          > Got command line arg(s): title=Online modems ...setting var title to:
          > Online modems.
          > Got command line arg(s): linedet=color=green ...setting var linedet
          > to: color=green.
          > Got command line arg(s): echodata=yes ...setting var echodata to: yes.
          > Device code is g
          > Setting output file name to /root/mdmon.png
          > Version: pl 2.33-Jun'06
          > Script file is: /usr/share/ploticus/chron.pl
          > Script file successfully opened
          > Executing settings
          > Executing settings
          > Executing getdata
          > filling data set# 0
          > getdata has read 10 records; there are 2 fields per record.
          > // proc getdata has read & parsed these data:
          > [2008-04-29.12:00][261986]
          > [2008-04-27.12:00][268978]
          > [2008-04-27.12:00][279328]
          > [2008-04-27.12:00][279327]
          > [2008-04-27.12:00][279319]
          > [2008-04-27.12:00][278790]
          > [2008-04-27.12:00][269277]
          > [2008-04-27.12:00][278759]
          > [2008-04-27.12:00][278729]
          > [2008-04-27.12:00][258357]
          > Got 10 records, 2 fields per record.
          > (endproc)
          > Executing processdata
          > filling data set# 1 (this will now be the current data set)
          > (endproc)
          > Executing areadef
          > Autorange on x: min=2008-04-26.-2147483648:-2147483648 to
          > max=2008-05-01.0:00
          > Autorange on y: min=0 to max=3e+06
          > pl proc areadef: error 205: range low value has invalid format
          > (2008-04-26.-2147483648:-2147483648)
          > areadef: lowerleft: 1,2 upperright: 5.5,4
          > areadef: xrange is 2008-04-26.-2147483648:-2147483648 to
          > 2008-05-01.0:00. yrange is 0 to 3e+06.
          > Executing yaxis
          > Executing xaxis
          > pl proc axis: error 5729: warning, too many stubs/major tics, circuit
          > breaker tripped
          > Executing annotate
          > (endproc)
          > Executing bars
          > Done with page. Writing out result file. Computed bounding box is:
          > 0.41 , 1.79 to 5.50 , 4.37
          >
          > How can i set a min max for xrange if it is going to constantly be
          > changing? I supposed i could pull the info and place a variable in min
          > max before the command executes? Is there any other way to do this?
          >


          I have fixed my original issue. I have one other question. I have
          uploaded an example here...
          http://img120.imageshack.us/img120/9177/mdmonts7.png. Where the hell
          is the Apr08 coming from in the bottom left corner?

          The script that i am using for this:

          PLOTICUS_PREFABS=/usr/share/ploticus; export PLOTICUS_PREFABS

          MDMMIN=`tail -1 /tmp/mdmcnt | awk '{print$2}'`
          MDMMAX=`head -1 /tmp/mdmcnt | awk '{print$2}'`

          /usr/bin/ploticus -debug -png -prefab chron data=/tmp/mdmcnt -o
          /var/www/graphs/mdmon.png unittype=datetime header=no mode=line
          datefmt=yyyy-mm-dd x=2 y=1 xrange="$MDMMIN $MDMMAX" xinc="hour"
          title="Online Modems"
        • Stephen C. Grubb
          Hi, sorry about the delay in responding to this... I see a couple problems with what you re doing. 1) The data need to be in chronological order... yours
          Message 4 of 4 , Aug 1, 2008
            Hi, sorry about the delay in responding to this...

            I see a couple problems with what you're doing.

            1) The data need to be in chronological order... yours appear to be in
            reverse chronological order.

            2) I believe you need to indicate that your data field #2 is datetime.

            I used this command (all on one line)

            pl -prefab chron data=modems.dat x=2 y=1 datefmt=yyyy-mm-dd tab=day
            xinc="1 day" barwidth=line stubfmt=MMMdd unittype=datetime title="Online
            modems" unittype=datetime

            and this data:

            258357 2008-04-27.10:00
            278729 2008-04-27.10:03
            278759 2008-04-27.10:07
            269277 2008-04-27.10:09
            278790 2008-04-27.10:13
            279319 2008-04-27.12:03
            279327 2008-04-27.12:14
            279328 2008-04-27.12:17
            268978 2008-04-27.12:22
            261986 2008-04-29.13:42


            and got the attached gif result.

            The X range and Y range should be automatically determined from your data,
            so you don't need to specify them.

            -Steve


            On Tue, 29 Apr 2008, drtrry5 wrote:

            > Hello,
            >
            > I currently have a script that goes out and polls devices on a
            > network for the number of cable modems that it has that are online and
            > offline. While recording this, it places a time stamp into the table
            > on the database. I am currently trying to use this data to create a
            > graph of modems which are online and which are offline. The following
            > is what i have so far (currently trying to graph online only):
            >
            > /usr/bin/ploticus -png -prefab chron data=/tmp/mdmcnt -o
            > /var/www/graphs/mdmon.png x=2 y=1 datefmt=yyyy-mm-dd tab=day xinc="1
            > day" barwidth=line stubfmt=MMMdd unittype=datetime title="Online
            > modems" linedet=color="green"
            >
            > Here is the data:
            > 261986 2008-04-29.13:42
            > 268978 2008-04-27.12:22
            > 279328 2008-04-27.12:17
            > 279327 2008-04-27.12:14
            > 279319 2008-04-27.12:03
            > 278790 2008-04-27.10:13
            > 269277 2008-04-27.10:09
            > 278759 2008-04-27.10:07
            > 278729 2008-04-27.10:03
            > 258357 2008-04-27.10:00
            >
            > The debug/error output:
            > Got command line arg(s): -png
            > Prefabs dir is: /usr/share/ploticus
            > Script file is /usr/share/ploticus/chron.pl
            > Got command line arg(s): data=/root/test ...setting var data to:
            > /root/test.
            > Got command line arg(s): -o /root/mdmon.png
            > Got command line arg(s): y=1 ...setting var y to: 1.
            > Got command line arg(s): x=2 ...setting var x to: 2.
            > Got command line arg(s): datefmt=yyyy-mm-dd ...setting var datefmt
            > to: yyyy-mm-dd.
            > Got command line arg(s): tab=day ...setting var tab to: day.
            > Got command line arg(s): xinc=1 day ...setting var xinc to: 1 day.
            > Got command line arg(s): barwidth=line ...setting var barwidth to: line.
            > Got command line arg(s): stubfmt=MMMdd ...setting var stubfmt to: MMMdd.
            > Got command line arg(s): unittype=datetime ...setting var unittype
            > to: datetime.
            > Got command line arg(s): range=2008-04-26 2008-04-28 ...setting var
            > range to: 2008-04-26 2008-04-28.
            > Got command line arg(s): title=Online modems ...setting var title to:
            > Online modems.
            > Got command line arg(s): linedet=color=green ...setting var linedet
            > to: color=green.
            > Got command line arg(s): echodata=yes ...setting var echodata to: yes.
            > Device code is g
            > Setting output file name to /root/mdmon.png
            > Version: pl 2.33-Jun'06
            > Script file is: /usr/share/ploticus/chron.pl
            > Script file successfully opened
            > Executing settings
            > Executing settings
            > Executing getdata
            > filling data set# 0
            > getdata has read 10 records; there are 2 fields per record.
            > // proc getdata has read & parsed these data:
            > [2008-04-29.12:00][261986]
            > [2008-04-27.12:00][268978]
            > [2008-04-27.12:00][279328]
            > [2008-04-27.12:00][279327]
            > [2008-04-27.12:00][279319]
            > [2008-04-27.12:00][278790]
            > [2008-04-27.12:00][269277]
            > [2008-04-27.12:00][278759]
            > [2008-04-27.12:00][278729]
            > [2008-04-27.12:00][258357]
            > Got 10 records, 2 fields per record.
            > (endproc)
            > Executing processdata
            > filling data set# 1 (this will now be the current data set)
            > (endproc)
            > Executing areadef
            > Autorange on x: min=2008-04-26.-2147483648:-2147483648 to
            > max=2008-05-01.0:00
            > Autorange on y: min=0 to max=3e+06
            > pl proc areadef: error 205: range low value has invalid format
            > (2008-04-26.-2147483648:-2147483648)
            > areadef: lowerleft: 1,2 upperright: 5.5,4
            > areadef: xrange is 2008-04-26.-2147483648:-2147483648 to
            > 2008-05-01.0:00. yrange is 0 to 3e+06.
            > Executing yaxis
            > Executing xaxis
            > pl proc axis: error 5729: warning, too many stubs/major tics, circuit
            > breaker tripped
            > Executing annotate
            > (endproc)
            > Executing bars
            > Done with page. Writing out result file. Computed bounding box is:
            > 0.41 , 1.79 to 5.50 , 4.37
            >
            > How can i set a min max for xrange if it is going to constantly be
            > changing? I supposed i could pull the info and place a variable in min
            > max before the command executes? Is there any other way to do this?
            >
            >


            Stephen C. Grubb scg@... x-6633
            Scientific Software Engineer, The Jackson Laboratory
            600 Main Street Bar Harbor, Maine 04609 USA
          Your message has been successfully submitted and would be delivered to recipients shortly.