VNstat2 и PF 2.1 calendar problem
-
Hello, i installed vnstat2 into pfsense 2.1 by this instruction http://forum.pfsense.org/index.php/topic,47241.0.html
Packet works, but i got problem with dates. After 10 sept 2013 i saw not 11 september it was again 10 september.
Now i have statistic with current date minus one.
And year - after 2013 i got new 2013 year!In commandline I executed command - date - current date in PF normal.
Screenshots in attached file. Today 14 january 2014 in statistics it 13 janWhat can i do?
P.S. Excuse my bad english
-
Mine matches with pfsense clock. There is defintely something weird going on there. Are you still having the same problem? Is the problem in just the PHP graphs or vnstati as well?
-
Mine matches with pfsense clock. There is defintely something weird going on there. Are you still having the same problem? Is the problem in just the PHP graphs or vnstati as well?
yes, there is a problem
Is the problem in just the PHP graphs or vnstati as well? I don't know :( Who can i test this?
-
Please post the dates from:
- running date at console
- what date is listed on your pfsense
- vnstat info show traffic for days
- vnstat php front end
![2014-01-16 22_35_23-192.168.55.3 - PuTTY.png](/public/imported_attachments/1/2014-01-16 22_35_23-192.168.55.3 - PuTTY.png)
![2014-01-16 22_35_23-192.168.55.3 - PuTTY.png_thumb](/public/imported_attachments/1/2014-01-16 22_35_23-192.168.55.3 - PuTTY.png_thumb)
![2014-01-16 22_36_06-pfsense.localdomain - Status_ Dashboard.png](/public/imported_attachments/1/2014-01-16 22_36_06-pfsense.localdomain - Status_ Dashboard.png)
![2014-01-16 22_36_06-pfsense.localdomain - Status_ Dashboard.png_thumb](/public/imported_attachments/1/2014-01-16 22_36_06-pfsense.localdomain - Status_ Dashboard.png_thumb)
![2014-01-16 22_38_00-pfsense.localdomain - Vnstat2 info for LAN (em1).png](/public/imported_attachments/1/2014-01-16 22_38_00-pfsense.localdomain - Vnstat2 info for LAN (em1).png)
![2014-01-16 22_38_00-pfsense.localdomain - Vnstat2 info for LAN (em1).png_thumb](/public/imported_attachments/1/2014-01-16 22_38_00-pfsense.localdomain - Vnstat2 info for LAN (em1).png_thumb) -
- running date at console normal
- what date is listed on your pfsense normal
- vnstat info show traffic for days normal (current date at the end of the graph)
- vnstat php front end bad (minus 1 day)
-
- ssh to pfsense & go to shell
- cat /conf/config.xml | egrep -E '<timezone>(.*?)</timezone>'
- does it display the right timezone?
- cat /usr/local/etc/php.ini | grep date
- does it display the same time zone?
- if no edit /usr/local/etc/php.ini and set the right time zone.
- if yes please post the results of the commands.
-
- ssh to pfsense & go to shell
- cat /conf/config.xml | egrep -E '<timezone>(.*?)</timezone>'
- does it display the right timezone?
- cat /usr/local/etc/php.ini | grep date
- does it display the same time zone?
- if no edit /usr/local/etc/php.ini and set the right time zone.
- if yes please post the results of the commands.
timezone 2) 4) ok :(
-
- make a new file in /usr/local/www called phpinfo.php include below code
- goto http://pfsense/phpinfo.php
- check and paste the lines I pasted below
phpinfo(); ?>
Configuration File (php.ini) Path /usr/local/etc
Loaded Configuration File /usr/local/etc/php.ini
Scan this dir for additional .ini files /usr/local/etc/phpdate/time support enabled
"Olson" Timezone Database Version 2013.3
Timezone Database internal
Default timezone America/MontrealDirective Local Value Master Value
date.default_latitude 31.7667 31.7667
date.default_longitude 35.2333 35.2333
date.sunrise_zenith 90.583333 90.583333
date.sunset_zenith 90.583333 90.583333
date.timezone America/Montreal America/Montreal -
- make a new file in /usr/local/www called phpinfo.php include below code
- goto http://pfsense/phpinfo.php
- check and paste the lines I pasted below
phpinfo(); ?>
Configuration File (php.ini) Path /usr/local/etc
Loaded Configuration File /usr/local/etc/php.ini
Scan this dir for additional .ini files /usr/local/etc/phpdate/time support enabled
"Olson" Timezone Database Version 2013.3
Timezone Database internal
Default timezone America/MontrealDirective Local Value Master Value
date.default_latitude 31.7667 31.7667
date.default_longitude 35.2333 35.2333
date.sunrise_zenith 90.583333 90.583333
date.sunset_zenith 90.583333 90.583333
date.timezone America/Montreal America/MontrealConfiguration File (php.ini) Path /usr/local/etc
Loaded Configuration File /usr/local/etc/php.inidate/time support enabled
"Olson" Timezone Database Version 2013.3
Timezone Database internal
Default timezone Europe/MoscowDirective Local Value Master Value
date.default_latitude 31.7667 31.7667
date.default_longitude 35.2333 35.2333
date.sunrise_zenith 90.583333 90.583333
date.sunset_zenith 90.583333 90.583333
date.timezone Europe/Moscow Europe/Moscow
-
1. Please upload a zip of your /usr/local/www/vnstat directory
2. Paste result of find / -name *vnstat*
3. Paste result of find / -name *re1*
4. Paste result of ls in /conf/vnstat
5. Backup your /conf/vnstat folder
6. Delete all files inside /conf/vnstat
7. Add the interfaces to vnstat one at a time: vnstat -u -i re1 then vnstat -u -i re2 then vnstat -u -i re3
8. Check php front end again to see if the date is fixed. -
- Please upload a zip of your /usr/local/www/vnstat directory
- Paste result of find / -name *vnstat*
- Paste result of find / -name *re1*
- Paste result of ls in /conf/vnstat
- backup your /conf/vnstat folder
- delete all files inside /conf/vnstat
- add the interfaces to vnstat : vnstat -u -i re1 vnstat -u -i re2 vnstat -u -i re3
- check php front end again to see if the date is fixed.
upload my file /usr/local/www/vnstat here?
- vnstat : vnstat -u -i re1 vnstat -u -i re2 vnstat -u -i re3 - command not found
![4 ls conf vnstat.jpg](/public/imported_attachments/1/4 ls conf vnstat.jpg)
![4 ls conf vnstat.jpg_thumb](/public/imported_attachments/1/4 ls conf vnstat.jpg_thumb)
![error adding interface.jpg](/public/imported_attachments/1/error adding interface.jpg)
![error adding interface.jpg_thumb](/public/imported_attachments/1/error adding interface.jpg_thumb) -
-
- Please upload a zip of your /usr/local/www/vnstat directory
- Paste result of find / -name *vnstat*
- Paste result of find / -name *re1*
- Paste result of ls in /conf/vnstat
- backup your /conf/vnstat folder
- delete all files inside /conf/vnstat
- add the interfaces to vnstat : vnstat -u -i re1 vnstat -u -i re2 vnstat -u -i re3
- check php front end again to see if the date is fixed.
upload my file /usr/local/www/vnstat here?
- vnstat : vnstat -u -i re1 vnstat -u -i re2 vnstat -u -i re3 - command not found
I cleaned up my post. Please use the command one at a time. vnstat -u -i interfacename.
1. I cleared /cf/vnstat/ folder
2. I executed command, they are created new DB with normal date (today date), then i copied old vnstat data (re1 re2 re3 files) and it shows me old date 16 jan (again).
How can I can save my old vnstat data in new DataBase re1 re 2 re3?
-
1. I cleared /cf/vnstat/ folder
2. I executed command, they are created new DB with normal date (today date), then i copied old vnstat data (re1 re2 re3 files) and it shows me old date 16 jan. How can I can save my old vnstat data?This means that something has gone wrong with your old database. Did you change your server date sometime? Make a timezone change? Or something?
1. With new database do vnstat –dumpdb -i re1 and vnstat --dumpdb -i .re1
2. With old database put back do vnstat --dumpdb -i re1 and vnstat --dumpdb -i .re1
3. Please zip .re1 & re1 files and attach to your post -
1. I cleared /cf/vnstat/ folder
2. I executed command, they are created new DB with normal date (today date), then i copied old vnstat data (re1 re2 re3 files) and it shows me old date 16 jan. How can I can save my old vnstat data?This means that something has gone wrong with your old database. Did you change your server date sometime? Make a timezone change? Or something?
1. With new database do vnstat –dumpdb -i re1 and vnstat --dumpdb -i .re1
2. With old database put back do vnstat --dumpdb -i re1 and vnstat --dumpdb -i .re1I do not remember, I changed timezone in old server - 2.0.x
then we bought new PC and i installed clean PF 2.1, imported some config (from backup/restore) but vnstat database I did not copy. But I have one server, whith clean install and clean configurations, whithout backups and restore and it have same problem.
Is there right command? They look same in first and second part.
I done first command:
vnstat –dumpdb -i re1
then
vnstat --dumpdb -i .re1
then copied old base re1 and .re1 with ovewright files
then in cmd - vnstat --dumpdb -i re1 and vnstat --dumpdb -i .re1 and not see data from new base, only old data with 16 jan, and not 17 jan... -
Please paste the results and zip the old .re1 and re1 files and upload them here http://www.sendspace.com/ and give me link
-
Please paste the results and zip the old .re1 and re1 files and upload them here http://www.sendspace.com/ and give me link
http://www.sendspace.com/file/a95550
-
Please post your /etc/crontab
-
Please post your /etc/crontab
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
HOME=/var/log
#minute hour mday month wday who commandpfSense specific crontab entries
Created: January 17, 2014, 4:27 pm
0 * * * * root /usr/bin/nice -n20 newsyslog
1,31 0-5 * * * root /usr/bin/nice -n20 adjkerntz -a
1 3 1 * * root /usr/bin/nice -n20 /etc/rc.update_bogons.sh
*/60 * * * * root /usr/bin/nice -n20 /usr/local/sbin/expiretable -v -t 3600 sshlockout
1 1 * * * root /usr/bin/nice -n20 /etc/rc.dyndns.update
*/60 * * * * root /usr/bin/nice -n20 /usr/local/sbin/expiretable -v -t 3600 virusprot
30 12 * * * root /usr/bin/nice -n20 /etc/rc.update_urltables
0 0 * * * root /bin/rm /var/squid/cache/swap.state; /usr/pbi/squid-i386/sbin/squid -k rotate
*/15 * * * * root /usr/local/pkg/swapstate_check.php
*/1 * * * * root /usr/local/pkg/vnstat2.sh
*/1 * * * * root /root/tolog.sh
*/10 * * * * root /usr/bin/perl /usr/pbi/lightsquid-i386/www/lightsquid/lightparser.pl today
15 0 * * * root /usr/bin/perl /usr/pbi/lightsquid-i386/www/lightsquid/lightparser.pl yesterday
0 0 * * * root /usr/bin/nice -n20 /usr/pbi/squidguard-i386/etc/rc.d/squidGuard_logrotateIf possible do not add items to this file manually.
If you do so, this file must be terminated with a blank line (e.g. new line)
-
If you do vnstat -u are the dates correct?