[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: [rtl] Finding reserved shared memory



Norm Dresner wrote:
> 
> System is a P233MMX w/128 MB ram running Red Hat 5.2 with the Real-Time
> Linux 0.9J patches.  I'm using the append="mem=XXXm" line in lilo.conf to
> prevent linux from using all of conventional RAM so I can create a shared
> memory area within which both normal user processes and real-time processes
> can communicate.
> 
> This works.  But my problem is to be able to dynamically find the start of
> the reserved area on a number of systems, not all equal, without parsing
> the lilo.conf file.

If you cat /proc/cmdline, you can see the mem=xxm stuff, you can use the
following script (or something else) to extract the number.

perl -e 'print `cat /proc/cmdline` =~ /mem=(.*)m\s*$/'


Regards,

Stuart Hughes, Zentropix
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail majordomo@rtlinux.cs.nmt.edu OR
echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.cs.nmt.edu
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/