Wednesday, May 7, 2008

nixCraft Linux Sys Admin Blog

nixCraft Linux Sys Admin Blog

Link to nixCraft Linux Sys Admin Blog

Why many MCSEs won't learn Linux

Posted: 07 May 2008 06:34 PM CDT

Paul has responded to MCSE mike. Checkout my stand on Linux admin vs Microsoft Windows admin.

There are few basic principals under UNIX and Linux. Any MCSE must understand and follow them.

a) Everything is a file - Including your hardware.

b) All server / desktop configuration stored in text files - /etc, /usr/local/etc and ~/.dot-files. So learn to edit and search text files. Learn basis of grep, awk and sed along with vi. Same way all errors are logged in a text file located at /var/log/ directory

c) One small utility performs one single task at a time - Typical Linux box may have 2000-4000 command installed. Each command provides a single functionality.

d) Linux / UNIX is designed for simplicity - Add complexity only where you must.

e) Filters - Ability to chain programs together to perform complex tasks.

g) Interactive commands and dialog boxes are rare in UNIX / Linux - Learn to use commands, command line arguments and man pages.

Let the flame war begun ;)

Related Posts:



© Why many MCSEs won't learn Linux - nixCraft - Support nixCraft when you shop at amazon. Thanks!

Emergency Server Management With Intelligent Platform Management Interface (IPMI)

Posted: 07 May 2008 05:49 PM CDT

Intelligent Platform Management Interface (IPMI) is a hardware level interface specification that defines a common, abstracted, message-based interface to platform monitoring and control functions. Both IPMI and KVM over IP can be used in emergency situations.

You can use IPMI to:
a] Monitor system health
b] Manage the system
c] Access system when network is down
d] Install new os
e] Power on / off system
f] Retrieve hardware logs etc
g] Read sensors data such as CPU temperature, fan speed, and voltage
h] Serial over LAN etc

How do I access server using IPMI?

You need IPMI client. This is supplied by your server manufacturer such as HP, Dell, IBM etc. You can also use ipmitool command to manage Intelligent Platform Management Interface (IPMI) functions of either the local system, via a kernel device driver, or a remote system, using IPMI V1.5 and IPMI v2.0.

How do I login to remote server using ipmitool?

ipmitool command is included in most Linux distributions Use the syntax as follows:
$ ipmitool -U root -I lan -H Server-IP -E shell
OR
$ ipmitool -U root -I lan -H 10.5.1.2 -E shell

If you have a Windows server, you will have access to the Windows Special Administration Console (SAC). If you have a Linux / BSD / UNIX server, you will have access via a console login.

How do I login to remote server using server manufacturers client?

Supermicro provides IPMI command line client called ipmicli.x86. To use this client you must have Supermicro based server or use above generic client.
$ ./ipmicli.x86 ipmi-server-ip
$ ./ipmicli.x86 10.5.1.2

Sample output:

Welcome to Supermicro IPMI Command Line Interface Rev 2.13 (build 06072101) Copyright(C) 2002-2006 Supermicro Computer Inc., All rights reserved  User Name: root Password: ********* connect ok ipmi>

Type help command to view supported commands:
ipmi>help
Sample output:

Usage:  open [ip address]      (if ip is not specified in the command line)  close                  (close the connection)  powerdown              (power down the system)  powerup                (power up the system)  reset                  (reset the system)  gshutdown              (graceful shutdown the system)  greboot                (graceful reboot the system)  gpowercycle            (graceful power cycle the system)  user username password (set new user)  password name password (change password)  console                (Text Remote Console Redirection)  sensor                 (read the sensors)  sel                    (read the system event log)  clearchassis           (clear chassis intrusion)  log [filename]         (log msg, ipmi.log is default if no filename specified)  ver                    (display version)  help                   (display usage)  quit                   (quit the program)

To view sensor data, use sensor command:
ipmi>sensor
Sample output:

CPU Temp Temperature (C)=5.00      Min=0.00      Max=75.00    ok Sys Temp Temperature (C)=29.00     Min=0.00      Max=75.00    ok CPU Vcore Voltage (V)=1.24      Min=1.08      Max=1.61     ok 1.5V Voltage (V)     =1.52      Min=1.44      Max=1.64     ok 3.3V Voltage (V)     =3.34      Min=2.96      Max=3.63     ok 5V Voltage (V)       =4.99      Min=4.48      Max=5.49     ok 12V Voltage (V)      =11.90     Min=10.75     Max=13.24    ok -12V Voltage (V)     =-12.30    Min=-13.20    Max=-10.80   ok VDIMM Voltage (V)    =1.80      Min=1.68      Max=1.98     ok 5VSB Voltage (V)     =4.80      Min=4.48      Max=5.49     ok Vfsb Voltage (V)     =1.20      Min=1.08      Max=1.32     ok VBAT Voltage (V)     =3.21      Min=2.96      Max=3.63     ok Fan1 Fan (RPM)       =11100.00  Min=600.00    Max=25500.00 ok Fan2 Fan (RPM)       =11500.00  Min=600.00    Max=25500.00 ok Fan3 Fan (RPM)       =10900.00  Min=600.00    Max=25500.00 ok Fan4 Fan (RPM)       =0.00      Min=600.00    Max=25500.00 fail Fan5 Fan (RPM)       =11000.00  Min=600.00    Max=25500.00 ok Fan6 Fan (RPM)       =0.00      Min=600.00    Max=25500.00 fail Chassis Intrusion = Intrusion Occurs Power Supply = ok ipmi>

Start text remote console redirection i.e. open login prompt. This is useful if server locked down because of wrong iptables / pf firewall settings. You can simply login using console and flush out all firewall rules. Type console at ipmi prompt:
ipmi>console
Sample output:

 You can press Ctrl-B to terminate Text Remote Console Redirection. Press [Enter] to continue...

Just press [Enter] key and you can login to your Linux box remotely even if access is blocked via IPtables or network connectivity issue.

login: root Password: May  7 13:31:47 bull login: ROOT LOGIN (root) ON ttyd1 Last login: Tue May  6 16:46:13 from 10.10.29.66 Copyright (c) 1992-2008 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994         The Regents of the University of California. All rights reserved.  FreeBSD 7.0-RELEASE-p1 (bull) #1: Fri Apr 25 18:22:31 CDT 2008  Welcome to FreeBSD!  Before seeking technical support, please use the following resources:  o  Security advisories and updated errata information for all releases are    at http://www.FreeBSD.org/releases/ - always consult the ERRATA section    for your release first as it's updated frequently.  o  The Handbook and FAQ documents are at http://www.FreeBSD.org/ and,    along with the mailing lists, can be searched by going to    http://www.FreeBSD.org/search/.  If the doc distribution has    been installed, they're also available formatted in /usr/share/doc.  If you still have a question or problem, please take the output of `uname -a', along with any relevant error messages, and email it as a question to the questions@FreeBSD.org mailing list.  If you are unfamiliar with FreeBSD's directory layout, please refer to the hier(7) manual page.  If you are not familiar with manual pages, type `man man'.  You may also use sysinstall(8) to re-enter the installation and configuration utility.  Edit /etc/motd to change this login announcement.  You have new mail.

I can now stop my FreeBSD firewall by typing following command:
# /etc/rc.d/ipfw forcestop
If you are using Linux, enter:
# service iptables stop

Next, time I will write about setting up IPMI for Intel / AMD boxes under Linux.

Further readings:

Continue reading rest of the Remote Server Management series.

Contents
  1. Remote Linux / UNIX / Windows Server Management With KVM over IP
  2. Emergency Server Management With Intelligent Platform Management Interface (IPMI)

Related Posts:



© Emergency Server Management With Intelligent Platform Management Interface (IPMI) - nixCraft - Support nixCraft when you shop at amazon. Thanks!

How do I find a Unix / Linux command?

Posted: 07 May 2008 10:41 AM CDT

How do I find UNIX / Linux command for particular task?

Answer to "How do I find a Unix / Linux command?"


Copyright © nixCraft. All Rights Reserved. Support nixCraft when you shop at amazon. Thanks!

No comments: