I'm keeping track of data transfers on my network interfaces but want them to be reset to 0
on the 1st of each month.
When I try echo 0
to the rx_bytes
or tx_bytes
files I get this:
bash: /sys/class/net/wlan0/statistics/rx_bytes: Permission denied
I run the command as root.
I also tried copying (overwriting) in a file:
cp: cannot create regular file:‘/sys/class/net/wlan0/statistics/rx_bytes’: Permission denied
I also tried changing permissions to 777
(default is 444
)
COUNTER
andGAUGE
inRRDTool
for different graphs on the traffic. I'm not overly concerned about the data lost between the last 23:59 of monthn
and the 1st 00:00 of monthn+1
... but I may factor in some code to handle the missing bytes when zeroing out the values. However, if there's a way to do this within rrdtool itself, I'm all ears (eyes) :-) – Jim Jul 07 '16 at 14:27