- 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.
thank you
I'm working in hosting company as UNIX administrator 7 years, therefore I can help you with your problem.
Важливі навички та досвід
I writing on bash and have many my .sh scripts
Запропоновані поетапні платежі
$50 USD - for yor script
I need more informations about what you need to do - and I write bash script for you.
I am confident that we can use optioin B - by inserting to the database collection of logs at once, this is the best option.
Relevant Skills and Experience
I am currently new to freelancer but I have been wroking on upwork for many bash scripting project, you can check my profile "abdelsalam abbas " at upwork to see the list.
Proposed Milestones
$50 USD - complete the script in one milestone
I would like to see what do you insert in db. Is it values out of the logs logs line as stirngs?
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