目前分類:IT (9)

瀏覽方式: 標題列表 簡短摘要

大部分的狀況,Windows 裝完,只要有裝卡,都會啟動相關的服務,即使您沒有使用芳分享,也是一樣。
一般的問題,幾乎都是防火牆沒放行或是網路卡 File Sharing and Printing 沒勾,但是如果你都勾選了,卻在管理的 MMC 發生分享錯誤無法顯示,那就是另外一種問題了

把服務的 Computer Browser 重新啟動,應該就可以解決。

延伸作法,想要用 command 關閉網路芳鄰可以下

net stop "Computer Browser"
net stop Server

想要開啟網路芳鄰功能可以下

net start "Computer Browser"

如果想寫成批次檔案可以這樣寫

芳鄰關閉.bat

@echo off
net stop "Computer Browser"
net stop Server
pause

芳鄰啟用.bat

@echo off
net start "Computer Browser"
pause

parrotchang 發表在 痞客邦 留言(16) 人氣()

Outlook 2000 HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Outlook\Security
Outlook 2002 HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook\Security
Outlook 2003 HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Security

警告:不當使用「登錄編輯器」可能會導致嚴重的問題,甚至必須重新安裝作業系統。Microsoft 不保證您可以解決錯誤使用登錄編輯器所造成的問題。請自行承擔使用「登錄編輯器」的風險。

套用這個修正程式之後,請使用 Level1RemoveLevel1Add 登錄機碼自訂附件的安全行為。

遵循這些步驟,使用 Level1Remove 登錄機碼,讓 Outlook 2000 開啟原本被封鎖的檔案類型:

  1. 如果 Outlook 2000 正在執行,請結束此程式。
  2. 按一下 [開始],然後按一下 [執行]
  3. [開啟] 方塊中,輸入 regedit,然後按一下 [確定]
  4. 請確認下列機碼存在。如果它已經存在,請跳至步驟 5。
    HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Outlook\Security
    如果機碼路徑不存在,則請建立它。如果要建立機碼路徑,請找出並選取下列登錄機碼:
    HKEY_CURRENT_USER\Software\Microsoft
    1. 按一下 [編輯] 功能表,按一下 [新增],然後按一下 [機碼]
    2. 輸入 Office,然後按 ENTER 鍵。
    3. 按一下 [編輯] 功能表,按一下 [新增],然後按一下 [機碼]
    4. 輸入 9.0,然後按 ENTER 鍵。
    5. 按一下 [編輯] 功能表,按一下 [新增],然後按一下 [機碼]
    6. 輸入 Outlook,然後按 ENTER 鍵。
    7. 按一下 [編輯] 功能表,按一下 [新增],然後按一下 [機碼]
    8. 輸入 Security,然後按 ENTER 鍵。
  5. 按一下 [編輯] 功能表,按一下 [新增],然後按一下 [字串值]
  6. 為新值輸入下列名稱:Level1Remove
  7. 按 ENTER 鍵。
  8. 在新的字串值名稱上按一下滑鼠右鍵,然後按一下 [修改]
  9. 輸入您要使用 Outlook 2000 存取的檔案類型的副檔名,如下所示:.exe

    如果要指定多個檔案類型,請使用下列格式:

    .exe; .com
  10. 完成時,請按一下 [確定]
  11. 結束「登錄編輯器」。
  12. 重新啟動電腦。

當您啟動 Outlook 2000 時,就可以存取 Windows 登錄中指定的檔案類型了。

注意: Microsoft 建議您僅啟用需要存取的檔案類型。如果平常很少收到某特定檔案類型,Microsoft 建議您將 Outlook 2000 設為可臨時存取此種檔案類型,然後復原對 Windows 登錄所做的變更,重設回封鎖狀態。

遵循這些步驟,使用 Level1Add 登錄機碼,將 Outlook 2000 設為不會開啟原本可存取的檔案類型:

  1. 如果 Outlook 2000 正在執行,請結束此程式。
  2. 按一下 [開始],然後按一下 [執行]
  3. [開啟] 方塊中,輸入 regedit,然後按一下 [確定]
  4. 請確認下列機碼存在。如果它已經存在,請跳至步驟 5。
    HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Outlook\Security
    如果機碼路徑不存在,則請建立它。如果要建立機碼路徑,請找出並選取下列登錄機碼:
    HKEY_CURRENT_USER\Software\Microsoft
    1. 按一下 [編輯] 功能表,按一下 [新增],然後按一下 [機碼]
    2. 輸入 Office,然後按 ENTER 鍵。
    3. 按一下 [編輯] 功能表,按一下 [新增],然後按一下 [機碼]
    4. 輸入 9.0,然後按 ENTER 鍵。
    5. 按一下 [編輯] 功能表,按一下 [新增],然後按一下 [機碼]
    6. 輸入 Outlook,然後按 ENTER 鍵。
    7. 按一下 [編輯] 功能表,按一下 [新增],然後按一下 [機碼]
    8. 輸入 Security,然後按 ENTER 鍵。
  5. 按一下 [編輯] 功能表,按一下 [新增],然後按一下 [字串值]
  6. 為新值輸入下列名稱:Level1Add
  7. 按 ENTER 鍵。
  8. 在新的字串值名稱上按一下滑鼠右鍵,然後按一下 [修改]。
  9. 輸入不允許從 Outlook 2000 存取的檔案類型副檔名,如下所示:.zzz

    如果要指定多個檔案類型,請使用下列格式:

    .zzz;.yyy
  10. 完成時,請按一下 [確定]
  11. 結束「登錄編輯器」。
  12. 重新啟動電腦。

當您啟動 Outlook 2000 時,就可以封鎖 Windows 登錄中指定的檔案類型。

parrotchang 發表在 痞客邦 留言(0) 人氣()

Internet Explorer 的網際網路選項的"連線"不見了!?

解決方法 :

試試

在開始→ 執行中,輸入 gpedit.msc,在使用者設定→ 系統管理範本→ Windows元件→ Internet Explorer→ 網際網路控制台中,找到停用連線畫面的選項,把設定改成尚未設定或已停用。

parrotchang 發表在 痞客邦 留言(1) 人氣()

也許哪天有空寫個批次檔案來處理 XD

Outlook 2007 如何開啟不安全的副檔

1. 以具有 Administrator 的使用者登入電腦,並確認 Outlook 是關閉的
2. 由 [開始] => [執行],輸入 regedit,按下 [確定]。
3. 找出下列機碼:

HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\Security

4. 功能表上 [編輯] => [新增] => [字串值]
5. 輸入 Level1Remove (中間沒有空格,且大小寫須符合),按下 ENTER
6. 雙擊 Level1Remove
7. 輸入您要移除的附檔名清單,再按一下 [確定]。每個附件副檔名都是以用「分號」隔開,且需要包含那個「點」。
例如:想要讓 .exe 和 .com 附件讓它們可以在 email 中被看到,則輸入 .exe;.com
8. 不用重開機,只要重啟 Outlook

目前已知 Outlook 會阻擋的檔案類型有:
副檔名 檔案描述
.ade Microsoft Access project
.adp .Microsoft Access project
.asx Windows Media Audio 或 Video shortcut (只在 Outlook 2002 中才會阻擋)
.bas Visual Basic class module
.bat 批次檔
.chm 經編譯過的 HTML 說明檔
.cmd Windows NT Command script
.com MS-DOS 程式
.cpl 控制台用的檔案
.crt 安全認證
.exe 程式
.hlp 說明檔
.hta HTML 程式檔
.inf 安裝資訊檔
.ins Internet Naming Service
.isp Internet Communication settings
.js JScript Script
.jse Jscript Encoded Script
.lnk 捷徑
.mda Microsoft Access add-in program(只在 Outlook 2002 中才會阻擋)
.mdb Microsoft Access 程式
.mde Microsoft Access MDE database
.mdz Microsoft Access wizard
.msc Microsoft Common Console document
.msi Windows Installer package
.msp Windows Installer patch
.mst Visual Test source 檔案
.pcd Photo CD 影像檔
.pif MS-DOS 程式捷徑
.prf Microsoft Outlook profile settings (只在 Outlook 2002 中才會阻擋)
.reg 登錄(registry)資料檔
.scf Windows Explorer command(只在 Outlook 2002 中才會阻擋)
.scr 螢幕保護程式
.sct Windows Script Component
.shb Shell Scrap Object
.shs Shell Scrap Object
.url 網路(internet)捷徑
.vb VBScript
.vbe VBScript encoded script
.vbs Visual Basic Script
.wsc Windows Script Component
.wsf Windows Script 檔案
.wsh Windows Script Host 設定檔

parrotchang 發表在 痞客邦 留言(2) 人氣()

當您嘗試開啟 [裝置管理員] 或 [電腦管理] 視窗時的錯誤訊息:「MMC 無法開啟檔案 C:\WINDOWS\system32\devmgmt.msc」

徵狀
當您嘗試開啟 [裝置管理員] 或 [電腦管理] 視窗時,會收到類似下列的錯誤訊息:
MMC 無法開啟檔案 C:\WINDOWS\system32\devmgmt.msc。

這可能是因為檔案不存在、不是 MMC 主控台,或是由較新版本的 MMC 所建立。這也可能是因為您沒有足夠的檔案存取權限。

發生的原因
如果 Microsoft Management Console (MMC) 所使用的 .dll 檔案有一或多個找不到或者損毀,就可能會發生這個問題:
• Msxml.dll
• Msxml2.dll
• Msxml3.dll

解決方案
如果要解決這個問題,請依照下列步驟執行:
1. 按一下 [開始],按一下 [執行],輸入 cmd,然後按一下 [確定]。
2. 在命令提示字元中輸入 cd %windir%\system32,然後按下 ENTER。

注意 %Windir% 資料夾是您安裝 Microsoft Windows 的資料夾。
3. 輸入下列命令,並在各命令之後按下 ENTER:
Regsvr32 Msxml.dll
Regsvr32 Msxml2.dll
Regsvr32 Msxml3.dll
4. 輸入 exit,然後按下 ENTER,關閉 [命令提示字元] 視窗。
5. 重新啟動電腦。

parrotchang 發表在 痞客邦 留言(0) 人氣()

/var/adm/wtmp档案太大怎么办
  
  环境 产品:RS/6000
  软件:AIX
  问题 /var/adm/wtmp文件保存所有用户登录的讯息,随著时间会增长到很大,/var/adm/wtmp档案太大时怎么办?
  解答 /var/adm/wtmp档案太大时,有时需要清理或编辑整理。
  要清理它,执行cp /dev/null /var/adm/wtmp.
  
  要编辑整理部分清理,用fwtmp命令先将文件wtmp变成ASCII格式的档案dummy.file:
  /usr/sbin/acct/fwtmp < /var/adm/wtmp > dummy.file,
  编辑之後用
  /usr/sbin/acct/fwtmp -ic < dummy.file > /var/adm/wtmp
  再将ASCII文件转变成二进位文件.
  
  JESMSG显示屏幕,进行类似于上述2中的操作即可.

parrotchang 發表在 痞客邦 留言(0) 人氣()

如果 snmp 已停止,但 sybsys 鎖定,可能是 3個問題

1.netsnmp 版本要一致
rpm -qa | grep snmp

net-snmp-utils-5.3.1-19.el5_1.4
net-snmp-libs-5.3.1-19.el5_1.4
net-snmp-5.3.1-19.el5_1.4

用 CentOS 5.1 啟動時出現 snmpd dead but pid file exists 後來發現是 net-snmp 跟 net-snmp-libs 的版本不一樣導致的,升級了 net-snmp-libs 後問題就解決了

2.CentOS 安全性設置訊息,可以在 tail -f /var/log/messages 找到相關蛛絲馬跡,解決方法如下

more /var/log/messages
setroubleshoot:      SELinux is preventing /usr/sbin/snm
pd (snmpd_t) "create" access to <Unknown> (snmpd_t).      For complete SELinux m
essages. run sealert -l 2b6db142-43ab-4e78-8f35-1fa571261694

執行 sealert -l 2b6db142-43ab-4e78-8f35-1fa571261694 得到下面的訊息

Summary
    SELinux is preventing /usr/sbin/snmpd (snmpd_t) "create" access to <Unknown>
    (snmpd_t).

Detailed Description
    SELinux denied access requested by /usr/sbin/snmpd. It is not expected that
    this access is required by /usr/sbin/snmpd and this access may signal an
    intrusion attempt. It is also possible that the specific version or
    configuration of the application is causing it to require additional access.
    Please file a http://bugzilla.redhat.com/bugzilla/enter_bug.cgi against this
    package.

Allowing Access
    Sometimes labeling problems can cause SELinux denials.  You could try to
    restore the default system file context for <Unknown>, restorecon -v
    <Unknown>. There is currently no automatic way to allow this access.
    Instead, you can generate a local policy module to allow this access - see
    http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385 - or you can
    disable SELinux protection entirely for the application. Disabling SELinux
    protection is not recommended. Please file a
    http://bugzilla.redhat.com/bugzilla/enter_bug.cgi against this package.
    Changing the "snmpd_disable_trans" boolean to true will disable SELinux
    protection this application: "setsebool -P snmpd_disable_trans=1."

    The following command will allow this access:
    setsebool -P snmpd_disable_trans=1

Additional Information

Source Context                user_u:system_r:snmpd_t
Target Context                user_u:system_r:snmpd_t
Target Objects                None [ netlink_route_socket ]
Affected RPM Packages         net-snmp-5.3.1-19.el5_1.4 [application]
Policy RPM                    selinux-policy-2.4.6-30.el5
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   plugins.disable_trans
Host Name                     bscldap.cht.com.tw
Platform                      Linux bscldap.cht.com.tw 2.6.18-8.1.15.el5 #1 SMP
                              Mon Oct 22 08:32:04 EDT 2007 i686 i686
Alert Count                   58
Line Numbers

Raw Audit Messages

avc: denied { create } for comm="snmpd" egid=0 euid=0 exe="/usr/sbin/snmpd"
exit=-13 fsgid=0 fsuid=0 gid=0 items=0 pid=27302
scontext=user_u:system_r:snmpd_t:s0 sgid=0 subj=user_u:system_r:snmpd_t:s0
suid=0 tclass=netlink_route_socket tcontext=user_u:system_r:snmpd_t:s0
tty=(none) uid=0

根據上面資料,最簡單也最快的解決方式如下所述

# 解除 sybsys 鎖定
rm /var/lock/subsys/snmpd
# 解除 snmpd 安全性設定
setsebool -P snmpd_disable_trans=1
# 啟動 snmpd 服務
service snmpd start

3.Disable IPV6 support

vi /etc/modprobe.conf
=============
alias net-pf-10 off
alias ipv6 off
============

vi /etc/sysconfig/network
=============
NETWORKING_IPV6=no
=============

vi /etc/sysconfig/network-scripts/ifcfg-eth0
add
=============
IPV6INIT=no
=============

最後重新上 SNMP Package
yum install net-snmp net-snmp-devel net-snmp-utils net-snm-libs

parrotchang 發表在 痞客邦 留言(0) 人氣()

CentOS 5.x 之簡易 snmp 設定

CentIS 5.1

(1) 先確定有無安裝必要程式

rpm -qa | grep net-snmp

net-snmp-utils-5.3.1-19.el5_1.4 沒安裝會找不到 snmpwalk
net-snmp-libs-5.3.1-19.el5_1.4
net-snmp-5.3.1-19.el5_1.4


如果沒有安裝的話,用 yum 或是其他方法自行搞定!
搞定後記得把 snmpd 啟動,且設定為開機執行

chkconfig snmpd on
service snmpd start

(2) 設定 /etc/snmp/snmpd.conf

mrtg 會跑步起來,大部分的問題出在 snmp.conf 設定錯誤,一開始
可以執行 snmpwalk 測試看看

ex:

snmpwalk -c public -v 1 localhost system

-c public 指定 community ,public 是預設值,如果你更改了
snmp.conf community 設定,務必換成你自己的設定值。
snmpwalk 指令使用方法可以問男人 man snmpcmd

 -v 1 指定 protocol 版本,依你的 snmpd.conf 設定。

正確的話你應該可以看到許多類似如下的訊息:

SNMPv2-MIB::sysDescr.0 = STRING: Linux bscldap.cht.com.tw 2.6.18-8.1.15.el5 #1 SMP Mon Oct 22 08:32:04 EDT 2007 i686
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (261) 0:00:02.61
SNMPv2-MIB::sysContact.0 = STRING: Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
SNMPv2-MIB::sysName.0 = STRING: bscldap.cht.com.tw
SNMPv2-MIB::sysLocation.0 = STRING: Unknown (edit /etc/snmp/snmpd.conf)
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORID.1 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.2 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.3 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.4 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.5 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.6 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.7 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.8 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORDescr.1 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB module for managing TCP implementations
SNMPv2-MIB::sysORDescr.3 = STRING: The MIB module for managing IP and ICMP implementations
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for managing UDP implementations
SNMPv2-MIB::sysORDescr.5 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORDescr.6 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.7 = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr.8 = STRING: The management information definitions for the SNMP User-based Security Model.
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.6 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (0) 0:00:00.00


修改 snmpd.conf 如下:

com2sec notConfigUser  default       public

group   notConfigGroup v1           notConfigUser
group   notConfigGroup v2c           notConfigUser

view    all           included   .1 80
view    systemview    included   .1.3.6.1.2.1.2
view    systemview    included   .1.3.6.1.2.1.1
view    systemview    included   .1.3.6.1.2.1.25.1.1
view    systemview    included   .1.3.6.1.2.1.2.2.1
view    systemview    included   .1.3.6.1.4.1.2021.4.5.0
view    systemview    included   .1.3.6.1.4.1.2021.4.6.0
view    systemview    included   .1.3.6.1.4.1.2021.4.11.0
view    systemview    included   .1.3.6.1.4.1.2021.10.1.3.1
view    systemview    included   .1.3.6.1.4.1.2021.10.1.3.2
view    systemview    included   .1.3.6.1.4.1.2021.10.1.3.3
view    systemview    included   .1.3.6.1.4.1.2021.4.3.0
view    systemview    included   .1.3.6.1.4.1.2021.4.4.0
view    systemview    included   .1.3.6.1.4.1.2021.4.5.0
view    systemview    included   .1.3.6.1.4.1.2021.4.6.0
view    systemview    included   .1.3.6.1.4.1.2021.4.11.0
view    systemview    included   .1.3.6.1.4.1.2021.4.13.0
view    systemview    included   .1.3.6.1.4.1.2021.4.14.0
view    systemview    included   .1.3.6.1.4.1.2021.4.15.0
view    systemview    included   .1.3.6.1.4.1.2021.9.1.2.1
view    systemview    included   .1.3.6.1.4.1.2021.9.1.3.1
view    systemview    included   .1.3.6.1.4.1.2021.9.1.6.1
view    systemview    included   .1.3.6.1.4.1.2021.9.1.7.1
view    systemview    included   .1.3.6.1.4.1.2021.9.1.8.1
view    systemview    included   .1.3.6.1.4.1.2021.9.1.9.1
view    systemview    included   .1.3.6.1.4.1.2021.9.1.10.1
view    systemview    included   .1.3.6.1.4.1.2021.11.9.0
view    systemview    included   .1.3.6.1.4.1.2021.11.50.0
view    systemview    included   .1.3.6.1.4.1.2021.11.10.0
view    systemview    included   .1.3.6.1.4.1.2021.11.52.0
view    systemview    included   .1.3.6.1.4.1.2021.11.11.0
view    systemview    included   .1.3.6.1.4.1.2021.11.53.0
view    systemview    included   .1.3.6.1.4.1.2021.11.51.0

syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root <root@localhost> (configure /etc/snmp/snmp.local.conf)


#其他設定方法 (example of RH9)

# # sec.name source community
>com2sec local localhost your_community
>com2sec mynetwork 192.168.1.0/24 you_community
>
>
> your_community 改成你喜歡的識別字,自己記得住就好!
>
> 192.168.1.0/24 請根據你自己的情況加以修改,不要傻傻的照抄喔!
>
>
> # group.name sec.model sec.name
> group MyRWGroup any local
> group MyROGroup any mynetwork
>
>
> any 可以改成 v1 或 v2c 或 v3,不改也行!
>
>
> # incl/excl subtree mask
> view all included .1 80
>
> ## context sec.model sec.level prefix read write notify
> access MyROGroup "" any noauth 0 all none none
> access MyRWGroup "" any noauth 0 all all all
>
> syslocation Redhat 9.0〈隨便填不是粉重要〉
> syscontact <root@localhost>〈填上你的 email ,不是粉重要〉

access notConfigGroup "" any noauth 0 all none none

parrotchang 發表在 痞客邦 留言(0) 人氣()

[轉貼]Linux OID's for CPU,Memory and Disk Statistics

http://www.debianhelp.co.uk/linuxoids.htm



SNMP Basics

SNMP stands for Simple Network Management Protocol and consists of three key components: managed devices, agents, and network-management systems (NMSs). A managed device is a node that has an SNMP agent and resides on a managed network. These devices can be routers and access server, switches and bridges, hubs, computer hosts, or printers. An agent is a software module residing within a device. This agent translates information into a compatible format with SNMP. An NMS runs monitoring applications. They provide the bulk of processing and memory resources required for network management.

MIBs, OIDs Overview

MIB stands for Management Information Base and is a collection of information organized hierarchically. These are accessed using a protocol such as SNMP. There are two types of MIBs: scalar and tabular. Scalar objects define a single object instance whereas tabular objects define multiple related object instances grouped in MIB tables.

MIB files for specific devices or systems can be downloaded from here

OIDs or Object Identifiers uniquely identify manged objects in a MIB hierarchy. This can be depicted as a tree, the levels of which are assigned by different organizations. Top level MIB object IDs (OIDs) belong to different standard organizations. Vendors define private branches including managed objects for their own products.

Here is a sample structure of an OID

Iso (1).org(3).dod(6).internet(1).private(4).transition(868).products(2).chassis(4).card(1).slotCps(2)­
.­cpsSlotSummary(1).cpsModuleTable(1).cpsModuleEntry(1).cpsModuleModel(3).3562.3

Most of the people may be looking for OID's for Linux OID's for CPU,Memory and Disk Statistics for this first you need to install SNMP server and clients. If you want to install SNMP server and client installation in linux check here

CPU  Statistics

        Load
               1 minute Load: .1.3.6.1.4.1.2021.10.1.3.1
               5 minute Load: .1.3.6.1.4.1.2021.10.1.3.2
               15 minute Load: .1.3.6.1.4.1.2021.10.1.3.3

       CPU
               percentage of user CPU time:    .1.3.6.1.4.1.2021.11.9.0
               raw user cpu time:                  .1.3.6.1.4.1.2021.11.50.0
               percentages of system CPU time: .1.3.6.1.4.1.2021.11.10.0
               raw system cpu time:              .1.3.6.1.4.1.2021.11.52.0
               percentages of idle CPU time:   .1.3.6.1.4.1.2021.11.11.0
               raw idle cpu time:                   .1.3.6.1.4.1.2021.11.53.0
               raw nice cpu time:                  .1.3.6.1.4.1.2021.11.51.0

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

Disk Statistics

       The snmpd.conf needs to be edited. Add the following (assuming a machine with a single '/' partition):

                               disk    /       100000  (or)

                               includeAllDisks 10% for all partitions and disks

       The OIDs are as follows

               Path where the disk is mounted:                 .1.3.6.1.4.1.2021.9.1.2.1
               Path of the device for the partition:            .1.3.6.1.4.1.2021.9.1.3.1
               Total size of the disk/partion (kBytes):        .1.3.6.1.4.1.2021.9.1.6.1
               Available space on the disk:                      .1.3.6.1.4.1.2021.9.1.7.1
               Used space on the disk:                           .1.3.6.1.4.1.2021.9.1.8.1
               Percentage of space used on disk:             .1.3.6.1.4.1.2021.9.1.9.1
               Percentage of inodes used on disk:            .1.3.6.1.4.1.2021.9.1.10.1

Examples

These Commands you need to run on the SNMP server

Get available disk space for / on the target host

#snmpget -v 1 -c "community" target_name_or_ip .1.3.6.1.4.1.2021.9.1.7.1

this will return available disk space for the first entry in the 'disk' section of snmpd.conf; replace 1 with n for the nth entry

Get the 1-minute system load on the target host

#snmpget -v 1 -c "community" target_name_or_ip .1.3.6.1.4.1.2021.10.1.3.1

Get the 5-minute system load on the target host

#snmpget -v 1 -c "community" target_name_or_ip .1.3.6.1.4.1.2021.10.1.3.2

Get the 15-minute system load on the target host

#snmpget -v 1 -c "community" target_name_or_ip .1.3.6.1.4.1.2021.10.1.3.3

Get amount of available swap space on the target host

#snmpget -v 1 -c "community" target_name_or_ip .1.3.6.1.4.1.2021.4.4.0

parrotchang 發表在 痞客邦 留言(0) 人氣()