<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 02.04.2014 14:42, Matthias Liermann
wrote:<br>
</div>
<blockquote
cite="mid:B0A8016E9EA6684CB471C70A6491720603A07C51FDC2@AUB-EX.win2k.aub.edu.lb"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal">We use Etherlab 2.0 for the automation of a
hydraulic test rig. We would like to give users without admin
rights the permission to execute control programs which have
been built with the Simulink coder and the etherlab toolbox. <span
style="color:#1F497D">We set the udev rules from the
etherlab documentation to allow user permission for the
Ethercat device.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">KERNEL =="
EtherCAT [0 -9]*" , MODE ="0664" , GROUP =" users "<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">When calling
the executable we get the error message:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span
style="color:#1F497D">mlockall() failed: Cannot allocate
memory<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span
style="color:#1F497D">Setting SCHED_FIFO with priority 99
failed: Operation not permitted<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">We can change
the capability of the executable with setcap (sudo setcap
cap_ipc_lock=ep ./Test2ndOrderSystem). But this doesn’t
help because we need administrator rights to change that
too. <o:p></o:p></span></p>
<p class="MsoNormal">Thank you, Matthias Liermann<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</blockquote>
Hi,<br>
<br>
Add your user to a group 'realtime', then add a file
'realtime_limits.conf' to /etc/limits.d containing<br>
@realtime - rtprio 99<br>
@realtime - memlock unlimited<br>
<br>
You can also specify a user in a limits.conf file by omitting the @
sign.<br>
<br>
Regards<br>
Martin<br>
<br>
<BR/> <span style="font-family: arial;"><span style="font-size: 10.5px;">Note:<br />
This e-mail is for the named person's use only. It may contain confidential and/or privileged information. If you have received this e-mail in error, please notify the sender immediately and delete the material from any system. Any unauthorized copying, disclosure, distribution or other use of this information by persons or entities other than the intended recipient is prohibited.<br />
Thank You.</span></span></body>
</html>