How to install ipmitool to support IPMI on Debian Lenny for Dell PE sc1435
[
2010/04/27 14:40 | by askwan ]
2010/04/27 14:40 | by askwan ]
The Intelligent Platform Management Interface (IPMI) specification is an Intel led standard which defines a set of common interfaces to a computer system which system administrators can use to monitor system health and manage the system.
DELL PE sc1435 have Standard Baseboard Management Controller with IPMI 2.0 support,so we can use this feature to manage our servers .
IPMItool is a command line utility for managing and configuring systems with IPMI support. This tool allows you the ability to communicate directly with the IPMI card installed in the server or over a network using TCP/IP.
First , Power On PowerEdge sc1435 server ,when BIOS check , input Ctrl-E to keyboard:
then configure IMPI to the server, and also you can refer this guide document:
http://www.dell.com/downloads/global/power/ps4q04-20040204-Murphy.pdf
then,start OS(Debian Lenny 5.0.3 amd64)
http://ipmitool.sourceforge.net/manpage.html
Reference:
ftp://download.intel.com/design/servers/ipmi/IPMIv2_0rev1_0.pdf
http://en.wikipedia.org/wiki/Intelligent_Platform_Management_Interface
http://www.mainehost.com/DellPowerEdge-SC1435.pdf
http://openipmi.sourceforge.net/IPMI.pdf
http://lab.advancedclustering.com/twiki/bin/view/Documentation/IPMITools
http://lonesysadmin.net/2007/06/21/how-to-configure-ipmi-on-a-dell-poweredge-running-red-hat-enterprise-linux/
-------END------
DELL PE sc1435 have Standard Baseboard Management Controller with IPMI 2.0 support,so we can use this feature to manage our servers .
IPMItool is a command line utility for managing and configuring systems with IPMI support. This tool allows you the ability to communicate directly with the IPMI card installed in the server or over a network using TCP/IP.
First , Power On PowerEdge sc1435 server ,when BIOS check , input Ctrl-E to keyboard:
then configure IMPI to the server, and also you can refer this guide document:
http://www.dell.com/downloads/global/power/ps4q04-20040204-Murphy.pdf
then,start OS(Debian Lenny 5.0.3 amd64)
#apt-get install ipmitool #apt-get install openipmi libopenipmi-dev
# modprobe ipmi_watchdog # modprobe ipmi_poweroff # modprobe ipmi_devintf # modprobe ipmi_si # modprobe ipmi_msghandlerCheck if ipmi_xxx related kernel modules have loaded or not:
# lsmod |grep ipmi ipmi_si 43628 2 ipmi_devintf 13200 0 ipmi_poweroff 13776 0 ipmi_watchdog 22896 0 ipmi_msghandler 38520 4 ipmi_si,ipmi_devintf,ipmi_poweroff,ipmi_watchdogNow,as you see, it have loaded,create the IPMI device:
mknod /dev/ipmi0 c `cat /proc/devices | grep ipmidev | awk '{print $1}' ` 0
you can then use ipmitool now !
#ipmitool lan print 1
Set in Progress : Set Complete
Auth Type Support : NONE MD2 MD5 PASSWORD
Auth Type Enable : Callback : MD2 MD5
: User : MD2 MD5
: Operator : MD2 MD5
: Admin : MD2 MD5
: OEM : MD2 MD5
IP Address Source : Static Address
IP Address : 192.168.101.3
Subnet Mask : 255.255.255.0
MAC Address : 00:18:8b:89:52:84
SNMP Community String : public
IP Header : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10
Default Gateway IP : 192.168.101.1
Default Gateway MAC : 00:00:00:00:00:00
Backup Gateway IP : 0.0.0.0
Backup Gateway MAC : 00:00:00:00:00:00
802.1q VLAN ID : Disabled
802.1q VLAN Priority : 0
RMCP+ Cipher Suites : 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14
Cipher Suite Priv Max : aaaaaaaaaaaaaaa
: X=Cipher Suite Unused
: c=CALLBACK
: u=USER
: o=OPERATOR
: a=ADMIN
: O=OEM
and you can reconfigure ipmi sets:
# ipmitool -I open lan set 1 ipsrc static # ipmitool -I open lan set 1 ipaddr 192.168.101.154 Setting LAN IP Address to 192.168.101.154 # ipmitool -I open lan set 1 defgw ipaddr 192.168.101.1 Setting LAN Default Gateway IP to 192.168.101.1 # ipmitool -I open lan set 1 netmask 255.255.255.0 Setting LAN Subnet Mask to 255.255.255.0 # ipmitool -I open lan set 1 access on #ipmitool -I open user set password 2 askwan.comlogo to another server,check the server's system event log:
# ipmitool -I lan -H 192.168.101.154 -U root -a sel list Password:
1 | 01/08/2010 | 03:45:19 | Event Logging Disabled #0x72 | Log area reset/cleared | Asserted 2 | Pre-Init Time-stamp | Power Supply #0x65 | Power Supply AC lost | Asserted 3 | Pre-Init Time-stamp | Power Supply #0x74 | Redundancy Lost 4 | 01/31/2010 | 06:19:46 | Power Supply #0x65 | Failure detected | Asserted 5 | 01/31/2010 | 06:19:50 | Power Supply #0x74 | Redundancy Lost 6 | 02/04/2010 | 22:52:58 | Power Supply #0x65 | Power Supply AC lost | Asserted 7 | 02/04/2010 | 22:53:08 | Power Supply #0x65 | Power Supply AC lost | Deasserted 8 | 02/04/2010 | 22:53:10 | Power Supply #0x74 | Fully Redundant 9 | 02/21/2010 | 19:41:41 | Power Supply #0x65 | Failure detected | Asserted a | 02/21/2010 | 19:41:44 | Power Supply #0x74 | Redundancy Lost b | 04/05/2010 | 21:13:58 | Power Supply #0x74 | Fully Redundantfor more usage of ipmitool ,please refer ipmitool man page :
http://ipmitool.sourceforge.net/manpage.html
Reference:
ftp://download.intel.com/design/servers/ipmi/IPMIv2_0rev1_0.pdf
http://en.wikipedia.org/wiki/Intelligent_Platform_Management_Interface
http://www.mainehost.com/DellPowerEdge-SC1435.pdf
http://openipmi.sourceforge.net/IPMI.pdf
http://lab.advancedclustering.com/twiki/bin/view/Documentation/IPMITools
http://lonesysadmin.net/2007/06/21/how-to-configure-ipmi-on-a-dell-poweredge-running-red-hat-enterprise-linux/
-------END------
"500 ERROR: User 'root' cannot be used as an NX user"
[
2010/03/27 11:38 | by askwan ]
2010/03/27 11:38 | by askwan ]
OS: CentOS 5
NXserver : 3.4
for security reasons, Nomachine can't allowed you to login with user root default!
if you want to login with root,then you can do followings!
or
then
now,you can login with user root!
NXserver : 3.4
NX> 203 NXSSH running with pid: 3164
NX> 285 Enabling check on switch command
NX> 285 Enabling skip of SSH config files
NX> 285 Setting the preferred NX options
NX> 200 Connected to address: xx.xx.xx.xx on port: 22
NX> 202 Authenticating user: nx
NX> 208 Using auth method: publickey
HELLO NXSERVER - Version 3.4.0-12 - LFE
NX> 105 Hello NXCLIENT - Version 3.4.0
NX> 134 Accepted protocol: 3.4.0
NX> 105 Set shell_mode: shell
NX> 105 Set auth_mode: password
NX> 105 Login
NX> 101 User: root
NX> 500 ERROR: User 'root' cannot be used as an NX user
NX> 999 Bye.
NX> 280 Exiting on signal: 15
NX> 285 Enabling check on switch command
NX> 285 Enabling skip of SSH config files
NX> 285 Setting the preferred NX options
NX> 200 Connected to address: xx.xx.xx.xx on port: 22
NX> 202 Authenticating user: nx
NX> 208 Using auth method: publickey
HELLO NXSERVER - Version 3.4.0-12 - LFE
NX> 105 Hello NXCLIENT - Version 3.4.0
NX> 134 Accepted protocol: 3.4.0
NX> 105 Set shell_mode: shell
NX> 105 Set auth_mode: password
NX> 105 Login
NX> 101 User: root
NX> 500 ERROR: User 'root' cannot be used as an NX user
NX> 999 Bye.
NX> 280 Exiting on signal: 15
for security reasons, Nomachine can't allowed you to login with user root default!
if you want to login with root,then you can do followings!
$vim /usr/NX/etc/server.cfg
EnableAdministratorLogin = "1"
EnableAdministratorLogin = "1"
or
EnableUserDB = "1"
EnablePasswordDB = "1"
EnablePasswordDB = "1"
$nxserver --useradd USERNAME [--administrator]
[--system [--home[=homedir]|--nohome][--gid[=gid]]
[--uid[=uid]]]
$nxserver --userenable USERNAME
# Enable the NX login for the specified user. This command is allowed
# only when NX user DB is enabled in the server configuration file.
$nxserver --userdisable USERNAME
#Disable the NX login for the specified user. Both the system and NX
#password, when the NX password DB is enabled, of the user are left
#unchanged.
[--system [--home[=homedir]|--nohome][--gid[=gid]]
[--uid[=uid]]]
$nxserver --userenable USERNAME
# Enable the NX login for the specified user. This command is allowed
# only when NX user DB is enabled in the server configuration file.
$nxserver --userdisable USERNAME
#Disable the NX login for the specified user. Both the system and NX
#password, when the NX password DB is enabled, of the user are left
#unchanged.
then
/etc/init.d/nxserver restart
now,you can login with user root!
A friend company's Linux server ext3 filesystem becomes read only
[
2010/03/08 11:12 | by askwan ]
2010/03/08 11:12 | by askwan ]
System has been restarted everything seemed normal, the application starts normally! View the system boot log, there is no exception, the specific reasons for this situation also unknown now! It seems need to continue to observe.
However, open system, found that swap partition 0
Is it did not installed the system swap partition?
output Nothing, there is no swap partition indeed !
this System has 4G mem, so additional 8G swap space manually
[root@youke2 log]# mkswap /tmp/swapfree
Setting up swapspace version 1, size = 8589930 kB
Re-examine swap partition:
[root@youke2 log]# cat /proc/swaps
Filename Type Size Used Priority
/tmp/swapfree file 8388600 0 -1
USE top TO CHECK
OK! write this to fstab file,so it can valid at system start time !
However, open system, found that swap partition 0
Swap: 0k total, 0k used, 0k free, 300496k cached
Is it did not installed the system swap partition?
[root@youke2 log]# cat /proc/swaps
output Nothing, there is no swap partition indeed !
this System has 4G mem, so additional 8G swap space manually
[root@youke2 log]# dd if=/dev/zero of=/tmp/swapfree bs=1024K count=8192
8192+0 records in 8192+0 records out 8589934592 bytes (8.6 GB) copied, 111.247 seconds, 77.2 MB/s
8192+0 records in 8192+0 records out 8589934592 bytes (8.6 GB) copied, 111.247 seconds, 77.2 MB/s
[root@youke2 log]# mkswap /tmp/swapfree
Setting up swapspace version 1, size = 8589930 kB
[root@youke2 log]# swapon /tmp/swapfree
Re-examine swap partition:
[root@youke2 log]# cat /proc/swaps
Filename Type Size Used Priority
/tmp/swapfree file 8388600 0 -1
USE top TO CHECK
Tasks: 145 total, 1 running, 144 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.1%us, 0.2%sy, 0.0%ni, 94.4%id, 5.3%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 4138172k total, 3834908k used, 303264k free, 28220k buffers
Swap: 8388600k total, 0k used, 8388600k free, 3605544k cached
Cpu(s): 0.1%us, 0.2%sy, 0.0%ni, 94.4%id, 5.3%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 4138172k total, 3834908k used, 303264k free, 28220k buffers
Swap: 8388600k total, 0k used, 8388600k free, 3605544k cached
OK! write this to fstab file,so it can valid at system start time !
/tmp/swapfree swap swap defaults 0 0
compile net-snmp on debian lenny
[
2009/09/23 16:16 | by askwan ]
2009/09/23 16:16 | by askwan ]
net-snmp
下载地址:http://ncu.dl.sourceforge.net/project/net-snmp/net-snmp/5.4.2.1/net-snmp-5.4.2.1.tar.gz
解压然后编译,编译参数
如编译报错:
这是缺少libperl-dev开发库,安装上
然后make ;make install
可以用snmpconf配置snmpd.conf,也可用例子文件
然后根据需要修改此文件
启动
测试
---------END------------
下载地址:http://ncu.dl.sourceforge.net/project/net-snmp/net-snmp/5.4.2.1/net-snmp-5.4.2.1.tar.gz
解压然后编译,编译参数
./configure --prefix=/usr/local/net-snmp/ --with-sys-contact="askwan@askwan.com" --with-sys-location="pudong shanghai China" --enable-shared --with-default-snmp-version=2 --enable-mfd-rewrites --with-mib-modules="misc/ipfwacc mibII host disman/event-mib ucd_snmp agent_mibs agentx notification target utilities ucd-snmp/diskio tunnel mibII/mta_sendmail" --with-sysconfdir="/usr/local/net-snmp/etc/"
如编译报错:
Quotation
/usr/bin/ld: cannot find -lperl
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
这是缺少libperl-dev开发库,安装上
apt-get install libperl-dev
然后make ;make install
可以用snmpconf配置snmpd.conf,也可用例子文件
cp EXAMPLE.conf /usr/local/net-snmp/etc/snmpd.conf
然后根据需要修改此文件
com2sec local localhost askwan
com2sec mynetwork 192.168.0.0/24 askwan
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
group MyROGroup usm mynetwork
view all included .1 80
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none
syslocation shanghai pu dong
syscontact Me askwan@askwan.com
com2sec mynetwork 192.168.0.0/24 askwan
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
group MyROGroup usm mynetwork
view all included .1 80
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none
syslocation shanghai pu dong
syscontact Me askwan@askwan.com
启动
/usr/local/net-snmp/sbin/snmpd -Lsd -Lf /dev/null -p /var/run/snmpd.pid -a -c /usr/local/net-snmp/etc/snmpd.conf
测试
snmpwalk -c askwan -v2c 192.168.0.5 if
Quotation
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: eth0
IF-MIB::ifType.1 = INTEGER: softwareLoopback(24)
IF-MIB::ifType.2 = INTEGER: ethernetCsmacd(6)
....
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: eth0
IF-MIB::ifType.1 = INTEGER: softwareLoopback(24)
IF-MIB::ifType.2 = INTEGER: ethernetCsmacd(6)
....
---------END------------



