kcaj
New Member
Hello,
I've two dedicated servers which have no data transfer usage stats in their control panels. Currently I run 'ifconfig' to view data transfer stats. I have a concern however that if the dedicated server was to go offline, these stats would reset. It would be ideal to log the output of ifconfig to a file on the server at a regular interval using cron. At the moment I have this..
0 0 * * * date >> /home/bandwidth.txt; ifconfig | grep bytes >> /home/bandwidth.txt
The date command runs and is logged to /home/bandwidth.txt but not the ifconfig part. I have tried running the second part of the command on a cron of it's own but still nothing is logged.
Does anyone have any ideas for me?
I've two dedicated servers which have no data transfer usage stats in their control panels. Currently I run 'ifconfig' to view data transfer stats. I have a concern however that if the dedicated server was to go offline, these stats would reset. It would be ideal to log the output of ifconfig to a file on the server at a regular interval using cron. At the moment I have this..
0 0 * * * date >> /home/bandwidth.txt; ifconfig | grep bytes >> /home/bandwidth.txt
The date command runs and is logged to /home/bandwidth.txt but not the ifconfig part. I have tried running the second part of the command on a cron of it's own but still nothing is logged.
Does anyone have any ideas for me?