跳至主要内容

Tips

/etc/mtod修改登录欢迎界面。
--
Solaris
网卡速度: dmesg |grep link
CPU频率: psrinfo -v 或者mpstat
cpu\内存等:prtdiag -v (大部分信息全部列出) 需要先进入/usr/platform/sun4u/sbin
硬盘: iostat -E

--
1. 获得系统信息:
# uname -X
System = SunOS
Node = Test_SunOS
Release = 5.9
KernelID = Generic_112234-03
Machine = i86pc
BusType =
Serial =
Users =
OEM# = 0
Origin# = 1
NumCPU = 1

2.CPU的信息:
# psrinfo -v 0
Status of processor 0 as of: 09/08/2006 14:42:33
Processor has been on-line since 09/08/2006 14:12:03.
The i386 processor operates at 1733 MHz,
and has an i387 compatible floating point processor.

3.内存的信息
# prtconf |grep Memory
Memory size: 128 Megabytes

问题总结:
1. 交换分区的大小:
swap -s 命令的结果, 每次返回的swap的大小(tatol = used + available),都不一样, 不明白 :-<


2. 硬盘的属性

# iostat -E
sd0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: NECVMWar Product: VMware IDE CDR10 Revision: 1.00 Serial No: VMware IDE CDR10
Size: 0.00GB <0 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0

3. 网卡的信息 ,
netstat -np 只能看到可用的网卡信息 包括, 名称, MAC, IP 信息, 没有配置IP的网卡,看不到, 还有别的方法吗?
# kstat -c net|grep name
name: lo0 class: net
name: pcn0 class: net
name: pcn1 class: net
name: zero_copy class: net
--
1.showrev
查看系统Hostid: 24cc7225
Release: 5.9
Kernel architecture: i86pc
Application architecture: i386
Hardware provider: COMPAQ
Domain: sinomos.com
Kernel version: SunOS 5.9 Generic 112234-10 Nov 2003
showrev -p可以查看系统的安装的补丁
2、vmstat监视cpu
iostat监视磁盘
iostat -E现在磁盘信息,包括大小和错误数量,厂家等等
3、prtconf显示系统信息
4、prtdiag显示系统cpu,内存,以及OBP
5、netstat -r路由信息
netstat -i接口信息
6、查看网卡状态
ndd -get /dev/eri link_status or link_speed
7、prtvtoc /dev/rdsk/c0t0d0s2
查看分区信息
8、dos2unix | -ascii ;
转换dos文件的格式为unix格式
9、prtconf | grep "Memory size"
显示内存大小
10、prstat -a类似top的命令

----------------------------
英语中只有两个时态,现在时和过去时。
he is working.
he was working.
he have been working.
he had been working.
在这三句中只有2个时态 is和have是表现在时,was和had是表过去时。
所以当我们在写英语文章的时候可以这么些,当然在表示将来时的时候可以加will来表述。或者转换成为现在时 he plan leaves at 9:00

评论

此博客中的热门博文

Python学习笔记20100117

映射list   Dictionary 是用{}. list 是一那个[]. turple是用() 当你定义过dictionary后,你可以使用d.keys(), d.values(),d.items()将定义后的时候分别显示出来 当然可以将list里的值加减乘除,也可以如一般的定义直接重新复制这个list. 链接与分割字符串的 li=";", join(li) 则显示的就是 分隔符为;的数 如果使用li=li.split(";")则将刚刚;的分隔符删除,而split里也可定义域,如li.split(";",1)   自省 <---这是啥 之前在使用的时候发觉有些书本上的模块不能调用,很多是py脚本定义过的函数。 下载该脚本s,然后上传至指定位置。 >>>import sys >>>sys.path >>>sys.path.append("绝对位置")然后就能调用这些脚本和参数了。 删除 >>>sys.path.pop() 定义一个参数是 def info(test, test1=10.test2=12): info是函数名,test是必备参数,因为没有定义值,test1和test2是可选参数,定义了初始值   以上是外部函数的调用,下面转到内部函数 内部函数有type,str,dir及其他   ---type 返回任意字符的类型,模块也可以。types模块 >>> type(1) <type 'int'> >>> li=[] >>> type(li) <type 'list'> >>> import odbchelper >>> type(odbchelper) <type 'module'> >>> type(sys) <type 'module'> >>> import types ...

Python学习笔记20100128

methodList = [method for method in dir(object) if callable(getattr(object, method))] ###插一句, ifconfig pcn0 unplumb 去禁solaris的网卡plumb起网卡   and, or  已经and-or一起用。 and 两者为真,print第二个数,一个为假一个为真返回假,三者为真返回最后一个真。 or 两个为真,返回第一个, 一个为假一个为真返回真,三者为假返回最后一个假   lambda可快速定义最小值函数   g = lambda x:x*2 g(3) 6 (lambda x:x*2)(3)   doc string print getattr(object,mothod).__doc__   ljust ljust 用空格填充字符串以符合指定的长度。info 函数使用它生成了两列输出并将所有在第二列的 doc string 纵向对齐。 如果小于的话不会从中截断   -----面向对象 首先导入,你可以选择import module or from module import module 如果你要经常访问模块的属性和方法,且不想一遍又一遍地敲入模块名,使用 from module import。 如果你想要有选择地导入某些属性和方法,而不想要其它的,使用 from module import。 如果模块包含的属性和方法与你的某个模块同名,你必须使用 import module 来避免名字冲突   -----类的定义 class Lofs    pass   这个类的名字是 Loaf,它没有从其它类继承。 类名通常是第一个字母大写,如:EachWordLikeThis,但这只是一个习惯,不是一个必要条件。   这个类没有定义任何方法或属性,但是从语法上,需要在定义中有些东西,所以你使用 pass。这是一个 Python 保留字,仅仅表示 “向前走,不要往这看”。它是一条什么都不做的语句,当你删空函数或类时,它是一个很好的占位符。   你可能猜...

Back to Blog again

     My last blog was almost 6 years again.  lots of things happening those years. like marriage, and move to another country, simply relocation, something is very big in my life.      Back to now,  I guess it is a very good time to start with the blog again. no matter daily life or the tech parts.      These blog may or will contains various languages, Chinese, English or Few Japanese. The first thing, I change the profile to Kamata life, Kamata is Japanese words. "鎌田"  as Kanji. why this change happened, due to we will move from Tamagawa "玉川" to Kamata very soon. I hope I can start to write this not daily, but I hope I can do this continuously.