Operating System - HP-UX
1834644 Members
3200 Online
110069 Solutions
New Discussion

Printing problems due to user's ulimit exceed?

 
Ralph Grothe
Honored Contributor

Printing problems due to user's ulimit exceed?

Hi all,

DBA is complaining because the DB process that issues printing requests apperantly cannot print.

In the user's mbox under /var/mail there appears several times the following error (as it looks thrown by the shells ulimit for that user):

sh[16]: ulimit: The specified value exceeds the user's allowable limit.
lp: can't access file "blablabla"
lp: request not accepted

The user has a Korn shell as login, but above error seems to come from sh-posix.
When I su - to the user's account, and execute the following I get his ulimits shown:

$ echo $0
-ksh
$ ulimit -a
ksh: ulimit: bad option(s)
$ ulimit
4000000
$ sh
$ echo $0
sh
$ ulimit -a
time(seconds) unlimited
file(blocks) 4000000
data(kbytes) 250000
stack(kbytes) 8192
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 120

The kernel runs with the following tunable params:

* Tunable parameters

STRMSGSZ 65535
bufpages 0
dbc_max_pct 15
dbc_min_pct 2
maxdsiz 0X0F424000
maxfiles 120
maxfiles_lim 2048
maxswapchunks 4096
maxuprc ((NPROC*9)/10)
maxusers 1200
maxvgs 80
msgmap (MSGTQL+2)
msgmax 32768
msgmnb 65535
msgmni (NPROC)
msgseg (MSGTQL*4)
msgssz 128
msgtql (NPROC)
nfile (8*NPROC+2048)
nflocks (NPROC)
ninode (3*NPROC+2048)
nproc ((MAXUSERS*3)+64)
nstrpty 60
nstrtel (MAXUSERS)
nswapdev 25
num_tachyon_adapters 5
semmni (NPROC)
semmns (SEMMNI*2)
semmnu (SEMMNI/2)
semume 64
semvmx 32768
shmmax 0X80000000
shmmni 512
shmseg 64
swapmem_on 0
timeslice 1
unlockable_mem (MAXUSERS*10)

Question,
is there a kernel parameter boundary exceeded (the maxfiles value looks a bit low to me), or will it suffice to increase the user's soft limit by some "ulimit -Sf " command?
Will the process then be able to spool new print requests?
What are sensible boundary values (kernel parameters and ulimit wise) for a process running a big Oracle DBMS on a database server?
(Don't mention the OLTP parameter set, as those seem too low)

TIA
Ralph


Madness, thy name is system administration
9 REPLIES 9
Santosh Nair_1
Honored Contributor

Re: Printing problems due to user's ulimit exceed?

I agree with you in thinking that maxfiles is set too low. We have it set to 256 in our environment.

I'm not sure that changing upping the soft ulimit will help much as I believe this is a per-session change and not a per-user change (but I'm not sure about this). If this is true, than you would most likely have to up the maxfiles kernel param, rebuild the kernel and reboot.

-Santosh
Life is what's happening while you're busy making other plans
linuxfan
Honored Contributor

Re: Printing problems due to user's ulimit exceed?

Hi,


Are you getting this error from cron jobs (emails from cron jobs)

You may have to modify your /var/adm/cron/.proto file as

/Begin/
cd $d
if [ $l -eq 4194304 ]
then
ulimit unlimited
else
ulimit $l
fi
umask $m
$<

/End/

-HTH
Ramesh
They think they know but don't. At least I know I don't know - Socrates
Ralph Grothe
Honored Contributor

Re: Printing problems due to user's ulimit exceed?

P.S.

Forgot to post this,

is there a standard HP-UX command to show how many 512 Byte blocks are written by a user, how many files that user has open for writing, how many chunks of stack and data segments he is using etc. at a given time?
Has the venerable "lsof" command options to reveal this?
Then I would like to get the sources and install it.

Thanks Santosh, but building a kernel or rather booting it is at the moment no option (i.e. production system) :-(
Madness, thy name is system administration
Ralph Grothe
Honored Contributor

Re: Printing problems due to user's ulimit exceed?

Hi Ramesh,

yes you're right.
These mails were sent from at or rather cron.
Never heard about .proto :-(
What is it for ?
The manpages don't seem to mention it:

# if ! man cron|col -b|grep proto;then echo no match;fi
no match
# if ! man crontab|col -b|grep proto;then echo no match;fi
no match

Here's the contents of the .proto:

# cat /var/adm/cron/.proto
# @(#) $Revision: 27.1 $
cd $d
ulimit $l
umask $m
$<

There is indeed a ulimit which seems to read a parameter $l.
Where is it getting $l from, by whom is it fed, what is supposed to be contained in $l?
Madness, thy name is system administration
linuxfan
Honored Contributor

Re: Printing problems due to user's ulimit exceed?

Hi Ralph,

Look at the man pages of proto (prototype job file).

As far as lsof is concerned, you can download it from
http://hpux.ee.ualberta.ca/hppd/hpux/Sysadmin/lsof-4.55

-Regards
Ramesh
They think they know but don't. At least I know I don't know - Socrates
Ralph Grothe
Honored Contributor

Re: Printing problems due to user's ulimit exceed?

Thanks Ramesh for pointing me to proto's manpage.

I read it and can now interpret the parameters in the .proto file.

I couldn't find the awk/Perlish regex matches like /Begin/, /End/ in your reply though.

Is this just some fancy markup of yours or valid proto code?
Madness, thy name is system administration
Santosh Nair_1
Honored Contributor

Re: Printing problems due to user's ulimit exceed?

Actually, I would strongly recommend that you get lsof from the source, i.e.
ftp://vic.cc.purdue.edu/pub/tools/unix/lsof

as it tends to be very OS specific. In any case, its very easy to build and I have yet to run into a problem building this from source.

-Santosh
Life is what's happening while you're busy making other plans
linuxfan
Honored Contributor

Re: Printing problems due to user's ulimit exceed?

Hi Ralph,

/Begin/ and /End/ are not valid proto codes,
its just my way of makings things distinct.
Some people use #######Cut Here####### etc
The actual proto code is between /Begin/ and /End/
You may just want to replace/modify your existing /var/adm/cron/.proto with this and make sure the permissions are 444( owned by bin:bin)
cd $d
if [ $l -eq 4194304 ]
then
ulimit unlimited
else
ulimit $l
fi
umask $m
$<

-Regards
Ramesh
They think they know but don't. At least I know I don't know - Socrates
Ralph Grothe
Honored Contributor

Re: Printing problems due to user's ulimit exceed?

Ramesh,
that's what I thought.
I prefer some sort of XML (well-formed) markup (e.g. ... ;-)

I still have no idea to what value I should increase kernel params maxfiles and maxfiles_lim.
(maybe I should repost this under a more appropriate subject?)
Having peered at /stand/system of another of our db boxes (one which runs SAP/Oracle) I found a maxfile value of 1536. But then SAP is notoriuos for its resource greed.

Madness, thy name is system administration