1827593 Members
2733 Online
109965 Solutions
New Discussion

installation of GNU top

 

installation of GNU top

Hello!

I had tried the GNU top (top-3.6.1) depot package (HP-UX 11i v3). In during porcess of installation i got the ERROR messages:

ERROR: Unknown owner and/or group for file "/usr/local/bin/top". SUID and/or SGID bit was not set.

After installation i tried to execute /usr/local/bin/top:

# /usr/local/bin/top
/dev/kmem: reading mpid: Bad address

I saw:

# ls -l /dev/kmem
crw-r----- 1 bin sys 3 0x000001 Mar 13 2007 /dev/kmem
# ls -l /usr/local/bin/top
-rwxr-xr-x 1 root sys 141588 Oct 19 17:10 /usr/local/bin/top

I changed mode of file:

# chmod 2755 /usr/local/bin/top

And i executed:

# /usr/local/bin/top
/dev/kmem: reading mpid: Bad address

The ERROR stayed.
How i can remove cause of ERROR? Why did ERROR happen during installation process?

14 REPLIES 14
Dennis Handly
Acclaimed Contributor

Re: installation of GNU top

Why is GNU top better than HP's?

>changed mode of file:
# chmod 2755 /usr/local/bin/top

This sets the SGUI. You need chmod u+s,g-s.
Compare to /usr/bin/top.

Re: installation of GNU top

>> Why is GNU top better than HP's?

# dmesg| grep Physical
Physical: 8368188 Kbytes, lockable: 6099064 Kbytes, available: 6927468 Kbytes

i.e. the physical memory is 8368188 Kbytes, whereas /usr/bin/top shows:

Memory: 238668K (78820K) real, 463036K (161672K) virtual, 6481420K free Page# 1/5

>>Compare to /usr/bin/top.

# ls -l /usr/bin/top
-r-xr-xr-x 1 bin bin 145176 Feb 16 2007 /usr/bin/top
Dennis Handly
Acclaimed Contributor

Re: installation of GNU top

>the physical memory is 8368188 Kbytes

You can also get this from SAM.

>-r-xr-xr-x bin ... /usr/bin/top

It appears your foreign devil top wants to use SUID to do its work. Is this something you trust?
Did you try "chmod u+s,g-s"?
Yogeeraj_1
Honored Contributor

Re: installation of GNU top

hi,

you can also try glance.

e.g.

SRV2:home/yogeeraj>glance -m
..
--------------------------------------------------------------------------------
MEMORY REPORT Users= 2
Event Current Cumulative Current Rate Cum Rate High Rate
--------------------------------------------------------------------------------
Page Faults 58 58 82.8 82.8 82.8
Page In 24 24 34.2 34.2 34.2
Page Out 0 0 0.0 0.0 0.0
KB Paged In 0kb 0kb 0.0 0.0 0.0
KB Paged Out 0kb 0kb 0.0 0.0 0.0
Reactivations 0 0 0.0 0.0 0.0
Deactivations 0 0 0.0 0.0 0.0
KB Deactivated 0kb 0kb 0.0 0.0 0.0
VM Reads 0 0 0.0 0.0 0.0
VM Writes 0 0 0.0 0.0 0.0

Total VM : 1.20gb Sys Mem : 728.8mb User Mem: 450.3mb Phys Mem: 8.00gb


kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)

Re: installation of GNU top

>>you can also try glance.

Is it proprietary/commercial software?

Re: installation of GNU top

>>You can also get this from SAM

I havn't found this in my SMH (11i v3).

>>It appears your foreign devil top wants to use SUID to do its work. Is this something you trust?

I need to watch using of physical memory. :)

>>Did you try "chmod u+s,g-s"?

# chmod u+s,g-s /usr/local/bin/top; ls -l /usr/local/bin/top
-rwsr-xr-x 1 root sys 141588 Oct 19 17:10 /usr/local/bin/top

And:

# /usr/local/bin/top
/dev/kmem: reading mpid: Bad address

Yogeeraj_1
Honored Contributor

Re: installation of GNU top

hi again,

which version of HP-UX are you running? What type of installation is this?

revert

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Dennis Handly
Acclaimed Contributor

Re: installation of GNU top

>>you can also try glance.

>Is it proprietary/commercial software?

Yes. There is a trial version of glance with HP-UX.

>I haven't found this in my SMH (11i v3).

Under SAM it was under Performance.

>-rwsr-xr-x 1 root sys /usr/local/bin/top
># /usr/local/bin/top
/dev/kmem: reading mpid: Bad address

Ok, it doesn't work anyway.

Re: installation of GNU top

>>which version of HP-UX are you running? What type of installation is this?

# uname -a
HP-UX ... B.11.31 U ia64 2021222857 unlimited-user license
#
# model
ia64 hp server rx2660
#
# machinfo
...
OS info:
...
Release: HP-UX B.11.31
Version: U (unlimited-user license)
Machine: ia64
...
vmunix _release_version:
@(#) $Revision: vmunix: B.11.31_LR FLAVOR=perf

Re: installation of GNU top

>> Under SAM it was under Performance.

# smh
...
a - Auditing and Security
c - Security Attributes Configuration
d - Peripheral Devices
e - Resource Management
f - Disks and File Systems
g - Display
k - Kernel Configuration
n - Networking and Communications
p - Printers and Plotters
s - Software Management
u - Accounts for Users and Groups

>> Ok, it doesn't work anyway.

Yes, doesn't work.
Robert-Jan Goossens
Honored Contributor

Re: installation of GNU top

Hi,

Try,

# /usr/contrib/bin/machinfo

Regards,
Robert-Jan
Don Morris_1
Honored Contributor

Re: installation of GNU top

Two thoughts:

1) top is the wrong tool to monitor overall physical memory consumption. It reports user space consumption/status only. (Hence why the Real [actual RAM] in use doesn't match the actual physical memory on the box in most cases -- first, the system will always need some for itself and second, most times you look you aren't at 100% utilization anyway). Don't blame the native top for not reporting what you want -- it isn't intended to do so. Other tools (such as Glance as mentioned) are better suited if you want to monitor overall RAM usage on the system.

2) Whatever GNU top is doing, it sure looks to me like it is trying to use /dev/kmem to go peeking through the kernel internals with some assumptions as to data structures. In your case, it certainly appears said assumptions are wrong. [This is why binaries which assume /dev/kmem is safe to go tromping through are inherently risky for compatibility.] Since you can't force a new kernel to be built with whatever GNU top is expecting, I doubt this ERROR is going away.

Re: installation of GNU top

>>Try,
>># /usr/contrib/bin/machinfo

The machinfo show physycal memomry, but don't show using of it:

Memory: 8172 MB (7.98 GB)

Re: installation of GNU top

Thank you!

>>Other tools (such as Glance as mentioned) are better suited

But Glance is commercial tool.
Is there HP-UX standard/free tool?