unix
上传用户:wxp200602
上传日期:2007-10-30
资源大小:4028k
文件大小:2k
- # example ifconfig command
- alias ifconfig {
- printf "%-10sinet addr: %-15s Mask: %-10sn %s %s RUNNING:%s MTU:%dn RX packets: %d errors: %d dropped: %dn TX packets: %d errors: %d dropped: %dn RX bytes:%d TX bytes: %dnn" select ifDescr, ipAdEntAddr, ipAdEntNetMask, ifAdminStatus, ifType, ifOperStatus, ifMtu, ifInUcastPkts, ifInErrors, ifInDiscards, ifOutUcastPkts, ifOutErrors, ifOutDiscards, ifInOctets, ifOutOctets, ifIndex, ipAdEntIfIndex from ifTable, ipAddrTable where ifIndex = ipAdEntIfIndex
- # select ipAdEntAddr, ifDescr, ifIndex, ipAdEntIfIndex from ifTable, ipAddrTable where ifIndex = ipAdEntIfIndex
- }
- # equivelant to netstat -an
- alias netstatan {
- printf "Active Intenet connections (servers and established)n"
- printf "Proto LocalAddress Foreign Address Staten"
- printf "tcp %-15s:%-5s %-15s:%-5s%-10sn" select tcpConnLocalAddress, tcpConnLocalPort, tcpConnRemAddress, tcpConnRemPort, tcpConnState from tcpConnTable;
- printf "udp %-15s:%-5s 0.0.0.0:0 %-10sn" select udpLocalAddress, udpLocalPort from udpTable;
- }
- # equivelent to netstat -rn
- alias netstatrn {
- printf "Kernel IP Routing Tablen"
- printf "Destination Gateway Genmask Type Ifacen"
- printf "%-15s %-15s %-15s %-8s %sn" select ipRouteDest, ipRouteNextHop, ipRouteMask, ipRouteType, ifDescr, ifIndex, ipRouteIfIndex from ifTable, ipRouteTable where ifIndex = ipRouteIfIndex
- }
- alias ps {
- printf "%6d %1d %s %40.40sn" select hrSWRunIndex, hrSWRunType, hrSWRunName, hrSWRunParameters from hrSWRunTable
- # printf "%6d %1d %6d %s %40.40sn" select hrSWRunIndex, hrSWRunType, hrSWRunPerfMem, hrSWRunName, hrSWRunParameters from hrSWRunTable
- }
- alias ps_grep {
- printf "%6d %1d %s %40.40sn" select hrSWRunIndex, hrSWRunType, hrSWRunName, hrSWRunParameters from hrSWRunTable where hrSWRunName like '%1%'
- }
- alias df {
- printf "Filesystem Size Usedn"
- printf "%-20s %8d %8dn" select hrStorageDescr, hrStorageSize, hrStorageUsed from hrStorageTable
- }