Re: cyclictest: Unable to set scheduling policy / join real-time group or run as root

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 25 Feb 2013 22:03:06 +0200
Hartmut Behrens <hartmut.behrens@xxxxxxxxx> wrote:

> Dear RT Folks,
> 
> After successfully patching a 3.2 kernel (gumstix platform) with
> patch-3.2-rt10, I obtained the rt-tests suite from
> git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rt-tests.git
> 
> I enabled CONFIG_PREEMPT_RT in menuconfig and disabled "CPU frequency scaling".
> 
> Compilation of rt-tests ("make all") on the platform is also successful.
> 
> When trying to execute cyclictest, the program reports: "Unable to
> change scheduling policy! either run as root or join realtime group"
> 
> Looking in rt-utils.c, it appears that set_scheduler is unable to
> select SCHED_FIFO scheduling policy.
> 
> Do you have any hints on how to fix this problem, or at least narrow
> it down further? Could it
> 
>  Best Regards,
> Hartmut Behrens
> --
>

Changing your scheduling policy requires extra privileges. You can
either run cyclictest as root, or if your distribution uses PAM, you
can set up a file in /etc/security/limits.d which enable group access to
changing scheduler policy. You can name the file whatever you want, I
usually call mine 99-realtime.conf:

# cat <<EOF >/etc/security/limits.d/99-realtime.conf
@realtime	-	rtprio	99
@realtime	- 	memlock unlimited
EOF

Then create a group named realtime and add your username to the newly
created group:

# groupadd realtime
# usermod -a -G realtime yourUserID

Log out, then log back in and you should be able to verift that you're
in the realtime group using the 'groups' command. Once you're username
is a member of the realtime group, you should be able to run cyclictest
without being root. 

Clark

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux