Open tuanden0 opened 3 years ago
There is one more value return when fetch the RRD file.
Here is result with rrdtool 1.4.x:
root@fc0687556c4c:/opt/cacti/rra# rrdtool fetch local_linux_machine_proc_1.rrd AVERAGE -s now-10m -e now-10m proc 1628756100: 3.1206666667e+01
Here is result with rrd go 0.0.3:
[root@93b53ddd9911 rrd]# go run main.go /tmp/rra/local_linux_machine_proc_1.rrd 2021/08/12 15:24:32 2021-08-12 15:14:32.7134773 +0700 +07 m=-599.999935099 2021/08/12 15:24:32 Start: 2021-08-12 15:10:00 +0700 +07 2021/08/12 15:24:32 End: 2021-08-12 15:15:00 +0700 +07 2021/08/12 15:24:32 Step: 5m0s 2021/08/12 15:24:32 RowCnt: 2 2021/08/12 15:24:32 DsNames : [proc] 2021/08/12 15:24:32 {Filename:/tmp/rra/local_linux_machine_proc_1.rrd Cf:AVERAGE Start:2021-08-12 15:10:00 +0700 +07 End:2021-08-12 15:15:00 +0700 +07 Step:5m0s DsNames:[proc] RowCnt:2 values:[31.206666666666667 0]}
There is one more value return when fetch the RRD file.
Here is result with rrdtool 1.4.x:
Here is result with rrd go 0.0.3: