What is the equivalent of this command in Solaris?

ulimit -e 19

What this does in other systems is set all programs in the current shell to run with nice -n 19. When I try to run the above command in Solaris it does not recognise the -e option.

  • 3
    By "other systems" do you mean Linux? Becuase -e don't exist on Mac OS X nor OpenBSD. – thrig Feb 17 '17 at 1:14
  • I'm not sure why there are down votes. It seems to be a very normal and relevant question. – CJ7 Feb 20 '17 at 1:21

As I understand you want to define the maximum priority for the processes under a user. You can achieve this in Solaris via the prioctnl command.

prioctnl -s -m 19 -i uid $uid

I don't have a Solaris box at hand but the man page can be found here.

Also, if you want to make it permanent, the best way is to put it with a project. More info here.

  • I am not an administrator. Is it possible to run this command as a standard user to apply to the current shell? – CJ7 Feb 20 '17 at 1:18
  • it is possible, but it will depend on your rights. – BitsOfNix Feb 20 '17 at 7:13

I suggest that you Learn to use the renice command. You can do the same using the command:

 renice 19 -p <pid1 pid2 ... pidN>

In the local case running under a /bin/sh varient, use:

 renice 19 -p $$

this will change the nice level of the current shell to level 19.

  • I want to put the ulimit command in .profile so that it applies by default in every shell. What you are suggesting doesn't achieve this. – CJ7 Feb 17 '17 at 2:03
  • 1
    @CJ7 It should do. The nice level is inherited from the login shell. – Kusalananda Feb 17 '17 at 10:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.