(转)Solaris 10 常用命令

如何查看当前在线用户?

可以使用who和finger显示当前正在在线的用户。

bash-3.00# who
root       pts/2        10月 30日 13:57 (zone:global)
ja00078    pts/3        10月 30日 14:14 (60.16.166.241)


bash-3.00# finger
Login       Name               TTY         Idle    When    Where
root     Super-User            pts/2            Thu 13:57  zone:global
ja00078         ???            pts/3          1 Thu 14:14  60.16.166.241


如何查看solaris操作系统的版本号?


我知道的有下面的三种方法,showrev、uname和查看/etc/release。

(1)命令showrev
           show machine, software revision, and  patch  revision information

(2)命令uname
           print name of current system.参数 -a rints basic information currently available from the system.

(3)查看/etc/release


演示如下:

bash-3.00$ showrev  
Hostname: sunv890  
Hostid: 84b7fe80  
Release: 5.10  
Kernel architecture: sun4u  
Application architecture: sparc  
Hardware provider: Sun_Microsystems  
Domain:  
Kernel version: SunOS 5.10 Generic_137111-08  
bash-3.00$ uname -a  
SunOS sunv890 5.10 Generic_137111-08 sun4u sparc SUNW,Sun-Fire-V890  
bash-3.00$ cat /etc/release  
                       Solaris 10 1/06 s10s_u1wos_19a SPARC  
           Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.  
                        Use is subject to license terms.  
                           Assembled 07 December 2005  
bash-3.00$  


由上可以看出该系统为Sun Sparc平台的5.10系统。


如何查看solaris系统是32位还是64位的?

使用isainfo -v命令

如果是运行在32位模式下, 则有如下输出:
32-bit sparc applications
如果是运行在64位模式下, 则有如下输出:
64-bit sparcv9 applications
32-bit sparc applications
注意:
从Solaris10开始支持AMD64和EM64(intel)处理器,即通常说的x64,同样能用上述命令来判断。Solaris10 的x86和x64 使用同一个安装包,即Solaris_x86_ga_u2_...。


[sfbw1@tibsol56: ~/installers]$ isainfo -v
64-bit sparcv9 applications
        asi_blk_init vis2 vis
32-bit sparc applications
        asi_blk_init vis2 vis v8plus div32 mul32


由上可知道,solaris系统为64位的。


如何在solaris上解压tar.Z?

olaris下的.Z文件用uncompress解压,然后用tar解.tar的包
先用uncompress   .Z文件,再用tar   xvf   .tar.
实例如下:

# uname -a
SunOS sb05 5.10 Generic_139555-08 sun4v sparc SUNW,Sun-Fire-T200
# ls
install.tar.Z 
# uncompress install.tar.Z
# ls
install.tar       
# tar xvf install.tar
x ./install, 0 bytes, 0 tape blocks
x ./install/instlib, 0 bytes, 0 tape blocks
x ./install/instlib/license_agreement.txt, 21052 bytes, 42 tape blocks
x ./install/instlib/lsflib.sh, 125520 bytes, 246 tape blocks
x ./install/instlib/lsferror.tbl, 27636 bytes, 54 tape blocks
# ls
install  


在solaris下怎么解压*.tar.gz格式的压缩文件?

先用gzip -d 来解压变成.tar
再用tar xvf 来解压

另:

psrinfo -v 查看cup的状态

mpstat 可以列出多cpu负载的状态

prtconf | grep 'Memory' 可以查看内存的多少.

prtdiag -v  显示系统配置信息

猜你喜欢

转载自mxy0521.iteye.com/blog/1682421
今日推荐