11-11-2002
9,926,
461
Join Date: Aug 2001
Last Activity: 26 February 2016, 12:31 PM EST
Location: Ashburn, Virginia
Posts: 9,926
Thanks Given: 63
Thanked 461 Times in 270 Posts
"uname -r" returns the "release" of the Operating System. On HP-UX, I get B.11.11. With SunOS, I get "5.8". That's close enough to be usuable. So this is an answer to the 2nd part of of question.
As for the first part, HP-UX has a command "getconf KERNEL_BITS" that will do exacyly what you want. Sun's getconf does not have this feature though.