Operating System - HP-UX
1823058 Members
3178 Online
109645 Solutions
New Discussion юеВ

Using adb to change kernel parm

 
SOLVED
Go to solution
Dave La Mar
Honored Contributor

Using adb to change kernel parm

I have read several threads on this and read the man page, but, obviously, am too stupid to figure out the syntax I am looking for.

I had a need to =>"Set strmsgsz to 0 using adb"
In one post A. Clay indicating -
"It's a safe command and this is a common practice for changing kernel
values that otherwise can't be modified."

Now, I realize that I should make the change via sam, etc., for a permanent change. In the scenario I had wanted to perform this, I only wanted a temporary change in order to perform a function that failed due to the current 65535 setting.
That said, what would be the syntax to set this to "0" using adb?

Thanks for any and all input.
dl

"I'm not dumb. I just have a command of thoroughly useless information."
4 REPLIES 4
Geoff Wild
Honored Contributor

Re: Using adb to change kernel parm

Why not use kmtune?

kmtune -s STRMSGSZ=0

Course - reboot required for change to take effect...

I guess what you want to do is modify the current running kernel with a new value for a non dynamic kernel parameter?

That sounds pretty dangerous to me.

Wait for Clay to answer this one :)

Rgds...Geoff

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Dave La Mar
Honored Contributor

Re: Using adb to change kernel parm

Geoff-
"I guess what you want to do is modify the current running kernel with a new value for a non dynamic kernel parameter?"==>Yep.

I was trying to avoid a reboot and have found numerous tech notes on doing this as well as a couple of posts.

As things happened, I was able to get out of the mess without a reboot, but would have been out of the woods sooner if I could have changed that parm in the running kernel.
BTW- Should have included, we're on 11.0.

Thanks.

-dl

"I'm not dumb. I just have a command of thoroughly useless information."
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Using adb to change kernel parm

Okay wimps, this is how it's done although just because something can be done does not mean that it is wise. I'll assume that you have been instructed by a vendor to do this:

To examine the current value:

echo "strmsgsz/D" | adb -k /stand/vmunix /dev/mem

To set the value to zero:
echo "strmsgsz/W 0x0" | adb -w -k /stand/vmunix /dev/mem

You should then run the first command again to verify the change.

/W is used to write a 4-byte value whereas /w is used to write a 2-byte value; these are the opposite of /D and /d respectively.

I did test this on a sandbox and it lived to tell the tale.

If it ain't broke, I can fix that.
Dave La Mar
Honored Contributor

Re: Using adb to change kernel parm

Got it.
Thank you A. Clay.

Regards,

-dl
"I'm not dumb. I just have a command of thoroughly useless information."