graphite-dev team mailing list archive
-
graphite-dev team
-
Mailing list archive
-
Message #00254
Re: [Question #99926]: gaps in graphs when viewing small time frames? Bug or User error?
Question #99926 on Graphite changed:
https://answers.launchpad.net/graphite/+question/99926
Status: Needs information => Open
AcidTonic gave more information on the question:
it doesnt look as expected but I'm confused how it could be doing
this...
1265224860 0.000500
1265224920 0.000500
1265224980 0.000000
1265225040 0.001500
1265225100 0.000000
1265225160 0.001500
1265225220 0.101500
1265225280 0.000500
1265225340 0.001000
1265225400 0.002000
1265225460 0.001000
1265225520 0.000000
1265225580 0.002500
1265225640 0.001500
1265225700 0.079000
1265225760 0.001500
1265225820 0.001500
1265225880 0.102500
1265225940 0.101500
1265226000 0.002000
1265226060 0.300500
1265226120 0.079000
1265226180 0.002500
1265226240 0.001000
1265226300 0.001000
1265226360 0.301000
1265226420 0.001500
1265226480 0.000000
1265226540 0.001500
1265226600 0.000500
1265226660 0.400500
1265226720 0.003000
1265226780 0.000000
1265226840 0.402000
1265226900 0.001000
1265226960 0.402500
1265227020 0.040500
1265227080 0.000000
1265227140 0.000500
1265227200 0.100500
1265227260 0.001000
1265227320 0.000000
1265227380 0.000500
1265227440 0.201000
1265227500 0.001500
1265227560 0.322500
1265227620 0.000000
1265227680 0.000500
1265227740 0.000000
1265227800 0.000000
1265227860 0.001500
1265227920 0.001500
1265227980 0.000000
1265228040 0.000000
1265228100 0.000500
1265228160 0.000000
1265228220 0.001000
1265228280 0.000500
1265228340 0.399000
1265228400 0.000500
1265228460 0.000000
1265228520 0.001000
1265228580 0.600500
1265228640 0.001000
1265228700 0.001500
1265228760 0.121500
1265228820 0.101500
1265228880 0.400000
1265228940 0.000500
1265229000 0.100000
1265229060 0.000500
1265229120 0.000000
1265229180 0.302000
1265229240 0.000000
1265229300 0.000500
1265229360 0.000000
1265229420 0.000000
1265229480 0.602500
1265229540 0.000000
1265229600 0.100000
1265229660 0.200000
1265229720 0.200500
1265229780 0.000000
1265229840 0.200000
1265229900 0.003000
1265229960 0.006000
1265230020 0.000500
1265230080 0.001000
1265230140 0.000000
1265230200 0.000000
1265230260 0.000000
1265230320 0.101500
1265230380 0.000000
1265230440 0.000000
1265230500 0.499500
1265230560 0.000000
1265230620 0.101000
1265230680 0.000000
1265230740 0.001500
1265230800 0.275000
1265230860 0.000000
1265230920 0.000000
1265230980 0.201500
1265231040 0.201500
1265231100 0.500500
1265231160 0.003500
1265231220 0.000500
1265231280 0.001000
1265231340 0.000000
1265231400 0.600500
1265231460 0.000000
1265231520 0.201000
1265231580 0.000000
1265231640 0.000000
1265231700 0.001000
1265231760 0.000000
1265231820 0.100500
1265231880 0.000000
1265231940 0.000500
1265232000 0.000000
1265232060 0.002000
1265232120 0.000000
1265232180 0.000500
1265232240 0.306500
1265232300 0.103500
1265232360 0.000000
1265232420 0.604000
1265232480 0.503000
1265232540 0.200500
1265232600 0.100000
1265232660 0.078500
1265232720 0.101500
1265232780 0.000000
1265232840 0.101500
1265232900 0.100500
1265232960 0.099000
1265233020 0.501000
1265233080 0.000500
1265233140 0.001000
1265233200 0.200500
1265233260 0.000000
1265233320 0.600500
1265233380 0.200000
1265233440 0.102000
1265233500 0.199500
1265233560 0.001000
1265233620 0.000000
1265233680 0.000000
1265233740 0.104000
1265233800 0.007000
1265233860 0.102000
1265233920 0.099500
1265233980 0.100000
1265234040 0.001500
1265234100 0.199500
1265234160 0.000000
That isnt all of it just a section.... Ok also here is my program that is
capturing data. This was just something to play around with and get to know
graphite, pardon the ugliness :)
#!/usr/bin/python
import sys
import time
from socket import socket
import psutil
import types
CARBON_SERVER = '127.0.0.1'
CARBON_PORT = 2003
data_delay = 0.5
transmit_delay = 5
last_transmit = 0
class Metrics():
def __init__(self):
self.setup_mongodb()
def get_loadavg(self,lines, now):
#We're gonna report all three loadavg values
(loadavg_1, loadavg_5, loadavg_15) =
open('/proc/loadavg').read().strip().split()[:3]
lines.append("system.loadavg_1min %s %d" % (loadavg_1,now))
lines.append("system.loadavg_5min %s %d" % (loadavg_5,now))
lines.append("system.loadavg_15min %s %d" % (loadavg_15,now))
def get_memory(self,lines, now):
#Physical
lines.append("system.total_phymem %d %d" % (psutil.TOTAL_PHYMEM,now))
lines.append("system.avail_phymem %d %d" % (psutil.avail_phymem(),now))
lines.append("system.used_phymem %d %d" % (psutil.used_phymem(),now))
#Virtual
lines.append("system.total_virtmem %d %d" %
(psutil.total_virtmem(),now))
lines.append("system.avail_virtmem %d %d" %
(psutil.avail_virtmem(),now))
lines.append("system.used_virtmem %d %d" % (psutil.used_virtmem(),now))
def get_cpu(self,lines, now):
lines.append("system.cpu_util_percent %.2f %d" % (psutil.cpu_percent()
,now))
def setup_mongodb(self):
from pymongo import Connection
self.con = Connection('127.0.0.1', 27017)
self.db = self.con.devices
def add_list(self,lines,now,results,node):
for key in results:
value = results[key]
if type(value) == types.DictType or type(value) == types.ListType:
self.add_list(lines,now,value,'%s.%s' % (node,key))
else:
lines.append("%s.%s %d %d" % (node,key,results[key],now))
def get_mongodb(self,lines,now):
results = self.db.command({'serverStatus':1})
self.add_list(lines,now,results,'system.db.mongo')
#{u'mem': {u'resident': 3, u'supported': True, u'virtual': 153,
u'mapped': 80}, u'uptime': 77237.0, u'ok': 1.0, u'globalLock':
{u'totalTime': 77236380176.0, u'lockTime': 849270.0, u'ratio':
1.0995725046471008e-05}}
sock = socket()
try:
sock.connect( (CARBON_SERVER,CARBON_PORT) )
except:
print "Couldn't connect to localhost on port %d, is carbon-agent.py
running?" % CARBON_PORT
sys.exit(1)
linecount = 0
metrics = Metrics()
while True:
now = int( time.time() )
lines = []
metrics.get_loadavg(lines,now)
metrics.get_memory(lines,now)
metrics.get_cpu(lines, now)
metrics.get_mongodb(lines,now)
linecount += len(lines)
message = '\n'.join(lines) + '\n' #all lines must end in a newline
print message
if now - last_transmit > transmit_delay:
print 'sending :%s updates' % linecount
sock.sendall(message)
linecount = 0
last_transmit = now
time.sleep(data_delay)
On Mon, Feb 8, 2010 at 1:20 AM, chrismd <question99926@xxxxxxxxxxxxxxxxxxxxx
> wrote:
> Your question #99926 on Graphite changed:
> https://answers.launchpad.net/graphite/+question/99926
>
> Status: Open => Needs information
>
> chrismd requested for more information:
> Hm... I think it would be beneficial to look at the raw data in the
> database.
>
> Can you run the following:
>
> whisper-fetch.py --from 1264975477 --until=1264975489
> $GRAPHITE_ROOT/storage/whisper/system/cpu_util_percent.wsp
>
> The output should reflect the data below (derived from your output
> above).
>
> Value Timestamp
> ---------------------------
> 0.00 1264975477
> 0.00 1264975478
> 0.00 1264975479
> 0.00 1264975480
> 0.00 1264975481
> 0.00 1264975482
> 0.00 1264975483
> 0.00 1264975484
> 2.00 1264975485
> 2.00 1264975486
> 0.00 1264975487
> 0.00 1264975488
> 0.01 1264975489
>
> If the output matches this data then the data is being stored properly
> and it must be a rendering issue (assuming graphs of this particular
> time span show gaps). If the output does not match this data then we
> know something is going wrong in the storage process, and an approximate
> timestamp of an error.
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/graphite/+question/99926
>
> You received this question notification because you are a direct
> subscriber of the question.
>
--
You received this question notification because you are a member of
graphite-dev, which is an answer contact for Graphite.