session logs.
Moderator: Thorsten
session logs.
I want to get rid of those seesion logs 5 months old NOW. Can't wait for 1.6.
I think I would be safe to delete the log files and delete corresponding rows from the database (DELETE .. FROM .. WHERE time < cut_off_time). However the problem is WHERE. The sessions table uses a non-(human)readable time format.
Can you:
1) Confirm that it would be safe ??
2) Provide a 'conversion formula' for the time format used ?
I think I would be safe to delete the log files and delete corresponding rows from the database (DELETE .. FROM .. WHERE time < cut_off_time). However the problem is WHERE. The sessions table uses a non-(human)readable time format.
Can you:
1) Confirm that it would be safe ??
2) Provide a 'conversion formula' for the time format used ?
Hi,
admin log or user tracking logs?
bye
Thorsten
admin log or user tracking logs?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
user
I was think of user logs primarily.
The log files take more than 20 MB here and the sessions table alone about 3 MB in the database. If numbers of visitors continue to grow it will be around or more than 100 MB by the end of this year in total.
It is not a disk space problem though. Mostly a backup problem. I have a Sceduled Backup running of everything once a day.
So I plan to extend this job to deleting old log files and running a SQLyog Notifications Service job deleting from the database corresponding rows in faqsessions table with the Scheduled Backup. Log of about 3 weeks only will be OK I think!
But yes ... Adminlog as well. But I think it will do to delete rows from table faqadminlog ? Is that safe too ? I don't totally understand the relation between tables faqadminlog and faqadminsessions ...
The log files take more than 20 MB here and the sessions table alone about 3 MB in the database. If numbers of visitors continue to grow it will be around or more than 100 MB by the end of this year in total.
It is not a disk space problem though. Mostly a backup problem. I have a Sceduled Backup running of everything once a day.
So I plan to extend this job to deleting old log files and running a SQLyog Notifications Service job deleting from the database corresponding rows in faqsessions table with the Scheduled Backup. Log of about 3 weeks only will be OK I think!
But yes ... Adminlog as well. But I think it will do to delete rows from table faqadminlog ? Is that safe too ? I don't totally understand the relation between tables faqadminlog and faqadminsessions ...
a small cosmetics ...
The 'View Sessions' from Admin Panel does not display days in correct date - order. I think you should reverse the format used here from DD-MM-YYYY to YYYY-MM-DD. That should solve it, I think!
Further the DD-MM-YYYY format is used in Continental Europe only. Most of the world uses YYYY-MM-DD or even YYYY-DD-MM. You could add some plain text telling that dates are sorted in YYYY-MM-DD -order.
Further the DD-MM-YYYY format is used in Continental Europe only. Most of the world uses YYYY-MM-DD or even YYYY-DD-MM. You could add some plain text telling that dates are sorted in YYYY-MM-DD -order.
Hi,
you can delete the tracking files in /data.
We plan a re-design of the logging feature for the next version.
bye
Thorsten
you can delete the tracking files in /data.
We plan a re-design of the logging feature for the next version.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
yes but ...
.. that was only half what I asked!
How do I find the corresponding rows in the database?
How do I find the corresponding rows in the database?
Hi,
the corresponding rows are in the table faqsessions and they have a unix timestamp.
bye
Thorsten
the corresponding rows are in the table faqsessions and they have a unix timestamp.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
aha ...
it is a Unix timestamp. Then I will have to study this.
But with a tool like this one:
http://www.4webhelp.net/us/timestamp.php
it should be pretty easy
But with a tool like this one:
http://www.4webhelp.net/us/timestamp.php
it should be pretty easy
so ...
in MySQL simply
to delete from database every user tracking log older than this month.
.. and then delete the corresponding log-files too using a wildcard.
Like this 25 MB becomes 5 MB
Thanks!
PS: That would be EASY to implement in Admin Panel!
Code: Select all
DELETE FROM faqsessions where time < UNIX_TIMESTAMP('2006-01-01 00:00:00');.. and then delete the corresponding log-files too using a wildcard.
Like this 25 MB becomes 5 MB
Thanks!
PS: That would be EASY to implement in Admin Panel!
Last edited by jazcyk on Sun Jan 29, 2006 2:02 pm, edited 1 time in total.
Hi,
ah, great... this is something for 1.6, too.
bye
Thorsten
ah, great... this is something for 1.6, too.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Hi,
I know the function but we need ANSI SQL.
bye
Thorsten
I know the function but we need ANSI SQL.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist