LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-24-2019, 03:57 PM   #1
mike_canada
LQ Newbie
 
Registered: Jul 2019
Posts: 23

Rep: Reputation: Disabled
linux PC as proxy to custom hardware


I have a setup in which a linux PC is supposed to communicate with my custom hardware with the serial port.

I installed "Damn Small Linux V4.10" as my distro and so far, the web server to other clients via LAN (ethernet) is running well.

The trouble I have is communication to my hardware with the serial port at high speed (56kbps).

I tested the operation of the custom hardware through the serial port with the cat command and turned off then on my hardware and the data returned was as expected.

I also tested my hardware on Slackware via a direct serial hookup and using the screen command and all data is returned as expected so I can't blame my custom hardware.

I heard about using RTLinux or RTAI but before having to try to resort to that route, I want to disable some unnecessary system daemons.

The following is what is running on my linux at time of last test:
init [5]
[keventd]
[ksoftirqd_CPU0]
[kswapd]
[bdflush]
[kupdated]
[khubd]
-su
bash
/opt/monkey-0.9.2/bin/monkey -D
[run.cgi]
ps

The run.cgi is my CGI script that is trying to retrieve valid data from the serial port and deliver the results as a web page to a remote user connected to the same network.

monkey is the web server.

When I checked top it looks like nothing is consuming CPU.

I also made my last test without using X.

Is there a way I could get performance gain (like where data can be read by serial port uninterrupted) by somehow removing processes in [ ]?

I also noticed that no "swappiness" file is available in /proc/sys/vm but there is a "bdflush" and "kswapd" files. I'm tempted to set the numbers in those files to 0, but would that cause more harm than good?

So far the only ultimate solution which is bad for my project is to lower the baud rate to my hardware to 9600bps. but I'd rather have 57600bps.

What can I do or what processes can I or shouldn't I disable for best performance and why?
 
Old 07-24-2019, 05:22 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
You don't say what your problem is, apart from vague allusions to performance problems.

The processes in [...] are kernel processes, which means that they run kernel code exclusively, and can't be killed. In any case, if nothing consumes CPU, they are unlikely to be the source of trouble. Whether paging/swapping is taking place can be seen with tools like free or vmstat.
 
Old 07-24-2019, 09:59 PM   #3
mike_canada
LQ Newbie
 
Registered: Jul 2019
Posts: 23

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
You don't say what your problem is, apart from vague allusions to performance problems.
The problem is either the PC isn't sending data over the serial link fast enough (1 byte every 170uS) or the PC isn't receiving data fast enough.

I have no problem if I try a slow baud rate (like 9600bps)

So I guess I have no choice but to use realtime linux extension such as rtai?
 
  


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
configure squid proxy with cc proxy as a parent proxy faisi Linux - Networking 1 08-10-2010 01:16 PM
Forwarding all traffic to the proxy to another proxy (transparent proxy/redirection) lakshithaww Linux - Networking 1 10-28-2009 12:54 AM
configure squid proxy with microsoft proxy as a parent proxy nintykola Linux - Software 1 08-28-2007 01:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:27 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