LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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-17-2016, 05:23 AM   #1
rishabhgoel
LQ Newbie
 
Registered: May 2016
Posts: 2

Rep: Reputation: Disabled
How to develop Data logging system for time critical applications


Hello All,
I am a newbie to linux environment. I have to develop a data logging system in linux, that can collect data from multiple applications (executing in parallel) with least impact on performance.

I want to have a separate independent application that will continuously throw this data on UART Port to the host machine for analysis.

I am currently analyzing the shared memory as it provides the least performance impact but struggling to see how concurrency issues can be handled.

Any ideas in this are welcomed.

Regards,
Rishabh
 
Old 05-17-2016, 04:27 PM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Too slow.

The problem with shared memory for this is that you end up having to wait until the logging process copies the data out. Since it is coming from multiple sources you end up waiting to put the log information into the memory (synchronization), and waiting again if the segment fills up.

You do better with a socket where you can send the data... and the socket provides the buffer. This allows the logging process to copy data out continuously as long as there is data available, and the multiple sources don't have to wait.

For an example look at the rsyslog program.
 
1 members found this post helpful.
Old 05-17-2016, 04:43 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
They sell a few real "real time" linux distro's just for such a use. I'd go for QNX myself.

I am not a fan of the near real time distro's of linux.
 
Old 05-17-2016, 05:03 PM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939
Start by looking for "prior art!"

No matter what you might be doing, the odds are frankly "near-zero" that you are somehow the first. Begin the project by canvassing the Internet for options – "Nagios," for example? – that might be pressed into service.

Also, be very reluctant to decide-upon specific implementation alternatives, simply because they're the first alternatives that came to you. (For instance, is "throwing the data on a UART port" the only or the necessary way to "send the data to the host machine for analysis?") And, even if it is, your project is fairly certain to be a "steal cabbage vs. build" decision.

It is absolutely natural for an engineer to be "depth-first." But, in this case and in these modern times, "breadth-first" is often the most-productive strategy. "Grab a solution from that bald guy over there" ... ... "and save precious hair-follicles for yourself!"
 
Old 05-18-2016, 06:34 AM   #5
rishabhgoel
LQ Newbie
 
Registered: May 2016
Posts: 2

Original Poster
Rep: Reputation: Disabled
I tried message queues on desktop for message serialization. and observed 3usec time for each operation.
The use of Socket is a good idea. Will go through some of the socket examples to see how to get the thing working in multi application environment and its time impact.
 
  


Reply



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
[SOLVED] develop critical software for linux target mehdireisi Linux - Software 2 01-10-2014 05:57 AM
want to develop gui applications dinesh.imatrix Linux - Software 1 01-19-2012 06:05 PM
[SOLVED] KDevelop: only to develop GUI applications? stf92 Linux - Newbie 7 08-12-2011 12:15 PM
Whats the Best Way to develop C++ applications.... RayneWolf Linux - Newbie 4 10-10-2006 08:40 AM
Who is Knowing about daemon applications and how to develop these applications? ms_890 Linux - Software 0 04-14-2004 02:04 AM

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

All times are GMT -5. The time now is 12:20 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
Open Source Consulting | Domain Registration