[rrd-users] Returning nan values

Emily Chouinard cousin17 at msu.edu
Thu Jun 19 19:36:55 CEST 2008

So I've got my code all done but my update function doesn't work. I want 
to take the values from the /proc/stat file and update my rrd with them 
but when I do an rrdtool fetch cpu.rrd AVERAGE and several interations I 
 fetch cpu.rrd AVERAGE
                           user                nice                 
sys               idle

1213810500: nan nan nan nan
1213810800: nan nan nan nan
1213811100: nan nan nan nan

(but that is just a small glip of all the nan values I get) I was 
wondering if my update function was correct, my rrd is created properly 

and then I run a loop to extract the data from a file
 infile= open('/proc/stat', 'r')
    #for x in range(0,1):
    line = infile.readline()
    if line.startswith('cpu'):
    info = line.split()   
    user = info[1]
    nice = info[2]    
    sys = info[3]
    idle = info[4]
and then I try to update these values from user, nice sys and idle into 
my rrd with

but it only gives my nan values, any suggestions on why this is?

More information about the rrd-users mailing list