tips:snmp中對監控有用的OID們
轉自:http://blog.sina.com.cn/s/blog_63cf1c510101e7en.html
獲取機器名:
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 sysName.0
SNMPv2-MIB::sysName.0 = STRING: ubuntu-3
獲取OS資訊:
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 sysDescr.0
SNMPv2-MIB::sysDescr.0 = STRING: Linux ubuntu-3 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64
獲取ip地址:
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 ipAdEntAddr
IP-MIB::ipAdEntAddr.127.0.0.1 = IpAddress: 127.0.0.1
IP-MIB::ipAdEntAddr.192.168.100.100 = IpAddress: 192.168.100.100
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 ipAddressType.ipv4
IP-MIB::ipAddressType.ipv4."127.0.0.1" = INTEGER: unicast(1)
IP-MIB::ipAddressType.ipv4."192.168.100.100" = INTEGER: unicast(1)
TCP連線狀態:
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 tcpConnState
TCP-MIB::tcpConnState.0.0.0.0.21.0.0.0.0.0 = INTEGER: listen(2)
TCP-MIB::tcpConnState.0.0.0.0.22.0.0.0.0.0 = INTEGER: listen(2)
TCP-MIB::tcpConnState.0.0.0.0.8000.0.0.0.0.0 = INTEGER: listen(2)
TCP-MIB::tcpConnState.192.168.100.100.22.192.168.2.171.50461 = INTEGER: established(5)
TCP-MIB::tcpConnState.192.168.100.100.3306.0.0.0.0.0 = INTEGER: listen(2)
TCP-MIB::tcpConnState.192.168.100.100.3306.192.168.100.100.59299 = INTEGER: established(5)
TCP-MIB::tcpConnState.192.168.100.100.3306.192.168.100.100.59300 = INTEGER: established(5)
TCP-MIB::tcpConnState.192.168.100.100.3306.192.168.100.100.59301 = INTEGER: established(5)
TCP本地連線地址:
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 tcpConnLocalAddress
TCP-MIB::tcpConnLocalAddress.0.0.0.0.21.0.0.0.0.0 = IpAddress: 0.0.0.0
TCP-MIB::tcpConnLocalAddress.0.0.0.0.22.0.0.0.0.0 = IpAddress: 0.0.0.0
TCP-MIB::tcpConnLocalAddress.0.0.0.0.8000.0.0.0.0.0 = IpAddress: 0.0.0.0
TCP-MIB::tcpConnLocalAddress.192.168.100.100.22.192.168.2.171.50461 = IpAddress: 192.168.100.100
TCP本地埠:
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 tcpConnLocalPort
TCP-MIB::tcpConnLocalPort.0.0.0.0.21.0.0.0.0.0 = INTEGER: 21
TCP-MIB::tcpConnLocalPort.0.0.0.0.22.0.0.0.0.0 = INTEGER: 22
TCP-MIB::tcpConnLocalPort.0.0.0.0.8000.0.0.0.0.0 = INTEGER: 8000
TCP-MIB::tcpConnLocalPort.192.168.100.100.22.192.168.2.171.50461 = INTEGER: 22
TCP-MIB::tcpConnLocalPort.192.168.100.100.3306.0.0.0.0.0 = INTEGER: 3306
TCP-MIB::tcpConnLocalPort.192.168.100.100.3306.192.168.100.100.59299 = INTEGER: 3306
TCP-MIB::tcpConnLocalPort.192.168.100.100.3306.192.168.100.100.59300 = INTEGER: 3306
TCP-MIB::tcpConnLocalPort.192.168.100.100.3306.192.168.100.100.59301 = INTEGER: 3306
TCP遠端地址:
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 tcpConnRemAddress
TCP-MIB::tcpConnRemAddress.0.0.0.0.21.0.0.0.0.0 = IpAddress: 0.0.0.0
TCP-MIB::tcpConnRemAddress.0.0.0.0.22.0.0.0.0.0 = IpAddress: 0.0.0.0
TCP-MIB::tcpConnRemAddress.0.0.0.0.8000.0.0.0.0.0 = IpAddress: 0.0.0.0
TCP-MIB::tcpConnRemAddress.192.168.100.100.22.192.168.2.171.50461 = IpAddress: 192.168.2.171
TCP-MIB::tcpConnRemAddress.192.168.100.100.3306.0.0.0.0.0 = IpAddress: 0.0.0.0
TCP-MIB::tcpConnRemAddress.192.168.100.100.3306.192.168.100.100.59299 = IpAddress: 192.168.100.100
TCP-MIB::tcpConnRemAddress.192.168.100.100.3306.192.168.100.100.59300 = IpAddress: 192.168.100.100
TCP-MIB::tcpConnRemAddress.192.168.100.100.3306.192.168.100.100.59301 = IpAddress: 192.168.100.100
TCP遠端埠:
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 tcpConnRemPort
TCP-MIB::tcpConnRemPort.0.0.0.0.21.0.0.0.0.0 = INTEGER: 0
TCP-MIB::tcpConnRemPort.0.0.0.0.22.0.0.0.0.0 = INTEGER: 0
TCP-MIB::tcpConnRemPort.0.0.0.0.8000.0.0.0.0.0 = INTEGER: 0
TCP-MIB::tcpConnRemPort.192.168.100.100.22.192.168.2.171.50461 = INTEGER: 50461
TCP-MIB::tcpConnRemPort.192.168.100.100.3306.0.0.0.0.0 = INTEGER: 0
TCP-MIB::tcpConnRemPort.192.168.100.100.3306.192.168.100.100.59299 = INTEGER: 59299
TCP-MIB::tcpConnRemPort.192.168.100.100.3306.192.168.100.100.59300 = INTEGER: 59300
TCP-MIB::tcpConnRemPort.192.168.100.100.3306.192.168.100.100.59301 = INTEGER: 59301
TCP連線狀態(ipv4和ipv6地址):
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 tcpConnectionState
TCP-MIB::tcpConnectionState.ipv4."192.168.100.100".22.ipv4."192.168.2.171".50461 = INTEGER: established(5)
TCP-MIB::tcpConnectionState.ipv6."00:00:00:00:00:00:00:00:00:00:ff:ff:c0:a8:64:07".8082.ipv6."00:00:00:00:00:00:00:00:00:00:ff:ff:c0:a8:02:9e".5890 = INTEGER: timeWait(11)
TCP連線狀態,IPV4地址:
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 tcpConnectionState.ipv4
TCP-MIB::tcpConnectionState.ipv4."192.168.100.100".22.ipv4."192.168.2.171".50461 = INTEGER: established(5)
TCP-MIB::tcpConnectionState.ipv4."192.168.100.100".3306.ipv4."192.168.100.100".59299 = INTEGER: established(5)
TCP-MIB::tcpConnectionState.ipv4."192.168.100.100".3306.ipv4."192.168.100.100".59300 = INTEGER: established(5)
TCP-MIB::tcpConnectionState.ipv4."192.168.100.100".3306.ipv4."192.168.100.100".59301 = INTEGER: established(5)
TCP連線程序:
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 tcpConnectionProcess.ipv4
TCP-MIB::tcpConnectionProcess.ipv4."192.168.100.100".22.ipv4."192.168.2.171".50461 = Gauge32: 0
TCP-MIB::tcpConnectionProcess.ipv4."192.168.100.100".3306.ipv4."192.168.100.100".59299 = Gauge32: 0
TCP-MIB::tcpConnectionProcess.ipv4."192.168.100.100".3306.ipv4."192.168.100.100".59300 = Gauge32: 0
TCP-MIB::tcpConnectionProcess.ipv4."192.168.100.100".3306.ipv4."192.168.100.100".59301 = Gauge32: 0
tcp監聽程序:
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 tcpListenerProcess
TCP-MIB::tcpListenerProcess.ipv4."0.0.0.0".21 = Gauge32: 0
TCP-MIB::tcpListenerProcess.ipv4."0.0.0.0".22 = Gauge32: 0
TCP-MIB::tcpListenerProcess.ipv4."0.0.0.0".8000 = Gauge32: 0
TCP-MIB::tcpListenerProcess.ipv4."192.168.100.100".3306 = Gauge32: 0
TCP-MIB::tcpListenerProcess.ipv6."00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00".22 = Gauge32: 0
TCP-MIB::tcpListenerProcess.ipv6."00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00".8000 = Gauge32: 0
TCP-MIB::tcpListenerProcess.ipv6."00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00".8082 = Gauge32: 0
UDP地址:
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 udpLocalAddress
UDP-MIB::udpLocalAddress.0.0.0.0.51598 = IpAddress: 0.0.0.0
UDP-MIB::udpLocalAddress.192.168.100.100.161 = IpAddress: 192.168.100.100
UDP埠:
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 udpLocalPort
UDP-MIB::udpLocalPort.0.0.0.0.51598 = INTEGER: 51598
UDP-MIB::udpLocalPort.192.168.100.100.161 = INTEGER: 161
系統啟動時間:
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 hrSystemUptime.0
HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (17454578) 2 days, 0:29:05.78
系統日期:
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 hrSystemDate.0
HOST-RESOURCES-MIB::hrSystemDate.0 = STRING: 2013-9-2,15:23:24.0,+8:0
系統啟動引數:
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 hrSystemInitialLoadParameters.0
HOST-RESOURCES-MIB::hrSystemInitialLoadParameters.0 = STRING: "BOOT_IMAGE=/vmlinuz-3.2.0-23-generic root=/dev/mapper/ubuntu--3-root ro
"
登陸系統使用者數:
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 hrSystemNumUsers.0
HOST-RESOURCES-MIB::hrSystemNumUsers.0 = Gauge32: 1
系統程序數:
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 hrSystemProcesses.0
HOST-RESOURCES-MIB::hrSystemProcesses.0 = Gauge32: 70
系統最大程序數(可能有問題,只獲取到0了):
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 hrSystemMaxProcesses.0
HOST-RESOURCES-MIB::hrSystemMaxProcesses.0 = INTEGER: 0
系統記憶體數:
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 hrMemorySize.0
HOST-RESOURCES-MIB::hrMemorySize.0 = INTEGER: 2050228 KBytes
系統資源描述:
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 hrStorageDescr
HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: Physical memory
HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: Virtual memory
HOST-RESOURCES-MIB::hrStorageDescr.6 = STRING: Memory buffers
HOST-RESOURCES-MIB::hrStorageDescr.7 = STRING: Cached memory
HOST-RESOURCES-MIB::hrStorageDescr.8 = STRING: Shared memory
獲取系統裝置資訊(CPU):
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 hrDeviceDescr
HOST-RESOURCES-MIB::hrDeviceDescr.768 = STRING: GenuineIntel: Pentium(R) Dual-Core CPU E5200 @ 2.50GHz
HOST-RESOURCES-MIB::hrDeviceDescr.769 = STRING: GenuineIntel: Pentium(R) Dual-Core CPU E5200 @ 2.50GHz
HOST-RESOURCES-MIB::hrDeviceDescr.1025 = STRING: network interface lo
HOST-RESOURCES-MIB::hrDeviceDescr.1026 = STRING: network interface eth0
HOST-RESOURCES-MIB::hrDeviceDescr.3072 = STRING: Guessing that there's a floating point co-processor
系統程序列表:
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 hrSWRunName
HOST-RESOURCES-MIB::hrSWRunName.1 = STRING: "init"
HOST-RESOURCES-MIB::hrSWRunName.2 = STRING: "kthreadd"
HOST-RESOURCES-MIB::hrSWRunName.3 = STRING: "ksoftirqd/0"
HOST-RESOURCES-MIB::hrSWRunName.5 = STRING: "kworker/u:0"
HOST-RESOURCES-MIB::hrSWRunName.6 = STRING: "migration/0"
HOST-RESOURCES-MIB::hrSWRunName.7 = STRING: "watchdog/0"
HOST-RESOURCES-MIB::hrSWRunName.8 = STRING: "migration/1"
HOST-RESOURCES-MIB::hrSWRunName.10 = STRING: "ksoftirqd/1"
HOST-RESOURCES-MIB::hrSWRunName.11 = STRING: "kworker/0:1"
獲取程序執行路徑:
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 hrSWRunPath
HOST-RESOURCES-MIB::hrSWRunPath.1 = STRING: "/sbin/init"
HOST-RESOURCES-MIB::hrSWRunPath.2 = STRING: "kthreadd"
HOST-RESOURCES-MIB::hrSWRunPath.3 = STRING: "ksoftirqd/0"
HOST-RESOURCES-MIB::hrSWRunPath.5 = STRING: "kworker/u:0"
HOST-RESOURCES-MIB::hrSWRunPath.6 = STRING: "migration/0"
HOST-RESOURCES-MIB::hrSWRunPath.7 = STRING: "watchdog/0"
獲取程序執行引數:
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 hrSWRunParameters
HOST-RESOURCES-MIB::hrSWRunParameters.982 = STRING: "-8 38400 tty1"
HOST-RESOURCES-MIB::hrSWRunParameters.1687 = ""
HOST-RESOURCES-MIB::hrSWRunParameters.1953 = STRING: "/root/optools/game.py"
HOST-RESOURCES-MIB::hrSWRunParameters.2797 = ""
HOST-RESOURCES-MIB::hrSWRunParameters.3183 = STRING: "-server -Xms512m -Xmx512m -XX:MaxPermSize=256m -cp /usr/local/mobileGame/conf:/usr/local/mobileGame/bin/mobileGame.jar com.joywa"
HOST-RESOURCES-MIB::hrSWRunParameters.3947 = STRING: "-D"
HOST-RESOURCES-MIB::hrSWRunParameters.4135 = ""
HOST-RESOURCES-MIB::hrSWRunParameters.4267 = ""
HOST-RESOURCES-MIB::hrSWRunParameters.4368 = STRING: "-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid"
程序執行CPU佔用
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 hrSWRunPerfCPU
HOST-RESOURCES-MIB::hrSWRunPerfCPU.1 = INTEGER: 71
HOST-RESOURCES-MIB::hrSWRunPerfCPU.2 = INTEGER: 0
HOST-RESOURCES-MIB::hrSWRunPerfCPU.3 = INTEGER: 116
HOST-RESOURCES-MIB::hrSWRunPerfCPU.5 = INTEGER: 54
HOST-RESOURCES-MIB::hrSWRunPerfCPU.6 = INTEGER: 0
HOST-RESOURCES-MIB::hrSWRunPerfCPU.7 = INTEGER: 32
HOST-RESOURCES-MIB::hrSWRunPerfCPU.8 = INTEGER: 0
HOST-RESOURCES-MIB::hrSWRunPerfCPU.10 = INTEGER: 87
程序執行記憶體佔用:
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 hrSWRunPerfMem
HOST-RESOURCES-MIB::hrSWRunPerfMem.1 = INTEGER: 2280 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.2 = INTEGER: 0 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.3 = INTEGER: 0 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.5 = INTEGER: 0 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.6 = INTEGER: 0 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.7 = INTEGER: 0 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.8 = INTEGER: 0 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.10 = INTEGER: 0 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.11 = INTEGER: 0 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.12 = INTEGER: 0 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.13 = INTEGER: 0 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.14 = INTEGER: 0 KBytes
CPU 1、5、15分鐘負載:
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 .1.3.6.1.4.1.2021.10.1.3.1
UCD-SNMP-MIB::laLoad.1 = STRING: 0.09
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100.1.3.6.1.4.1.2021.10.1.3
UCD-SNMP-MIB::laLoad.1 = STRING: 0.08
UCD-SNMP-MIB::laLoad.2 = STRING: 0.12
UCD-SNMP-MIB::laLoad.3 = STRING: 0.11
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 laLoad
UCD-SNMP-MIB::laLoad.1 = STRING: 0.14
UCD-SNMP-MIB::laLoad.2 = STRING: 0.13
UCD-SNMP-MIB::laLoad.3 = STRING: 0.11
記憶體:
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 .1.3.6.1.4.1.2021.4.5.0
UCD-SNMP-MIB::memTotalReal.0 = INTEGER: 2050228 kB
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 .1.3.6.1.4.1.2021.4.6.0
UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 1071036 kB
[email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 .1.3.6.1.4.1.2021.4.11.0
UCD-SNMP-MIB::memTotalFree.0 = INTEGER: 5261240 kB
Memory Statistics
• Total Swap Size: .1.3.6.1.4.1.2021.4.3.0
• Available Swap Space: .1.3.6.1.4.1.2021.4.4.0
• Total RAM in machine: .1.3.6.1.4.1.2021.4.5.0
• Total RAM used: .1.3.6.1.4.1.2021.4.6.0
• Total RAM Free: .1.3.6.1.4.1.2021.4.11.0
• Total RAM Shared: .1.3.6.1.4.1.2021.4.13.0
• Total RAM Buffered: .1.3.6.1.4.1.2021.4.14.0
• Total Cached Memory: .1.3.6.1.4.1.2021.4.15.0
相關推薦
tips:snmp中對監控有用的OID們
轉自:http://blog.sina.com.cn/s/blog_63cf1c510101e7en.html 獲取機器名: [email protected]:~$ snmpwalk -v 2c -c public 192.168.100.100 sys
每日一python(3):python 中對list去重的兩種方法
在python相關職位的面試過程中,會對列表list的去重進行考察。(注意有時會要求保證去重的順序性) 方法1:直觀方法 思路:先建立一個新的空列表,通過遍歷原來的列表,再利用邏輯關係not in 來去重 程式碼: #coding:utf-8 ll = [
(十二)Hibernate中的多表操作(1):單向多對一
art 保存 int gen round t對象 情況 映射文件 拋出異常 由“多”方可知“一”方的信息,比如多個員工使用同一棟公寓,員工可以知道公寓的信息,而公寓無法知道員工的信息。 案例一: pojo類 public class Department {
小tips:正則表達式中的RegExp.$1
屬性 pre con clas 對象 logs 出生日期 tip log RegExp 是javascript中的一個內置對象。為正則表達式。RegExp.$1是RegExp的一個屬性,指的是與正則表達式匹配的第一個子匹配(以括號為標誌)字符串,以此類推,RegExp.$2
專家坐堂:機器學習中對核函數的理解
wechat size 學習 blank weixin itl cti title redirect 專家坐堂:機器學習中對核函數的理解 專家坐堂:機器學習中對核函數的理解
zabbix企業應用:通過SNMP和iDRAC監控DELL服務器硬件
創建 idv epo pla dev 責任 state cti update 原創作品,允許轉載,轉載時請務必以超鏈接形式標明文章 原始出處 、作者信息和本聲明。否則將追究法律責任。http://qicheng0211.blog.51cto.com/3958621/1749
Zabbix(五):高級應用-web方案、被動監控、基於snmp協議被動監控、proxy配置測試實例
zabbix proxy1.web方案web scenario:web監控方案,web場景;web scenarios指的是監控指定的web站點的資源下載及頁面響應時間等數據指標;(1)創建web監控需要先定義一個web scenario(方案):一個web方案包括一個或多個HTTP請求或步驟(steps)
GA:利用GA對一元函數進行優化過程,求x∈(0,10)中y的最大值——Jason niu
title variable ati 過程 優化 mea ... http [] x = 0:0.01:10; y = x + 10*sin(5*x)+7*cos(4*x); figure plot(x, y) xlabel(‘independent variable
JS中對象的特征:封裝(函數)
函數 property 對象 調用 一個 .proto .get 定義 col 面向對象的特征 1、第一個特征:封裝 1.1概念:隱藏實現細節的過程 1.2優點:重用和隱藏細節 Java裏面有權限修飾符,但是JS裏面沒有,JS所有的屬性都是公共的,為了讓屬性私有化,就有相
JS中對象的特征:繼承
所有 對象 屬性 anim intro 原型鏈 pro 舌頭 dog 子類沿用父類的屬性和方法來達到重用,並且子類可以擴展自己的屬性和方法 2.1繼承方法 2.1.1對象冒充法 優點:可以繼承屬性 缺點:不可以繼承方法,檢測類型可以發現子類不在父類中 強制繼承 js 先定
js對象數組操作之一:對象數組中對象去重的方法總結
jquer pre als ext code arr 行操作 原生js ... 在日常開發業務中,經常會有一個數組由多個對象構成,需要對這種數據結構進行操作,如下: const arr = [ { name:‘tom‘, age:15 }, { name:‘jack‘,
轉載:OpenCV中的對齊指針(alignPtr)
art 開始 程序 alloc 個數 sizeof 內存地址 申請 指向 轉載地址:https://www.tuicool.com/articles/q2QrQr 在某些架構上,只有能被指定數(如4,16)整除的內存地址才能夠被訪問,否則程序會crash,或者出現錯誤的結果
C++:“函式模板“中對“非型別引數”作偏特化時遇到的問題
在使用 “函式模板“對“非型別引數”作偏特化時遇到編譯報錯的問題,程式碼及報錯資訊如下 template<typename T, int size> void toStr() { cout << "1.---------------------" <<
ORA——00600錯誤的原因是:(Oracle中對clob型別欄位的操作)
ORA——00600錯誤的原因是:(Oracle中對clob型別欄位的操作) 改正的程式碼如下: //3.2生成資料插入語句 (增加的方式) StringBuilder insertSql = new StringBuilder(“INSERT INTO “); insertSql.a
Shell-case:指令碼中在yum安裝軟體包前如何對環境進行檢測
最近一直忙於學習Linux的知識,寫了不少東西都是自己當天學的Linux知識,還有一些自己當天的知識總結,已經很久沒有寫過正兒八經寫寫自己研究分析出來的演算法,這個國慶節沒什麼事做,就一些具體的需求,做了點研究,結合學過的shell指令碼的知識,做了幾個指令
CSS:bootstrap中switch事件監控
問題:bootstrap 官網中只演示了css樣式,沒有給js,無法獲取值 思路:多次嘗試,發現switch的val值可以獲取到,於是通過js監控點選事件,給switch賦值實現該功能。若為新增則值為空,將value賦值0;若為新增,判斷有效無效,若有效模擬點選事件切換樣式。 jsp
劍指offer第三十五題:陣列中的逆序對
題目描述 在陣列中的兩個數字,如果前面一個數字大於後面的數字,則這兩個數字組成一個逆序對。輸入一個數組,求出這個陣列中的逆序對的總數P。並將P對1000000007取模的結果輸出。 即輸出P%1000000007 輸入描述: 題目保證輸入的陣列中沒有的相同的數字
劍指Offer33:陣列中的逆序對
思路: 利用歸併排序統計逆序對的個數。即將陣列不斷平均分,當分到只剩2個元素和或者小於時,根據具體元素的大小判斷是否存在逆序對,若存在則調換,以免重複統計。總計結束後返回上一層繼續判斷 # -*- coding:utf-8 -*- class Solution: def Invers
劍指offer程式設計題(JAVA實現)——第35題:陣列中的逆序對
github https://github.com/JasonZhangCauc/JZOffer 劍指offer程式設計題(JAVA實現)——第35題:陣列中的逆序對 題目
劍指Offer面試題36(Java版):陣列中的逆序對
題目:在陣列中的兩個數字如果前面一個數字大於後面的數字,則這兩個數字組成一個逆序對。輸入一個數組,求出這個陣列中的逆序對的總數 例如在陣列{7,5,6,4}中,一共存在5對逆序對,分別是{7,6},{7,5},{7,4},{6,4},{5,4}。 看到這個題目,我們的第一反