Problem running rtcheck on RT kernel

Hi I am using SLES 11 with RT kernel.
I tried to run (as root) the rtcheck -v and got the following error:

[CODE]RTCheck 0.7.6 - Linux Real-Time Environment Checker

RTCheck Initialization:
Locking all memory: ok
Setting up real-time scheduling: ok

System Tests:
Looking up boot_id (378798aa-d760-4d89-a52b-fecc5941127a): ok
Checking for out-of-tree RT extensions: ok
Checking for robust (PI) mutex support: ok
Testing for acceptable hrtimer resolution (<=100us): ok
Reporting 53us
Testing for acceptable clock resolution (<=200us): ok
Reporting 1ns
Caching results in /var/cache/rtcheck: ok

User Permission Tests:
Trying to lock memory: failed
RLIMIT_MLOCK is: 65536

Some tests failed, exiting with status: 1[/CODE]

It looks like some permissions issue, but I couldn’t find any guide which explains how to solve this problem.
Does anyone know how to set the proper permissions to run RT on this OS?

Guy

Hi Guy,

[QUOTE=guyafe;14908]Hi I am using SLES 11 with RT kernel.
I tried to run (as root) the rtcheck -v and got the following error:

[CODE]RTCheck 0.7.6 - Linux Real-Time Environment Checker

RTCheck Initialization:
Locking all memory: ok
Setting up real-time scheduling: ok

System Tests:
Looking up boot_id (378798aa-d760-4d89-a52b-fecc5941127a): ok
Checking for out-of-tree RT extensions: ok
Checking for robust (PI) mutex support: ok
Testing for acceptable hrtimer resolution (<=100us): ok
Reporting 53us
Testing for acceptable clock resolution (<=200us): ok
Reporting 1ns
Caching results in /var/cache/rtcheck: ok

User Permission Tests:
Trying to lock memory: failed
RLIMIT_MLOCK is: 65536

Some tests failed, exiting with status: 1[/CODE]

It looks like some permissions issue, but I couldn’t find any guide which explains how to solve this problem.
Does anyone know how to set the proper permissions to run RT on this OS?

Guy[/QUOTE]

AFAIR rtcheck tests whether RLIMIT_MEMLOCK is RLIM_INFINITY, but in your case seems to be limited to 64k. So that would make it less a “permissions” problem, but rather one of too restrictive user limits.

Do you have “@realtime - memlock unlimited” in /etc/security/limits.conf and root is member of the realtime group (assuming that you performed the test as user “root” and rt is granted via group)?

Regards,
Jens

[QUOTE=jmozdzen;14911]

Do you have “@realtime - memlock unlimited” in /etc/security/limits.conf and root is member of the realtime group (assuming that you performed the test as user “root” and rt is granted via group)?

Regards,
Jens[/QUOTE]

Thank you for your reply.
The memlock entry was correct, but as you said the root was not part of the realtime group. After adding it correctly to the group, the test went well.

Thanks,
Guy

Hi,

I have the same problem:

[QUOTE]RTCheck Initialization:
Locking all memory: ok
Setting up real-time scheduling: ok

System Tests:
Looking up boot_id (5def02a0-8284-4dc1-be99-57353438ca8d): ok
Checking for PREEMPT_RT kernel: failed
Kernel was not built with CONFIG_PREEMPT_RT=y
Checking for robust (PI) mutex support: ok
Testing for acceptable hrtimer resolution (<=100us): ok
Reporting 68us
Testing for acceptable clock resolution (<=200us): ok
Reporting 1ns
Caching results in /var/cache/rtcheck: ok

User Permission Tests:
Trying to lock memory: failed
RLIMIT_MLOCK is: 65536

Some tests failed, exiting with status: 9
[/QUOTE]

How can i add the root to the realtime group?

Thanks

Andrea

Hi Andrea,

[QUOTE=codri;15685]Hi,

I have the same problem:

How can i add the root to the realtime group?

Thanks

Andrea[/QUOTE]

manually by editing /etc/groups accordingly. In YaST, it’s “security and users” - “manage users and groups” (or something alike) - select the user in question (“root” in this case) and “Edit” - go to the details page - set the check mark for the group “realtime” - “OK” to confirm the change. Or via CLI program “usermod” (see “man usermod” for all the details).

You may have to re-login to make everyone aware of the change.

Regards,
Jens

Thanks for the answer, I’m using Ubuntu 12.04 so there’is no Yast interface, and usermod is a bit complicate to use for me. how can i do?

Hi codri,

well, these are SLES forums, after all - it does have YaST :wink: You only mentioned two of three ways I recommended… if usermod is too complicated for you, why not edit /etc/groups manually?

Regards,
Jens