版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、查看硬件信息命令1, 主板信息.查看主板的序列號(hào)-#使用命令dmidecode | grep -i serial number#查看板卡信息cat /proc/pci-2, cpu信息-#通過/proc文件系統(tǒng)1) cat /proc/cpuinfo#通過查看開機(jī)信息2) dmesg | grep -i cpu#3)dmidecode -t processor-3, 硬盤信息-#查看分區(qū)情況fdisk -l#查看大小情況df -h#查看使用情況du -h#hdparm -I /dev/sda#dmesg | grep sda-4, 內(nèi)存信息-1) cat /proc/meminfo2) dme
2、sg | grep mem3) free -m4) vmstat5) dmidecode | grep -i mem-5, 網(wǎng)卡信息-1) dmesg | grep -i eth2) cat /etc/sysconfig/hwconf | grep -i eth3) lspci | grep -i eth-6, 鼠標(biāo)鍵盤和USB信息查看鍵盤和鼠標(biāo):cat /proc/bus/input/devices查看USB設(shè)備:cat /proc/bus/usb/devices查看各設(shè)備的中斷請(qǐng)求(IRQ):cat /proc/interrupts7, 顯卡信息-1)lspci |grep -i VGA2
3、)dmesg | grep -i VGA-8, 聲卡信息-1)lspci |grep -i VGA2)dmesg | grep -i VGA-7, 其他命令.用硬件檢測(cè)程序kuduz探測(cè)新硬件:service kudzu start ( or restart).dmesg (查看所有啟動(dòng)時(shí)檢測(cè)到的硬件信息).lspci (顯示外設(shè)信息, 如usb,網(wǎng)卡等信息).cat /etc/sysconfig/hwconf.mpstat8, 需要手動(dòng)安裝的工具lshw,hwinfo,hal-device-manager9, Solaris如何檢測(cè)硬件參數(shù)俺從別處發(fā)現(xiàn)了些有意思的東西:Solaris的硬件相
4、關(guān)命令發(fā)表:2004-3-8 11:20:36 出處:你的博客網(wǎng)()-1)查看當(dāng)前處理器的類型和速度(主頻)# psrinfo vStatus of processor 1 as of: 11/24/01 10:34:41Processor has been on-line since 11/24/01 10:18:20.The sparcv9 processor operates at 432 MHz, and has a sparcv9 floating point processor.Status of processor 3 as of: 11/24/01 10:34:41Proces
5、sor has been on-line since 11/24/01 10:18:22.The sparcv9 processor operates at 432 MHz, and has a sparcv9 floating point processor.2)打印當(dāng)前的OBP版本號(hào)# prtconf VOBP 3.20.0 2000/10/24 10:47# /usr/platform/sun4u/sbin/prtdiag v | grep OBPOBP 3.20.0 2000/10/24 10:47 POST 6.1.0 2000/10/24 10:49ok. .versionRele
6、ase 3.20 Version 0 created 2000/10/24 10:47OBP 3.20.0 2000/10/24 10:47POST 6.1.0 2000/10/24 10:49OBDIAG 4.5.1 2000/10/24 10:483)查看硬盤物理信息(vendor, RPM, Capacity)# iostat Esd0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0Vendor: SEAGATE Product: ST34371W SUN4.2G Revision: 7462 Serial No:JDX394220KW
7、 EBCSize: 4.29GB ;Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0Illegal Request: 0 Predictive Failure Analysis: 0sd2 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0Vendor: FUJITSU Product: MAJ3364M SUN36G Revision: 0804 Serial No: 01M18144Size: 36.42GB ;Media Error: 0 Device Not Re
8、ady: 0 No Device: 0 Recoverable: 0Illegal Request: 0 Predictive Failure Analysis: 0sd3 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0Vendor: FUJITSU Product: MAJ3364M SUN36G Revision: 0804 Serial No: 01M16199Size: 36.42GB ;Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0Illegal Requ
9、est: 0 Predictive Failure Analysis: 0sd21 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0Vendor: TOSHIBA Product: DVD-ROM SD-M1401 Revision: 1007 Serial No: 06/22/00Size:71GB ;Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0Illegal Request: 0 Predictive Failure Analysis:
10、 04)查看磁盤的幾何參數(shù)和分區(qū)信息# prtvtoc /dev/rdsk/c0t0d0s0* /dev/rdsk/c0t0d0s0 partition map* Dimensions:* 512 bytes/sector* 135 sectors/track* 16 tracks/cylinder* 2160 sectors/cylinder* 3882 cylinders* 3880 accessible cylinders* Flags:* 1: unmountable* 10: read-only* Unallocated space:* First Sector Last* Sect
11、or Count Sector* 8277120 103680 8380799* First Sector Last* Partition Tag Flags Sector Count Sector Mount Directory 0 2 00 0 2049840 2049839 / 1 3 01 2049840 615600 2665439 2 5 00 0 8380800 8380799 5 0 00 2665440 2458080 5123519 /opt 6 4 00 5123520 3073680 8197199 /usr7 8 00 8197200 79920 8277119 /e
12、xport/home5)顯示已經(jīng)使用和未使用的i-node數(shù)目# df F ufs o iFilesystem iused ifree %iused Mounted on/dev/dsk/c0t0d0s0 7859 479821 2% /dev/dsk/c0t0d0s6 37763 339517 10% /usr/dev/dsk/c0t0d0s5 722 301102 0% /opt/dev/dsk/c0t0d0s7 4 24380 0% /export/home6).顯示cpu使用率最高的進(jìn)程# ps eo pid,pcpu,args | sort +1n該命令輸出當(dāng)前系統(tǒng)進(jìn)程的pid, C
13、PU占用率及命令描述,并以pcpu來排序7)顯示內(nèi)存占用率最高的進(jìn)程# ps eo pid,vsz,args | sort +1n該命令輸出當(dāng)前系統(tǒng)進(jìn)程的pid,內(nèi)存占用率及命令描述,并以vsz來排序8)查看及啟動(dòng)系統(tǒng)的32位或64位內(nèi)核模式64位模式# isalist vsparcv9+vis sparcv9 sparcv8plus+vis sparcv8plus sparcv8 sparcv8-fsmuld sparcv7sparc# isainfo v64-bit sparcv9 applications32-bit sparc applications# isainfo b64啟動(dòng)64
14、位內(nèi)核模式ok. boot kernel/sparcv9/unix32位模式# isalist vsparcv8plus+vis sparcv8plus sparcv8 sparcv8-fsmuld sparcv7 sparc# isainfo v32-bit sparc applications# isainfo b32啟動(dòng)32位模式ok. boot kernel/unix9)查看當(dāng)前的OpenWindows版本# showrev wOpenWindows version:X11 Version 6.4.1 5 November 200110)查看當(dāng)前CDE的版本# /usr/ccs/bin
15、/what /usr/dt/bin/dtmail/usr/dt/bin/dtmail: CDE Version 1.4.6_06 CDEVersion1.4.6_0611)測(cè)定當(dāng)前的顯示器刷新頻率/usr/sbin/ffbconfig rev ?Valid values for -res option are:1024x768x60 11024x768x70 11024x768x75 1 21024x768x771024x800 x841152x900 x661152x900 x761280 x800 x76 1 21280 x1024x60 1 21280 x1024x671280 x102
16、4x761280 x1024x85 1 2960 x680 x112s960 x680 x108s640 x480 x60 1 2640 x480 x60i 1768x575x50i 11440 x900 x76 1 21600 x1000 x66 1 21600 x1000 x76 1 21600 x1280 x76 1 21920 x1080 x72 1 21920 x1080 x76 1 21920 x1200 x70 1 21920 x1200 x75 1 2svga 111521280stereovga 1 2ntsc 1pal 1noneNotes:1 monitor does n
17、ot support this resolution.2 this version of FFB (FFB1) does not support this resolution12)查看系統(tǒng)配置# /usr/platform/sun4u/sbin/prtdiag vSystem Configuration: Sun Microsystems sun4u Sun Enterprise 450 (2 XUltraSPARC-II 432MHz)System clock frequency: 86 MHzMemory size: 1024 Megabytes= CPUs = Run Ecache C
18、PU CPUBrd CPU Module MHz MB Impl. Mask-More- - - - - - -SYS 1 1 432 4.0 US-II 10.0SYS 3 3 432 4.0 US-II 10.0= Memory = Interlv. Socket SizeBank Group Name (MB) Status- - - - -0 none 1901 256 OK0 none 1902 256 OK0 none 1903 256 OK0 none 1904 256 OK0 none 1701 256 OK0 none 1702 256 OK= IO Cards =No fa
19、ilures found in System= Environmental Status =System Temperatures (Celsius):-AMBIENT 20CPU 1 40CPU 3 40=Front Status Panel:-Keyswitch position is in On mode.System LED Status: POWER GENERAL ERROR ACTIVITY ON OFF ON DISK ERROR THERMAL ERROR POWER SUPPLY ERROR OFF OFF OFFDisk LED Status: OK = GREEN ER
20、ROR = YELLOW DISK 2: OK DISK 3: OK DISK 0: OK DISK 1: EMPTY=Fans:-Fan Bank Speed Status- - -CPU 49 OKPWR 31 OKPower Supplies:-Supply Rating Temp Status- - - -0 550 W 33 OK1 550 W 33 OK= HW Revisions =ASIC Revisions:-STP2223BGA: Rev 4STP2223BGA: Rev 4STP2223BGA: Rev 4STP2003QFP: Rev 1STP2205BGA: Rev
21、1System PROM revisions:-OBP 3.20.0 2000/10/24 10:47 POST 6.1.0 2000/10/24 10:49# sysdef* Hostid*80fee99b* sun4u Configuration* Devices*packages (driver not attached) terminal-emulator (driver not attached) deblocker (driver not attached) obp-tftp (driver not attached) disk-label (driver not attached
22、) SUNW,builtin-drivers (driver not attached) sun-keyboard (driver not attached) ufs-file-system (driver not attached)chosen (driver not attached)openprom (driver not attached) client-services (driver not attached)options, instance #0aliases (driver not attached)memory (driver not attached)virtual-me
23、mory (driver not attached)associations (driver not attached) slot2disk (driver not attached) slot2led (driver not attached) slot2dev (driver not attached)pci, instance #0 ebus, instance #0 auxio (driver not attached)# prtconf DSystem Configuration: Sun Microsystems sun4uMemory size: 1024 MegabytesSy
24、stem Peripherals (Software Nodes):SUNW,Ultra-4packages terminal-emulator deblocker obp-tftp disk-label SUNW,builtin-drivers sun-keyboard ufs-file-systemchosenopenprom client-servicesoptions, instance #0 (driver name: options)aliasesmemoryvirtual-memoryassociations slot2disk slot2led slot2devpci, ins
25、tance #0 (driver name: pcipsy) ebus, instance #0 (driver name: ebus) auxio power (driver name: power) SUNW,pll sc se, instance #0 (driver name: se)su, instance #0 (driver name: su).13)查看當(dāng)前系統(tǒng)中已經(jīng)應(yīng)用的補(bǔ)丁# showrev pPatch: 109618-01 Obsoletes: Requires: Incompatibles: Packages: SUNWeuxwe,SUNWeuezt, SUNWeud
26、lg, SUNWeuddaPatch: 109889-01 Obsoletes: 109353-04 Requires: Incompatibles: Packages:SUNWkvmx, SUNWkvm, SUNWmdb, SUNWhea, SUNWpstl, SUNWpstlxPatch: 110369-05 Obsoletes: 110709-02 Requires: Incompatibles: Packages:SUNWkvmx, SUNWcarx, SUNWcsrPatch: 110370-03 Obsoletes: 111643-01 Requires: Incompatible
27、s: Packages:SUNWkvmx, SUNWkvm, SUNWmdb, SUNWhea, SUNWpstl, SUNWpstlxPatch: 110373-04 Obsoletes: 111508-01 Requires: Incompatibles: Packages:SUNWkvmx, SUNWcarx, SUNWcsrPatch: 110374-08 Obsoletes: 110136-02, 110516-02 Requires: Incompatibles:Packages: SUNWkvmx, SUNWcarx, SUNWcar, SUNWcsr, SUNWmdbx.14)
28、顯示當(dāng)前的運(yùn)行級(jí)別# who rHNAME LINE TIME IDLE PID COMMENTS. run-level 3 Nov 24 10:18 3 0 S15)查找一個(gè)文件所從屬的包# pkgchk lp /usr/lib/sendmailPathname: /usr/lib/sendmailType: regular fileExpected mode: 4555Expected owner: rootExpected group: binExpected file size (bytes): 761368Expected sum(1) of contents: 41707Expec
29、ted last modification: Sep 24 03:13:13 2001Referenced by the following packages: SUNWsndmuCurrent status: installed16)查看當(dāng)前的bind版本信息# nslookup class=chaos q=txt version.bindServer: Address: 88,聲卡信息-1)lspci|grep-iVGA2)dmesg|grep-iVGA-Solaris 與硬件相關(guān)的命令1查看當(dāng)前處理器的類型和速度(主頻) # psrinfo v Status of processor 1
30、 as of: 11/24/01 10:34:41 Processor has been on-line since 11/24/01 10:18:20. The sparcv9 processor operates at 432 MHz, and has a sparcv9 floating point processor. Status of processor 3 as of: 11/24/01 10:34:41 Processor has been on-line since 11/24/01 10:18:22. The sparcv9 processor operates at 43
31、2 MHz, and has a sparcv9 floating point processor. 2打印當(dāng)前的OBP版本號(hào) # prtconf V OBP 3.20.0 2000/10/24 10:47 # /usr/platform/sun4u/sbin/prtdiag v | grep OBP OBP 3.20.0 2000/10/24 10:47 POST 6.1.0 2000/10/24 10:49 ok. .version Release 3.20 Version 0 created 2000/10/24 10:47 OBP 3.20.0 2000/10/24 10:47 POS
32、T 6.1.0 2000/10/24 10:49 OBDIAG 4.5.1 2000/10/24 10:48 3查看硬盤物理信息(vendor, RPM, Capacity) # iostat E sd0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: SEAGATEProduct: ST34371W SUN4.2G Revision: 7462 Serial No: JDX394220KW EBC Size: 4.29GBMedia Error: 0 Device Not Ready: 0 No Device: 0 Reco
33、verable: 0 Illegal Request: 0 Predictive Failure Analysis: 0 sd2 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: FUJITSUProduct: MAJ3364M SUN36GRevision: 0804 Serial No: 01M18144 Size: 36.42GBMedia Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 0 Predictive Failu
34、re Analysis: 0 sd3 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: FUJITSUProduct: MAJ3364M SUN36GRevision: 0804 Serial No: 01M16199 Size: 36.42GBMedia Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 0 Predictive Failure Analysis: 0 sd21 Soft Errors: 0 Hard Errors
35、: 0 Transport Errors: 0 Vendor: TOSHIBAProduct: DVD-ROM SD-M1401 Revision: 1007 Serial No: 06/22/00 Size:71GBMedia Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 0 Predictive Failure Analysis: 0 4查看磁盤的幾何參數(shù)和分區(qū)信息 # prtvtoc /dev/rdsk/c0t0d0s0 * /dev/rdsk/c0t0d0s0
36、 partition map * * Dimensions: * 512 bytes/sector * 135 sectors/track * 16 tracks/cylinder * 2160 sectors/cylinder * 3882 cylinders * 3880 accessible cylinders * * Flags: * 1: unmountable *10: read-only * * Unallocated space: * First Sector Last * Sector Count Sector * 8277120 103680 8380799 * * Fir
37、st Sector Last * PartitionTagFlags Sector Count Sector Mount Directory 0 2 00 0 2049840 2049839 / 1 3 01 2049840 615600 2665439 2 5 00 0 8380800 8380799 5 0 00 2665440 2458080 5123519 /opt 6 4 00 5123520 3073680 8197199 /usr 7 8 00 8197200 79920 8277119 /export/home 5顯示已經(jīng)使用和未使用的i-node數(shù)目 # df F ufs o
38、 i Filesystem iused ifree%iusedMounted on /dev/dsk/c0t0d0s0 7859479821 2% / /dev/dsk/c0t0d0s6 37763339517 10% /usr /dev/dsk/c0t0d0s5 722301102 0% /opt /dev/dsk/c0t0d0s7 4 24380 0% /export/home 6.顯示cpu使用率最高的進(jìn)程 # ps eo pid,pcpu,args | sort +1n 該命令輸出當(dāng)前系統(tǒng)進(jìn)程的pid, CPU占用率及命令描述,并以pcpu來排序 7顯示內(nèi)存占用率最高的進(jìn)程 # ps
39、eo pid,vsz,args | sort +1n 該命令輸出當(dāng)前系統(tǒng)進(jìn)程的pid,內(nèi)存占用率及命令描述,并以vsz來排序 8查看及啟動(dòng)系統(tǒng)的32位或64位內(nèi)核模式 64位模式 # isalist v sparcv9+vis sparcv9 sparcv8plus+vis sparcv8plus sparcv8 sparcv8-fsmuld sparcv7 sparc # isainfo v 64-bit sparcv9 applications 32-bit sparc applications # isainfo b 64 啟動(dòng)64位內(nèi)核模式 ok. boot kernel/sparcv
40、9/unix 32位模式 # isalist v sparcv8plus+vis sparcv8plus sparcv8 sparcv8-fsmuld sparcv7 sparc # isainfo v 32-bit sparc applications # isainfo b 32 啟動(dòng)32位模式 ok. boot kernel/unix 9查看當(dāng)前的OpenWindows版本 # showrev w OpenWindows version: X11 Version 6.4.15 November 2001 10查看當(dāng)前CDE的版本 # /usr/ccs/bin/what /usr/dt/b
41、in/dtmail /usr/dt/bin/dtmail: CDE Version 1.4.6_06 CDEVersion1.4.6_06 11測(cè)定當(dāng)前的顯示器刷新頻率 /usr/sbin/ffbconfig rev ? Valid values for -res option are: 1024x768x60 1 1024x768x70 1 1024x768x75 1 2 1024x768x77 1024x800 x84 1152x900 x66 1152x900 x76 1280 x800 x76 1 2 1280 x1024x60 1 2 1280 x1024x67 1280 x1024
42、x76 1280 x1024x85 1 2 960 x680 x112s 960 x680 x108s 640 x480 x60 1 2 640 x480 x60i 1 768x575x50i 1 1440 x900 x76 1 2 1600 x1000 x66 1 2 1600 x1000 x76 1 2 1600 x1280 x76 1 2 1920 x1080 x72 1 2 1920 x1080 x76 1 2 1920 x1200 x70 1 2 1920 x1200 x75 1 2 svga 1 1152 1280 stereo vga 1 2 ntsc 1 pal 1 none
43、Notes: 1 monitor does not support this resolution. 2 this version of FFB (FFB1) does not support this resolution 12查看系統(tǒng)配置 # /usr/platform/sun4u/sbin/prtdiag v System Configuration:Sun Microsystemssun4u Sun Enterprise 450 (2 X UltraSPAR C-II 432MHz) System clock frequency: 86 MHz Memory size: 1024 Me
44、gabytes = CPUs = Run Ecache CPU CPU BrdCPU Module MHz MB Impl. Mask -More- - SYS 1 1 432 4.0 US-II 10.0 SYS 3 3 432 4.0 US-II 10.0 = Memory = Interlv.Socket Size Bank Group Name (MB)Status - - - - 0 none 1901 256 OK 0 none 1902 256 OK 0 none 1903 256 OK 0 none 1904 256 OK 0 none 1701 256 OK 0 none 1
45、702 256 OK = IO Cards = No failures found in System = = Environmental Status = System Temperatures (Celsius): - AMBIENT 20 CPU 1 40 CPU 3 40 = Front Status Panel: - Keyswitch position is in On mode. System LED Status: POWER GENERAL ERROR ACTIVITY ON OFF ON DISK ERRORTHERMAL ERRORPOWER SUPPLY ERROR O
46、FF OFF OFF Disk LED Status: OK = GREEN ERROR = YELLOW DISK2: OK DISK3: OK DISK0: OK DISK1: EMPTY = Fans: - Fan Bank Speed Status - - - CPU 49 OK PWR 31 OK Power Supplies: - Supply Rating Temp Status - - - - 0 550 W 33 OK 1 550 W 33 OK = HW Revisions = ASIC Revisions: - STP2223BGA: Rev 4 STP2223BGA:
47、Rev 4 STP2223BGA: Rev 4 STP2003QFP: Rev 1 STP2205BGA: Rev 1 System PROM revisions: - OBP 3.20.0 2000/10/24 10:47 POST 6.1.0 2000/10/24 10:49 # sysdef * * Hostid * 80fee99b * * sun4u Configuration * * * Devices * packages (driver not attached) terminal-emulator (driver not attached) deblocker (driver
48、 not attached) obp-tftp (driver not attached) disk-label (driver not attached) SUNW,builtin-drivers (driver not attached) sun-keyboard (driver not attached) ufs-file-system (driver not attached) chosen (driver not attached) openprom (driver not attached) client-services (driver not attached) options
49、, instance #0 aliases (driver not attached) memory (driver not attached) virtual-memory (driver not attached) associations (driver not attached) slot2disk (driver not attached) slot2led (driver not attached) slot2dev (driver not attached) pci, instance #0 ebus, instance #0 auxio (driver not attached
50、) # prtconf D System Configuration:Sun Microsystemssun4u Memory size: 1024 Megabytes System Peripherals (Software Nodes): SUNW,Ultra-4 packages terminal-emulator deblocker obp-tftp disk-label SUNW,builtin-drivers sun-keyboard ufs-file-system chosen openprom client-services options, instance #0 (driv
51、er name: options) aliases memory virtual-memory associations slot2disk slot2led slot2dev pci, instance #0 (driver name: pcipsy) ebus, instance #0 (driver name: ebus) auxio power (driver name: power) SUNW,pll sc se, instance #0 (driver name: se) su, instance #0 (driver name: su) . 13查看當(dāng)前系統(tǒng)中已經(jīng)應(yīng)用的補(bǔ)丁 #
52、showrev p Patch: 109618-01 Obsoletes:Requires:Incompatibles:Packages: SUNWeuxwe, SUN Weuezt, SUNWeudlg, SUNWeudda Patch: 109889-01 Obsoletes: 109353-04 Requires:Incompatibles:Packages: SUNWk vmx, SUNWkvm, SUNWmdb, SUNWhea, SUNWpstl, SUNWpstlx Patch: 110369-05 Obsoletes: 110709-02 Requires:Incompatib
53、les:Packages: SUNWk vmx, SUNWcarx, SUNWcsr Patch: 110370-03 Obsoletes: 111643-01 Requires:Incompatibles:Packages: SUNWk vmx, SUNWkvm, SUNWmdb, SUNWhea, SUNWpstl, SUNWpstlx Patch: 110373-04 Obsoletes: 111508-01 Requires:Incompatibles:Packages: SUNWk vmx, SUNWcarx, SUNWcsr Patch: 110374-08 Obsoletes:
54、110136-02, 110516-02 Requires:Incompatibles:Pack ages: SUNWkvmx, SUNWcarx, SUNWcar, SUNWcsr, SUNWmdbx . 14顯示當(dāng)前的運(yùn)行級(jí)別 # who rH NAME LINE TIME IDLE PIDCOMMENTS . run-level 3Nov 24 10:18 3 0S 15查找一個(gè)文件所從屬的包 # pkgchk lp /usr/lib/sendmail Pathname: /usr/lib/sendmail Type: regular file Expected mode: 4555 E
55、xpected owner: root Expected group: bin Expected file size (bytes): 761368 Expected sum(1) of contents: 41707 Expected last modification: Sep 24 03:13:13 2001 Referenced by the following packages: SUNWsndmu Current status: installed 16查看當(dāng)前的bind版本信息 # nslookup class=chaos q=txt version.bind Server: A
56、ddress:8 version.bind text = 9.2.1查看Solaris的內(nèi)存/usr/platform/sun4u/sbin/prtdiag 2) wsinfo 3) /usr/sbin/prtconf | grep -i memory附錄資料:不需要的可以自行刪除 libxml2應(yīng)用實(shí)例Libxml2 是一個(gè)xml的c語言版的解析器,本來是為Gnome項(xiàng)目開發(fā)的工具,是一個(gè)基于MIT License的免費(fèi)開源軟件。它除了支持c語言版以外,還支持c+、PHP、Pascal、Ruby、Tcl等語言的綁定,能在Windows、Linux、Solaris、MacOsX等平臺(tái)上運(yùn)行。功
57、能還是相當(dāng)強(qiáng)大的,相信滿足一般用戶需求沒有任何問題。二、 Libxml2安裝:一般如果在安裝系統(tǒng)的時(shí)候選中了所有開發(fā)庫和開發(fā)工具的話(Fedora Core系列下),應(yīng)該不用安裝,下面介紹一下手動(dòng)安裝: 1) 從xmlsoft站點(diǎn)或ftp()站點(diǎn)下載libxml壓縮包(libxml2-xxxx.tar.gz)2) 對(duì)壓縮包進(jìn)行解壓縮 tar xvzf libxml2-xxxx.tar.gz3) 進(jìn)入解壓縮后的文件夾中運(yùn)行 ./configure -prefix /home/user/myxml/xmlinst(此處為待安裝的路徑)或者直接使用 ./configure make make ins
58、tall 4) 添加路徑 export PATH=/home/user/myxml/xmlinst/bin:$PATH 說明:為了結(jié)構(gòu)清晰,最好將libxml2不安裝在解壓目錄中。安裝完成后就可以使用簡(jiǎn)單的代碼解析XML文件,包括本地和遠(yuǎn)程的文件,但是在編碼上有一些問題。Libxml默認(rèn)只支持UTF8的編碼,無論輸入輸出都是UTF-8,所以如果你解析完一個(gè)XML得到的結(jié)果都是UTF8的,如果需要輸出GB2312或者其它編碼,需要ICONV來做轉(zhuǎn)碼(生成UTF8編碼的文件也可以用它做),如果系統(tǒng)中沒有安裝iconv的話,需要安裝libiconv。 1) 下載libiconv壓縮包(例如libic
59、onv-1.11.tar.gz) 2) 對(duì)壓縮包進(jìn)行解壓縮tar xvzf libiconv-1.11.tar.gz 3) 進(jìn)入解壓縮后的文件夾中運(yùn)行 ./configure make make install三、關(guān)于XML:在開始研究 Libxml2 庫之前,先了解一下XML的相關(guān)基礎(chǔ)。XML 是一種基于文本的格式,它可用來創(chuàng)建能夠通過各種語言和平臺(tái)訪問的結(jié)構(gòu)化數(shù)據(jù)。它包括一系列類似 HTML 的標(biāo)記,并以樹型結(jié)構(gòu)來對(duì)這些標(biāo)記進(jìn)行排列。例如,可參見清單 1 中介紹的簡(jiǎn)單文檔。為了更清楚地顯示 XML 的一般概念,下面是一個(gè)簡(jiǎn)化的XML文件。清單 1. 一個(gè)簡(jiǎn)單的 XML 文件 root de
60、lete 10清單 1 中的第一行是 XML 聲明,它告訴負(fù)責(zé)處理 XML 的應(yīng)用程序,即解析器,將要處理的 XML 的版本。大部分的文件使用版本 1.0 編寫,但也有少量的版本 1.1 的文件。它還定義了所使用的編碼。大部分文件使用 UTF-8,但是,XML 設(shè)計(jì)用來集成各種語言中的數(shù)據(jù),包括那些不使用英語字母的語言。接下來出現(xiàn)的是元素。一個(gè)元素以開始標(biāo)記 開始(如 ),并以結(jié)束標(biāo)記 結(jié)束(如 ),其中使用斜線 (/) 來區(qū)別于開始標(biāo)記。元素是 Node 的一種類型。XML 文檔對(duì)象模型 (DOM) 定義了幾種不同的 Nodes 類型,包括:Elements(如 files 或者 age)A
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 礦車?yán)旨?xì)分市場(chǎng)深度研究報(bào)告
- 玩具用服裝商業(yè)機(jī)會(huì)挖掘與戰(zhàn)略布局策略研究報(bào)告
- 牙科用導(dǎo)電漆商業(yè)機(jī)會(huì)挖掘與戰(zhàn)略布局策略研究報(bào)告
- 國(guó)際公法服務(wù)行業(yè)營(yíng)銷策略方案
- 蜂箱用巢礎(chǔ)市場(chǎng)分析及投資價(jià)值研究報(bào)告
- 帶有時(shí)鐘的收音機(jī)產(chǎn)品供應(yīng)鏈分析
- 安全網(wǎng)產(chǎn)業(yè)鏈招商引資的調(diào)研報(bào)告
- 廢舊金屬回收利用行業(yè)相關(guān)項(xiàng)目經(jīng)營(yíng)管理報(bào)告
- 衛(wèi)星傳輸帶寬出租行業(yè)營(yíng)銷策略方案
- 電路測(cè)試儀產(chǎn)品供應(yīng)鏈分析
- 小學(xué)數(shù)學(xué)《比的認(rèn)識(shí)單元復(fù)習(xí)課》教學(xué)設(shè)計(jì)(課例)
- 影視培訓(xùn)網(wǎng)上課程設(shè)計(jì)
- 2024年小學(xué)體育工作計(jì)劃范本(五篇)
- 代理過賬合作協(xié)議書范文
- 2023-2024學(xué)年山東名校考試聯(lián)盟高三下學(xué)期二模英語試題(解析版)
- 中國(guó)石油集團(tuán)安全環(huán)保技術(shù)研究院有限公司招聘筆試題庫2024
- 江蘇省徐州市豐縣2023-2024學(xué)年九年級(jí)上學(xué)期期中學(xué)情調(diào)研英語試題
- 脊椎動(dòng)物-(一)魚 課件-2024-2025學(xué)年人教版生物七年級(jí)上冊(cè)
- 清單九 八類常用特指詞語136例
- 市政工程單位、分部、分項(xiàng)工程劃分方案
- 2024年新譯林版七年級(jí)上冊(cè)英語全冊(cè)知識(shí)點(diǎn)歸納總結(jié)
評(píng)論
0/150
提交評(píng)論