Questions tagged [real-time]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
38
votes
15answers
10k views

Run unix command precisely at very short intervals WITHOUT accumulating time lag over time

Question I'd like to be able to run a UNIX command precisely every second over a long time period. I need a solution, which does not lag behind after a certain time, because of the time the command ...
15
votes
2answers
10k views

Advantages of using a RTOS such as QNX or VxWorks instead of Linux?

When developing a solution that requires a real-time operating system, what advantages would an operating system such an QNX or VxWorks have over Linux? Or to put it another way, since these ...
14
votes
5answers
8k views

Real time cmd tool to show HDD space remaining

Is there a command line tool which shows in real time how much space remains on my external hard drive?
10
votes
1answer
3k views

Real time priorities in non real time OS

If I do the following command on my standard Linux Mint installation: comp ~ $ ps -eo rtprio,nice,cmd RTPRIO NI CMD ... 99 - [migration/0] 99 - [watchdog/0] 99 - [migration/1] - 0 [...
9
votes
2answers
3k views

real time backup if file changed?

Are there any linux/unix console applications similar to Yadis that would allow me to: be set up from the console backup multiple directories backup / sync in real time after the files (text files) ...
9
votes
1answer
2k views

Negatives of running processes with real-time priority?

Are there any downsides of running processes with real-time priority (chrt -f 99)? My hypothesis is that this combined with an affinity will ensure that any pre-emption of my process is minimal and ...
6
votes
4answers
39k views

Current time/date as a variable in BASH and stopping a program with a script

I am trying to create a raspberry pi spy cam bug. I am trying to make it so the new file created for the various processes come up with NOW=`date '+%F_%H:%M:%S'`; which works fine. but it requires ...
6
votes
1answer
12k views

Real Time Local File Sync

How can I set up an instant file sync for two local directories? The catch is I need it in real time (15, 10 or even 5 seconds is too slow), and I don't want the target root directory created. For ...
6
votes
1answer
3k views

Why is the integer value of SIGRTMIN (first real-time signal) 34 and not 32? [duplicate]

Examining the output of kill -l command $ kill -l 1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP 6) SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) SIGUSR1 11) SIGSEGV 12) SIGUSR2 13) ...
6
votes
1answer
6k views

How to sort ps output to find processes realtime priority and identify processess currently occupied running queue

How to properly identify real-time processes currently occupied CPU queue and count them using ps? I know there is a bunch of fileds like prio,rtprio,pri,nice but do not know correct to use. It seems ...
5
votes
2answers
6k views

Why CONFIG_NO_HZ is not set by default

In the Linux Kernel CONFIG_NO_HZ is not set. But an initial reading suggests that setting that option would be nice from a performance point of view. But reading some posts like this made me think ...
5
votes
2answers
5k views

What does the change of the clocksource influence?

The output of cat /sys/devices/system/clocksource/clocksource0/available_clocksource lists the available hardware clocks. I have changed the clocks, without any visible difference. sudo /bin/sh -c '...
5
votes
2answers
409 views

Is it possible to record audio directly to a computer's optical drive?

There's a question over at audio.SE at the moment and I thought it may attract some answers here. I asked the user and he's happy to have it posted here to see if anyone has some ideas. Here it is ...
5
votes
1answer
1k views

Record time of every process or thread context switch

I'm trying to get the nearest to real-time processing I can with a Raspbian distribution on a Raspberry Pi for manipulating its GPIO pins. I want to get a "feel" for the kind of performance I can ...
5
votes
2answers
4k views

Using sched_rt_period_us for setting maximum time between task calls of order of 10ms

I realize sched_rt_period_us and sched_rt_runtime_us are meant to prevent freezing the system in case of runaway RT task. I wonder though, if it's possible to use a small value of sched_rt_period_us ...
5
votes
1answer
341 views

linux patches related to time measurement accuracy?

Is there a set of patches around for linux kernel that address accuracy of (system, rather than user) process time? i've heard about RTLinux, but i don't really need the actual real-time scheduling ...
4
votes
1answer
5k views

“tail -f” using “tcpdump -r”

To display content of pcap file , we use : tcpdump -r /Path/to/syscontection.pcap; However, this command line does not follow the pcap file on realtime , like tail -f which follows a plain text . ...
4
votes
2answers
3k views

c++ programming on a Real-time linux OS

Is there any gotcha's programming RealTime C++ applications (user space and linux drivers) on RT linux kernel compare to a std linux kernel? The Linux RT patch applies changes to kernel scheduler, ...
4
votes
1answer
67 views

Change perception of real time for one process

I would like to change the perception of real time for one process. Making the process believe that time is passing at 50% or 150% of the speed my system/kernel/hardware-clock thinks. I'd like to ...
4
votes
2answers
1k views

Does the Linux PreemptRT patch benefit desktop users?

Does the PREEMPT_RT patch (real-time kernel) have any benefit for regular desktop users?
4
votes
1answer
4k views

How to run real-time application in Linux?

Trying to get working LinuxCNC on my Debian Jessie, I did: Installed the kernel 4.9 RT through Jessie backport using apt-get/aptitude. Restarted my computer and checked uname -a contain PREEMPT RT ...
4
votes
1answer
2k views

How to know whether the Linux driver for the real-time network device was built into the kernel?

From here: http://www.xenomai.org/index.php/RTnet:Installation_%26_Testing#Debugging_RTnet The Linux driver for the real-time network device was built into the kernel and blocks the hardware. When ...
4
votes
1answer
620 views

Real-time executive approach, can be run in desktop Linux?

With the real-time executive approach, a small real-time kernel coexists with the Linux kernel. This real-time core uses a simple real-time executive that runs the non-real-time Linux kernel as its ...
4
votes
2answers
2k views

Why isn't the -rt (RT-Preempt) kernel patch included by default in the mainline kernel?

According to https://rt.wiki.kernel.org/index.php/RT_PREEMPT_HOWTO , the RT-Preempt patch converts Linux into a fully preemptible kernel. The magic is done by: Making in-kernel locking-primitives (...
4
votes
1answer
283 views

Is there a way to cat files as they are created? [duplicate]

Unlike the answer to this question (Can a bash script be hooked to a file?) I want to be able to see content of files that haven't been created yet as or after they are created. I don't know when ...
4
votes
1answer
2k views

realtime pthread created from non-realtime thread with init.d

I have a piece of C++ code that runs just fine when I run it from a Linux terminal, but which throws an EPERM error when run from a SystemV (init.d) script on bootup. The error comes from a ...
3
votes
2answers
2k views

What makes it possible for a `pulseaudio' process to get the nice level of -11?

I noticed that a pulseaudio process on my Gentoo Linux machine has the nice level of -11. But I don't know how it has gained such a high priority regardless of being owned by a normal user. I know a ...
3
votes
2answers
1k views

how does the gnu coreutils `date` work? [closed]

I did not see any similar questions on this site. The manpage, while helpful in describing how to use date, did not have much background info. Even the info page (as prescribed in the manpage: info '(...
3
votes
3answers
6k views

How to merge output of two running log files in real-time

I have been analysing how a Linux USB driver works using two disparate methods: examining the output of usbmon, which is a hex dump-ish view of what's being sent "on the wire". adding printk() ...
3
votes
1answer
1k views

Minimizing hardware interrupts

I am using a modified Linux kernel as a soft real-time OS, on a system that has an architecture like this: CPU1 and CPU2 have 8 cores each. I have 4 processes that need to be run with minimum jitter, ...
3
votes
2answers
2k views

Port Forwarding without delay and high fps in a real time live stream using socat

I am using the command socat to port forward a connection from a real-time live stream. TCP4-LISTEN:8080 TCP4:123.456.789.12:80 The problem is it has added delay and low fps while the live stream ...
3
votes
1answer
2k views

Docker with real-time / low-latency audio? (for virtual amps like Guitarix…)

I've been trying to get a foss virtual guitar amp to run on my Fedora machine for a while now, Guitarix (which runs on JACK) to be more precise. But I just can't figure it out. People say that it is ...
3
votes
1answer
217 views

create a realtime machine by assigning CPU cores to critical processes

I'm using an Udoo board for running two critical processes. It can run Ubuntu ARM edition and it has a Quadcore processor. I need to set the affinity of all the processes afinity running and the ones ...
3
votes
1answer
132 views

Is possible to focus single core on very realtime calculations while using others as regular cores?

I am finishing part of project I started while ago and I need decent kernel for it. There is code that is critical to be ran all the time, as latency bigger than 1us may have impact on quality of ...
3
votes
0answers
30 views

Limit access/transmit rights on NIC to a single user application

I currently have a RT patched linux machine and I need to have full and undelayed access to my Wired interface card. I am running a realtime non-preemtable user application which sends a couple of ...
3
votes
1answer
3k views

RTOS in a virtual machine

Are there any opensource/free Unix like RTOS that can run a virtual machine like QNX Neutrino RTOS (http://www.qnx.com/products/evaluation/eval-target.html)?
3
votes
0answers
2k views

Is it safe to disable Frequency Scaling and CPU idle Power Management support for Real Time purposes?

I'm using a Raspberry Pi board and I would like to build a real time system. During the kernel configuration, I found the CONFIG_CPU_FREQ option, which (from the help section) allows you to change ...
2
votes
4answers
1k views

Is SCADA an RTOS?

Is SCADA one of the RTOS out there (it's used for real-time control and data acquisition)?
2
votes
1answer
391 views

Linux GUI to track connections made from/to this computer

Is there a GUI to track any socket connection sent to this computer and which program that initiates it? Also if possible track any incoming connection sent to this computer and which program that ...
2
votes
2answers
927 views

Trouble selecting “Fully Preemptible Kernel (Real-Time)” when configuring/compiling from source

I am trying to compile the 5.4 kernel with the latest stable PREEMPT_RT patch (5.4.28-rt19) but for some reason can't select the Fully Preemptible Kernel (RT) option inside make nconfig/menconfig. I'...
2
votes
1answer
2k views

Detect if USB disk is mounted in C application in Linux

I would like to check if USB disk is mounted in a C application. I know that in a script I can accomplish this via mount | grep /mnt (the mount point where udev mounts the USB drive) but I need to do ...
2
votes
4answers
11k views

How to find scheduling policy and active processes' priority?

I want to make a shell script that finds all active processes and to print to the user the scheduling policy.I want the result to be like this. pid 3042's current scheduling policy: SCHED_OTHER pid ...
2
votes
1answer
1k views

does/could something like a realtime Linux container exist?

Is there some way to configure a Linux container (ie. cgroups/namespace-isolated process tree) to have realtime characteristics - ideally to the point to be suitable for industrial machine control / ...
2
votes
1answer
952 views

Can SCHED_FIFO be preempted by SCHED_DEADLINE?

As stated in the man pages: A SCHED_FIFO thread runs until either it is blocked by an I/O request, it is preempted by a higher priority thread, or it calls sched_yield(2). From the same source: ...
2
votes
1answer
990 views

How to set the SCHED_RR time slice or time quantum per process / thread?

The time slice (also called time quantum) for threads with SCHED_RR policy can, according to the sched_rr_get_interval man page be obtained using int sched_rr_get_interval(pid_t pid, struct timespec *...
2
votes
1answer
404 views

Among these two in my ps output, which real-time process will be preempted over the other by linux?

I have got some idea from: https://stackoverflow.com/questions/8887531/which-real-time-priority-is-the-highest-priority-in-linux about how the real time priority values assigned to different ...
2
votes
1answer
2k views

Clock instability in Debian 9 (stretch)

I have a machine running Debian 8 (jessie) downgraded to kernel 3.2-rt. This is running an application which is set to realtime priority (SCHED_RR), wakes up every 1ms to do some processing, and ...
2
votes
1answer
620 views

Applying RT_PREEMPT

I'm trying to install a kernel with the RT_PREEMPT patch on a Lubuntu 16.04 distro and running into some issues I'm not sure how to deal with. I've downloaded the sources for kernel v4.4.12 (linux-4.4....
2
votes
1answer
615 views

Why does /proc/stat count more than 100 tick/s

I have a developer complaining that the CPU usage reported by /proc/stat is not consistent. It is my understanding that /proc/stat is counting ticks, which since kernel 2.6 has been fixed to 100/s ...
2
votes
1answer
359 views

lxc and sched_setscheduler

I am trying to run an application inside a Centos container and needs to run in real time. I googled around and the suggestion was to add lxc.cap.keep = sys_nice. After I did it, lxc-start complains ...