HP-UX性能监控命令.doc_第1页
HP-UX性能监控命令.doc_第2页
HP-UX性能监控命令.doc_第3页
HP-UX性能监控命令.doc_第4页
HP-UX性能监控命令.doc_第5页
已阅读5页,还剩5页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

HP-UX性能监控命令1,iostat the iostat command reports I/O statistics for each active disk on the system# iostat -t x y x表示间隔的时间,y表示间隔显示的次数这个命令一般用于查看的参数是bps、sps、msps,一般来说msps的值都是1.02,psthe ps command displays information about selected processes running on the system3,sarthe sar command collects and reports on many different system activities,including CPU,buffer cache,disk,and others# sar -u 5 4 HP-UX d270_1 B.10.20 E 9000/861 11/15/0510:22:46 %usr %sys %wio %idle10:22:51 0 0 0 10010:22:56 0 0 0 10010:23:01 0 0 0 10010:23:06 0 0 0 100Average 0 0 0 100# sar -d 5 4HP-UX d270_1 B.10.20 E 9000/861 11/15/0510:23:13 device %busy avque r+w/s blks/s avwait avserv10:23:1710:23:21 c2t6d0 0.50 0.50 0 8 1.11 18.4710:23:2510:23:29Average c2t6d0 0.12 0.50 0 2 1.11 18.474,time,timexthe time and timex commands report the elapsed time,the time spent in system mode,and the time spent in user mode, for a specific invocation of a process5,top the top command displays a real-time list of the top CPU consumers on the system# top -s 10:间隔十秒显示top信息6,uptimethe uptime command shows how long a system has been up,and who is logged in and what they are doing# uptime10:30am up 14 days, 22:46, 1 user, load average: 3.11, 3.10, 3.09# uptime -w10:32am up 14 days, 22:48, 1 user, load average: 3.10, 3.10, 3.09User tty login idle JCPU PCPU whatroot ttyp1 9:32am uptime -w7,vmstat the vmstat command reports virtual memory statistics about processes, virtual memory, and CPU activity# vmstat -n 5 2VM memory page faults avm free re at pi po fr de sr in sy cs 2375 3128 1 0 0 0 0 0 0 161 38 33CPU cpu procs us sy id r b w 0 1 99 0 3 0 1528 3094 0 0 0 0 0 0 0 142 40 32 0 0 100 0 3 08,glance和gpm只支持版本11.09,MeasureWare和PerfView工具只支持版本10.x和11.x10,netstatthe netstat command displays general networking statistics# netstat -rnRouting tablesDestination Gateway Flags Refs Use Interface Pmtu PmtuTime127.0.0.1 127.0.0.1 UH 0 350 lo0 4608172.16.10.224 127.0.0.1 UH 1 291489 lo0 4608192.168.1.1 127.0.0.1 UH 0 616 lo0 4608default 172.16.10.254 UG 0 8190 lan0 1500172.16.10.0 172.16.10.224 U 1 159593 lan0 1500192.168.1 192.168.1.1 U 0 0 btlan02 150011,nfsstatthe nfsstat command displays network file system statistics# nfsstatServer rpc:calls badcalls nullrecv badlen xdrcall nfsdrun0 0 0 0 0 0 Server nfs:calls badcalls0 0 null getattr setattr root lookup readlink read 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% wrcache write create remove rename link symlink 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% mkdir rmdir readdir statfs 0 0% 0 0% 0 0% 0 0% Client rpc:calls badcalls retrans badxid timeout wait newcred7 0 0 0 0 0 0 Client nfs:calls badcalls nclget nclsleep7 0 7 0 null getattr setattr root lookup readlink read 0 0% 3 42% 0 0% 0 0% 2 28% 0 0% 0 0% wrcache write create remove rename link symlink 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% mkdir rmdir readdir statfs 0 0% 0 0% 1 14% 1 14% 12,pingthe ping command sends an ICMP echo packet to a host, and times how long it takes for the echo packet to return13,lanscanthe lanscan command displays the LAN card configuration and status# lanscanHardware Station Crd Hardware Net-Interface NM MAC HP DLPI MjrPath Address In# State NameUnit State ID Type Support Num8/16/6 0x08000955A23A 0 UP lan0 UP 4 ETHER Yes 528/20/5/1 0x0060B05838EF 1 UP btlan01 DOWN 5 ETHER Yes 778/20/5/2 0x0060B0580412 2 UP btlan02 UP 6 ETHER Yes 7714,lanadminthe lanadmin command tests, displays statistics for, and allows modifications to LAN cards on the HP-UX system# lanadminLOCAL AREA NETWORK ONLINE ADMINISTRATION, Version 1.0 Tue , Nov 15,2005 11:02:51 Copyright 1994 Hewlett Packard Company. All rights are reserved.Test Selection mode. lan = LAN Interface Administration menu = Display this menu quit = Terminate the Administration terse = Do not display command menu verbose = Display command menu15,nddthe ndd command allows the examination and modification of several tunable parameters that affect networking operation and behaviorto list the contents of the arp cache# ndd -get /dev/arp arp_cache_reportto set the value of the default TTL parameter for UDP to 128:# ndd -set /dev/udp udp_def_ttl 12816,nettunethe nettune command allows modifications to be made to network parameters, which in previous releases were not modifiable, this command was not included with the HP-UX 11.0 releaseto get the value of the tcp_send object:# nettune tcp_send3276817,NetMetrixthe NetMetrix product makes use of LAN probes to collect network traffic information18,ipcsthe ipcs command displays information about active interprocess communication facilities.with no options, ipcs displays information in short format about message queues,shared memory segments, and semaphores that are currently active in the system# ipcsIPC status from /dev/kmem as of Tue Nov 15 11:18:28 2005T ID KEY MODE OWNER GROUPMessage Queues:q 0 0x3c1c033e -Rrw-w-w- root rootq 1 0x3e1c033e -rw-r-r- root rootShared Memory:m 0 0x2f100002 -rw- root sysm 1 0x411c0329 -rw-rw-rw- root rootm 2 0x4e0c0002 -rw-rw-rw- root rootm 3 0x41200cd9 -rw-rw-rw- root rootSemaphores:s 0 0x2f100002 -ra-ra-ra- root syss 1 0x411c0329 -ra-ra-ra- root roots 2 0x4e0c0002 -ra-ra-ra- root root19,ipcrmthe ipcrm command removes one or more specified message-queue, semaphore-set, or shared-memory identifiers# ipcs -s T ID KEY MODE OWNER GROUPSemaphores:s 0 0x2f100002 -ra-ra-ra- root syss 1 0x411c0329 -ra-ra-ra- root roots 2 0x4e0c0002 -ra-ra-ra- root roots 3 0x41200cda -ra-ra-ra- root roots 4 0x00446f6e -ra-r-r- root roots 5 0x00446f6d -ra-r-r- root roots 6 0x01090522 -ra-r-r- root roots 7 0x411c1e56 -ra-ra-ra- root roots 8 0x6120d49b -ra-ra-ra- root root# ipcrm -s 7# ipcs -sT ID KEY MODE OWNER GROUPSemaphores:s 0 0x2f100002 -ra-ra-ra- root syss 1 0x411c0329 -ra-ra-ra- root roots 2 0x4e0c0002 -ra-ra-ra- root roots 3 0x41200cda -ra-ra-ra- root roots 4 0x00446f6e -ra-r-r- root roots 5 0x00446f6d -ra-r-r- root roots 6 0x01090522 -ra-r-r- root roots 8 0x6120d49b -ra-ra-ra- root root20,nicethe nice command executes command at a nondefault CPU scheduling priority# ps -l F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME COMD 1 R 0 29218 29217 0 178 20 19d8d00 101 - ttyp1 0:00 sh 1 S 0 29217 29136 0 158 20 18ae980 7 1097280 ttyp1 0:00 timex 1 S 0 29136 29135 0 158 20 19e1e80 83 109b180 ttyp1 0:00 sh 1 S 0 29135 656 0 154 20 1942800 19 417400 ttyp1 0:00 telnetd 1 R 0 29313 29218 2 178 20 18e2400 21 - ttyp1 0:00 ps# nice sh# ps -l F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME COMD 1 S 0 29218 29217 0 158 20 19d8d00 101 1097040 ttyp1 0:00 sh 1 S 0 29217 29136 0 158 20 18ae980 7 1097280 ttyp1 0:00 timex 1 R 0 29315 29314 2 202 30 1898c80 21 - ttyp1 0:00 ps 1 S 0 29136 29135 0 158 20 19e1e80 83 109b180 ttyp1 0:00 sh 1 S 0 29135 656 0 154 20 1942800 19 417400 ttyp1 0:00 telnetd 1 S 0 29314 29218 19 158 30 19d4700 101 109c5c0 ttyp1 0:00 sh21,renicethe renice command alters the priority of a running process22,getprivgrpthe getprivgrp command lists the access privileges of privileged groups# getprivgrpglobal privileges: CHOWN23,setprivgrpthe setprivgrp command sets the access privileges of privileged groups.if a group_name is supplied, access privileges are listed for that group only.the superuser is a memeber of all groupsAccess privileges include RTPRIO, RTSCHED, MLOCK, CHOWN, LOCKRDONLY, SETRUGID, SERIALIZE24,rtprio:set real time process priority rtsched:set POSIX real time process priority scsictl:set parameters on SCSI devices serialize:mark a program to run serially fsadm:online JFS management tool getext:display JFS extent attributes setext:sets/changes JFS extent attributes newfs:create a file system tunefs:change a file systems attributes PRM:process resource manager WebQoS:web quality of service25,bdf:local and remote mounted file system space df:mounted file systems mount:local and remote file system mounts26,diskinfo:size and model of local disk drives dmesg:I/O tree and memory details ioscan:I/O tree and addressing vgdisplay:local volume group contents/attributes pvdisplay:local physical volume contents/attributes lvdisplay:local logical volume contents/attributes swapinfo:swap space utilization sysdef:sizes and values of kernel tables and parms kmtune:Query,set, or reset system parameters27:prof:application profiler gprof:enhanced application profiler arm:define and measure response time of transactions for an application28,puma:program utilization and measurement analysis ttd:tracks how much time is spent between specific lines of code in a program cxperf:cxperf is an interactive runtime performance analyzer for programs compied with C,C+ and Fortran 90 compilersAIX平台、HP-UNIX平台 主机日常性能数据采集对于我们日常的维护和分析来说,保存一份主机日常性能采集的数据是非常有必要的。可以让我们在事后查看需要查看的那段时间的主机资源使用情况,也可以据此,我们来做一份分析报告。1、AIX平台在AIX平台下,我们可以借助nmon工具很方便的实现这个需求。我们需要做的就是上传nmon工具,然后在crontab中部署一个计划任务。0 0 * * * cd /home/xigua ; ./nmon_aix53 -x nmon.log 2&1-x代表每隔15分钟做一次采样,当然如果你认为这个频率太低,可以修改。例如:0 0 * * * nmon64 -ft -D -E -I 1 -s 120 -c 720 -m /aixpatch/nmon_out改成2分钟采集一次,每天采集720次。2、HP-UNIX平台在hp-unix下面比较麻烦一点,我们需要自己来写采集的脚本。脚本主要是调用glance来采集数据。定义的crontab如下:0 0 * * * cd /glance; ./glance.sh/glance# more glance.sh# This scripts use glance plus to monitor the performance .#!/sbin/shHOST=hostnameDAY=date +%Y%m%dcd /glance/# NETWORK INTERFACE LOOPnohup /opt/perf/bin/glance -adviser_only -nosort -iterations 288 -j 300 -syntax ./net.adviser ./log/net_$HOST_$DAY.log &# SYSTEM LOOPnohup /opt/perf/bin/glance -adviser_only -nosort -iterations 288 -j 300 -syntax ./sys.adviser ./log/sys_$HOST_$DAY.log &#PROCESS LOOPnohup /opt/perf/bin/glance -adviser_only -nosort -iterations 288 -j 300 -syntax ./process.adviser ./log/process_$HOST_$DAY.log &#DISK LOOPnohup /opt/perf/bin/glance -adviser_only -nosort -iterations 288 -j 300 -syntax ./disk.adviser ./log/disk_$HOST_$DAY.log &这个脚本负责调用4个模块的数据采集,采集的频率是5分钟。4个模块的采集数据定义如下 :cat sys.adviser# This adviser script. prints the global cpu/disk/mem/swap utilization and also# the network subsystem wait percent for the interval.headers_printed=headers_printedIF headers_printed = 0 THENprint CPU SYS USER DISK PHY_READ PHY_WRITE MEM SWAP Networkprint Date Time Util Util Util Util RATE RATE Util Util Wait %print -headers_printed=1print GBL_STATDATE, ,GBL_STATTIME, , GBL_CPU_TOTAL_UTIL, ,GBL_CPU_SYS_MODE_UTIL, ,GBL_CPU_USER_MODE_UTIL, , GBL_DISK_UTIL_PEAK, ,GBL_DISK_PHYS_READ_BYTE_RATE,KBs ,GBL_DISK_PHYS_WRITE_BYTE_RATE,KBs , GBL_MEM_UTIL, , GBL_SWAP_SPACE_UTIL, , GBL_NETWORK_SUBSYSTEM_WAIT_PCT/glance# cat net.adviser# This version will only work with hp-ux 11.x.If you want it to# work for 10.20 you need to remove the BYNETIF_QUEUE, string# below as that metric is only available from 11.x glance.# The following string variable should be changed to the interface# of interest. For example:# netif_to_examine = lan0# If you want to see all interfaces, leave it an empty string ():# netif_to_examine = # initialize variables:# headers_printed=headers_printednetif_to_examine=# print headers before the loopprint NetIF NetIn NetOut Net Netprint Date Time Name bytes/s bytes/s COLLISION ERRORprint -# begin loopnetif loop# print information for the selected interface or if null then all: IF (BYNETIF_NAME = netif_to_examine) or (netif_to_examine = ) THEN IF BYNETIF_IN_BYTE_RATE 0 or BYNETIF_OUT_BYTE_RATE 0 THEN # print one line per interface reported

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论