LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-20-2009, 05:37 PM   #1
ml41782
LQ Newbie
 
Registered: May 2009
Posts: 14

Rep: Reputation: 0
Unhappy Data from RS232 connection to MySQL


I wondering if some one has run across this before and what they did to fix it. I have a data stream in a CSV format that streams over a serial port connection. Right now I'm using minicom and capturing the data and runnig at tail to pull the newest entries from the file. at midnight I clear the file and restart the process.

I pull the data right now into a web page for monitoring. I would like to take this stream and dump it into Mysql and then run some nicer reports with a static page running PHP as I'm doing with some other devices that I monitor.


ANy thoughts ?

Mike
 
Old 05-21-2009, 10:38 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 19,321

Rep: Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470
Quote:
Originally Posted by ml41782 View Post
I wondering if some one has run across this before and what they did to fix it. I have a data stream in a CSV format that streams over a serial port connection. Right now I'm using minicom and capturing the data and runnig at tail to pull the newest entries from the file. at midnight I clear the file and restart the process.

I pull the data right now into a web page for monitoring. I would like to take this stream and dump it into Mysql and then run some nicer reports with a static page running PHP as I'm doing with some other devices that I monitor.
Well, aside from migrating the hardware to something network driven, and using socket programming, have you considered a FIFO (named) pipe? These pages:

http://linux.about.com/library/cmd/blcmdl4_fifo.htm
http://www.linuxjournal.com/article/2156

Will give you a good starting point. I've used it before to feed a MySQL database from a syslog server. But use caution...the pipe can sometimes get hung up or go zombie on you, and your data feed will stop. Write your code carefully...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting to an RS232 without an RS232 timnp Linux - General 6 06-06-2008 04:53 PM
Processing data from a 'foreign' database with mysql, or tools to pre-process data. linker3000 Linux - Software 1 08-14-2007 09:36 PM
source code for reading data through com port rs232 applee Programming 2 03-03-2007 08:55 AM
USB>RS232 versus PCMCIA>RS232 jayhel Linux - Laptop and Netbook 2 08-04-2005 07:09 PM
Time out in Connection established state if no Data flows on that connection asurya Linux - Networking 2 04-10-2005 04:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration