Operating System - Linux
1755660 Members
3363 Online
108837 Solutions
New Discussion юеВ

chatr Fails to requadrant executable

 
Alzhy
Honored Contributor

chatr Fails to requadrant executable

chatr +q3p enable /usr/local/bin/rlog
chatr(error): cannot set/reset text rewrite flag for program - /usr/local/bin/rlog

But on a another machine with exact same OS and patches, etc... it works...

Any clues?

I am sure /usr/local/bin/rlog is not in use at the time I am performing chatr.

Hakuna Matata.
6 REPLIES 6
James R. Ferguson
Acclaimed Contributor

Re: chatr Fails to requadrant executable

Hi Nelson:

Technical Knowledge Base document #8606465533
seems to fit your description, if this is for HP-UX 11.11 with an "old" binary.

What happens if you copy the failing binary file to one of your other "equivalent" servers?

Regards!

...JRF...
Alzhy
Honored Contributor

Re: chatr Fails to requadrant executable

It works...

Same executable copied over and chatr enabled.

Can I simply copy back that executable back?

Hakuna Matata.
James R. Ferguson
Acclaimed Contributor

Re: chatr Fails to requadrant executable

Hi (again) Nelson:

If it works on an "equivalent" server, one would guess 'chatr' is different. Do :

# what `whence chatr`

...and compare versions.

You could certainly try copied a modified binary back to the server on which you want to test it to see if it works. Of course, you might want to keep an unmodified version too.

Regards!

...JRF...
Bill Hassell
Honored Contributor

Re: chatr Fails to requadrant executable

Check to see that the failing binary is created with EXEC_MAGIC capability before using chatr.

cc -Ae -Wl,-N -o myprog myprog.c

Note there is no space in "_Wl,-N"


Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: chatr Fails to requadrant executable

Is rlog writable by the current user?
(I guess that gives: chatr(error): cannot open file for writing .../rlog) Bill Hassell

>Bill: Check to see that the failing binary is created with EXEC_MAGIC capability before using chatr.

This (-N) is only needed for IPF.

 

>Note there is no space in "-Wl,-N"

 

There is no need to use -Wl, since -N is a full fledged driver option.

And the ld man page says that -N is needed for -Wl,+as,mpas.

Bill Hassell
Honored Contributor

Re: chatr Fails to requadrant executable

I should clarify - for 11.23, all that is needed for maximum data space availability is to use the MPAS executable model:

cc -Ae -Wl,+as,mpas -o myprog myprog.c

In one step, the 32bit program can now access up to 3800 megs.


Bill Hassell, sysadmin