- bash script endless loop
- got log file rotating if size reached *.log -> *.log-prev
- log adding about 100 lines per second
- need to save all data to mysql db continuously every X seconds
- log lines use delimiter "|"
need a soltion for that + make easy bash script
- option A - tail logfile | while read line do mysql INSERT
- disadvantage can be very cpu intensive because with every insert it login to db and logout
- option B - LOAD DATA LOCAL INFILE 'logfile'
- advantage - fast insert
- disadvantage - must remember last written row from logfile, after X seconds must write data AFTER last row
- if logfile rotates we dont have last row
- option C - ???
Need experienced coder which will do very easy bash script for this purpose.
8 freelanceria on tarjonnut keskimäärin %project_bid_stats_avg_sub_26% %project_currencyDetails_sign_sub_27% tähän työhön
can you send me a sample log file? some lines and the database structure? Relevant Skills and Experience bash script Proposed Milestones $70 USD - full project