Operating System - HP-UX
1824977 Members
4016 Online
109678 Solutions
New Discussion юеВ

ulimit and PATH.... totally unrelated questions

 
Jenifer Martins
Advisor

ulimit and PATH.... totally unrelated questions

Hi there experts.... I have always had awesome help from you, so here we are again.....
,
I keep getting an error message about ulimit.... user's resources are over limit (something like that), it usually has to do with a cron or at error. What does that mean?

Also, if I want to add a path like /var/bin to the $PATH, but make it permanent, What file to I modify. Everytime I reboot, I have to add that to the PATH. /var/bin hold some of my scripts....should I move them somewhere else to execute?

Thanks,
Jenifer
5 REPLIES 5
Thierry Poels_1
Honored Contributor

Re: ulimit and PATH.... totally unrelated questions

Hi,

to set the PATH variable for future logings you can either modify the user's .profile, or either /etc/profile for all users (use with care!).

ulimit is a feature to limit specific resource for users. You can view its settings with "ulimit" (without parameters). See the man pages of your shell (man ksh, man sh_posix, ...) for more info.

regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Rodney Hills
Honored Contributor

Re: ulimit and PATH.... totally unrelated questions

ulimit had a problem on 10.20
Enter the following into file /var/adm/cron/.proto --

# @(#) $Revision: 27.1 $
cd $d
if [ $l -eq 4194304 ]
then
ulimit unlimited
else
ulimit $l
fi
umask $m
$<

For PATH, you can set it in /etc/profile if you are using ksh or posix, and I csh I believe uses /etc/d.cshrc or something like that.

-- Rod Hills
There be dragons...
Patrick Wallek
Honored Contributor

Re: ulimit and PATH.... totally unrelated questions

To permanently modify the PATH for everyone, modify the /etc/PATH file. If you just want it modified for yourself, or individual users, check the . files for the user, most likely .profile.

Cron question: what specific error are you getting?
Lou Zirko_1
Frequent Advisor

Re: ulimit and PATH.... totally unrelated questions

Adding /var/bin to your path can be accomplished in a couple ways. If you want it to be a system wide change for all users add it to the file /etc/PATH. If you want it for yourself only just add it to the .profile or .login, depending on your shell, that is in your home directory.

As for the other question, ulimit is a shell builtin that is used to control the resource limits. You can read all about it in the appropriate sh man page and if you are curious about what the current limits are you can run

ulimit -a

Also if you want to increase a ulimit systemwide you can add a ulimit statement to the /etc/profile.

Lou Zirko
Bill Hassell
Honored Contributor

Re: ulimit and PATH.... totally unrelated questions

There's a huge difference in ulimit depending on which shell you are using. Bourne shell (nobody uses it on HP-UX anymore but it's found in /usr/old/bi/sh) has no ulimit command at all. ksh has a very small subset (no options) and simply controls the maximum number of disk blocks written by a child process.

The POSIX shell (/usr/bin/sh and /sbin/sh) and csh have the best controls. In csh, it is called limit, POSIX shell it is ulimit. Here is what you can control:

$ ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 884736
stack(kbytes) 8192
memory(kbytes) unlimited
coredump(blocks) 0
nofiles(descriptors) 60

In the above example,

ulimit -Sc 0

was placed in /etc/profile so all users will, by default, never get corefiles. But a knowledgeable user can change this value as needed. The -S option controls the ability to change the value by the user.


Bill Hassell, sysadmin