Operating System - HP-UX
1752278 Members
5015 Online
108786 Solutions
New Discussion юеВ

Re: Porting from HP-UX PA-RISC (LP64) to IA 64

 
SOLVED
Go to solution
Steven Schweda
Honored Contributor
Solution

Re: Porting from HP-UX PA-RISC (LP64) to IA 64

> errno(12) strerror(Not enough space)

> Also, the "df -k ." command

errno 12 is ENOMEM, and is related to
(something like) virtual memory, not disk
space.

"man system":

[...]
ERRORS
If errors are encountered, system() sets errno values as described by
fork(2).
[...]

"man fork":

[...]
[ENOMEM] There is insufficient swap space and/or physical
memory available in which to create the new
process.
[...]

So, is the system (or just this process)
running out of memory (swap space)?
Dennis Handly
Acclaimed Contributor

Re: Porting from HP-UX PA-RISC (LP64) to IA 64

>sprintf(shCommand, "tr -d \"\012\" < %s > %s", fname, xmlFileName);

You haven't followed the quoting rules for C and for the shell. This is the correct form:
"tr -d '\\012' < %s > %s"

You toss the double quotes, so you don't have to quote them. And so you don't need 4 \. Then you need an extra \ so C compiler doesn't replace it by a newline.
ShivS
Frequent Advisor

Re: Porting from HP-UX PA-RISC (LP64) to IA 64

Here are the "swapinfo -tam" stats on the itanium machine where the "tr" command is failing:

Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 3485 611 85% 0 - 1 /dev/vg00/lvol2
reserve - 597 -597
memory 18425 14554 3871 79%
total 22521 18636 3885 83% - 0 -


My development machine where "tr" always works has the following "swapinfo -tam" stats:

Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 8192 0 8192 0% 0 - 1 /dev/vg00/lvol11
dev 8192 0 8192 0% 0 - 1 /dev/vg01/lvol12
dev 16384 0 16384 0% 0 - 2 /dev/vg01/lvol17
reserve - 22044 -22044
memory 28019 6768 21251 24%
total 60787 28812 31975 47% - 0 -


I dont know how to read the swapinfo output.



Regards,
Shiv


James R. Ferguson
Acclaimed Contributor

Re: Porting from HP-UX PA-RISC (LP64) to IA 64

Hi:

You need to add more physical memory and/or more swap space on the machine where your 'tr' is failing. An ENOMEM condition or a "can't fork' points to insufficient swap space and/or insufficient data space as bounded by the kernel 'maxdsiz' parameters (32 and 64-bit fences). Your swap and memory utilization are quite high.

As an immediate aid, I would add a generous secondary device swap of 4-8 GB.

Regards!

...JRF...

ShivS
Frequent Advisor

Re: Porting from HP-UX PA-RISC (LP64) to IA 64

Hi,

I asked my Unix admin guys to add additional swap space of 10 GB. Now the "tr" command is working fine.

Thank's everybody for helping me out on this problem.

Regards,
Shiv
ShivS
Frequent Advisor

Re: Porting from HP-UX PA-RISC (LP64) to IA 64

As suggested by the experts in this forum, I found the solution to the problem.