1)、下载
文件为top-3.6.1-sol10-x86-local.gz
2)、解压
bash-3.00# gunzip top-3.6.1-sol10-x86-local.gz
bash-3.00# ls -la
3)、安装
bash-3.00# pkgadd -d ./top-3.6.1-sol10-x86-local
The following packages are available:
1 SMCtop top
(x86) 3.6.1
Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:
Processing package instance
top(x86) 3.6.1
LeFebvre et al
The selected base directory must exist before
installation is attempted.
Do you want this directory created now [y,n,?,q]
ERROR: Input is required.
Do you want this directory created now [y,n,?,q] y
Using as the package base directory.
## Processing package information.
## Processing system information.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.
Installing top as
## Installing part 1 of 1.
/usr/local/bin/amd64/top
/usr/local/bin/i386/top
/usr/local/bin/top
/usr/local/doc/top/Changes
/usr/local/doc/top/FAQ
/usr/local/doc/top/INSTALL
/usr/local/doc/top/LICENSE
/usr/local/doc/top/README
/usr/local/doc/top/Y2K
/usr/local/man/man1/top.1
[ verifying class
Installation of
bash-3.00#
bash-3.00#
4)、使用 (环境变量中没有/usr/local/bin/,所以必须写上全路径)
bash-3.00# /usr/local/bin/top
last pid: 3197; load avg: 0.00, 0.00, 0.00; up 2+02:38:49 13:03:20
72 processes: 70 sleeping, 1 stopped, 1 on cpu
CPU states: 99.4% idle, 0.2% user, 0.4% kernel, 0.0% iowait, 0.0% swap
Memory: 800M phys mem, 570M free mem, 512M total swap, 512M free swap
PID USERNAME LWP PRI NICE SIZE RES STATE TIME CPU COMMAND
546 root 1 59 0 2108K 948K sleep 1:06 0.09% vmware-guestd
1376 oracle 1 59 0 17M 32M sleep 1:10 0.06% Xorg
3197 root 1 59 0 2380K 1392K cpu 0:00 0.06% top
1541 oracle 1 59 0 7552K 3968K sleep 0:20 0.02% sdtperfmeter
1559 root 1 59 0 2232K 1288K sleep 0:17 0.02% rpc.rstatd
1525 oracle 2 59 0 11M 7140K sleep 0:16 0.01% dtsession
1471 oracle 1 59 0 119M 9740K sleep 0:10 0.01% composite_aux_g
7 root 12 59 0 13M 11M sleep 0:04 0.00% svc.startd
2849 root 1 59 0 2404K 1468K sleep 0:00 0.00% telnet
1724 oracle 1 29 10 4892K 1996K sleep 0:02 0.00% dtscreen
9 root 27 59 0 10M 9400K sleep 0:20 0.00% svc.configd
426 root 4 59 0 5988K 3128K sleep 0:02 0.00% inetd
175 root 31 59 0 5464K 2784K sleep 0:04 0.00% nscd
464 root 19 59 0 13M 8760K sleep 0:02 0.00% fmd
1463 oracle 4 59 0 46M 19M sleep 0:00 0.00% iiimd
5)、建立软连接
bash-3.00# cd /usr/bin
bash-3.00# ln -s /usr/local/bin/top top
bash-3.00#
bash-3.00# ls -l top
lrwxrwxrwx 1 root root 18 Jul 5 13:04 top -> /usr/local/bin/top
bash-3.00#top
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/60144/viewspace-1023794/ ,如需转载,请注明出处,否则将追究法律责任。