Recently in linux Category
Dmidecode:
Type Information
----------------------------------------
0 BIOS
1 System
2 Base Board
3 Chassis
4 Processor
5 Memory Controller
6 Memory Module
7 Cache
8 Port Connector
9 System Slots
10 On Board Devices
11 OEM Strings
12 System Configuration Options
13 BIOS Language
14 Group Associations
15 System Event Log
16 Physical Memory Array
17 Memory Device
18 32-bit Memory Error
19 Memory Array Mapped Address
20 Memory Device Mapped Address
21 Built-in Pointing Device
22 Portable Battery
23 System Reset
24 Hardware Security
25 System Power Controls
26 Voltage Probe
27 Cooling Device
28 Temperature Probe
29 Electrical Current Probe
30 Out-of-band Remote Access
31 Boot Integrity Services
32 System Boot
33 64-bit Memory Error
34 Management Device
35 Management Device Component
36 Management Device Threshold Data
37 Memory Channel
38 IPMI Device
39 Power Supply
Instead of type_id, you can also pass the keyword to the -t option of the dmidecode command. Following are the available keywords.
Keyword Types
------------------------------
bios 0, 13
system 1, 12, 15, 23, 32
baseboard 2, 10
chassis 3
processor 4
memory 5, 6, 16, 17
cache 7
connector 8
slot 9
# dmidecode -t 16
#dmidecode -t 17
or
#dmidecode -t memory
[2hei.net]# ipmitool
No command provided!
Commands:
raw Send a RAW IPMI request and print response
i2c Send an I2C Master Write-Read command and print response
spd Print SPD info from remote I2C device
lan Configure LAN Channels
chassis Get chassis status and set power state
power Shortcut to chassis power commands
event Send pre-defined events to MC
mc Management Controller status and global enables
sdr Print Sensor Data Repository entries and readings
sensor Print detailed sensor information
fru Print built-in FRU and scan SDR for FRU locators
gendev Read/Write Device associated with Generic Device locators sdr
sel Print System Event Log (SEL)
pef Configure Platform Event Filtering (PEF)
sol Configure and connect IPMIv2.0 Serial-over-LAN
tsol Configure and connect with Tyan IPMIv1.5 Serial-over-LAN
isol Configure IPMIv1.5 Serial-over-LAN
user Configure Management Controller users
channel Configure Management Controller channels
session Print session information
sunoem OEM Commands for Sun servers
kontronoem OEM Commands for Kontron devices
picmg Run a PICMG/ATCA extended cmd
fwum Update IPMC using Kontron OEM Firmware Update Manager
firewall Configure Firmware Firewall
shell Launch interactive IPMI shell
exec Run list of commands from file
set Set runtime variable for shell and exec
hpm Update HPM components using PICMG HPM.1 file
ekanalyzer run FRU-Ekeying analyzer using FRU files
[2hei.net]# ipmitool event 3
Sending SAMPLE event: Memory - Correctable ECC
0 | Pre-Init Time-stamp | Memory #0x53 | Correctable ECC | Asserted
[2hei.net]# ipmitool sdr elist
CPU0 below Tmax | 7Bh | ok | 3.0 | 47 degrees C
CPU1 below Tmax | 7Ah | ok | 3.1 | 39 degrees C
DIMM0 Area(RT3) | 7Eh | ok | 7.0 | 30 degrees C
PCI Area(RT2) | 7Fh | ok | 7.0 | 36 degrees C
CPU0 VCORE | 71h | ok | 3.0 | 0.90 Volts
[2hei.net~]#mcelog --cpu nehalem --dmi < /var/log/mcelog >> /home/2hei.net/mcelog.dmi
CPU1 VCORE | 70h | ok | 3.1 | 1.02 Volts
3.3V | 75h | ok | 7.0 | 3.30 Volts
+12V | 76h | ok | 7.0 | 11.81 Volts
VBAT | 79h | ok | 7.0 | 3.12 Volts
5V | 77h | ok | 7.0 | 4.90 Volts
Sys.1(CPU 1) | 80h | ns | 7.0 | No Reading
Sys.2(CPU 0) | 81h | ok | 7.0 | 6720 RPM
Sys.3(Front 1) | 82h | ok | 7.0 | 4080 RPM
Sys.4(Front 2) | 83h | ok | 7.0 | 3840 RPM
Sys.5(Rear 1) | 84h | ok | 7.0 | 4200 RPM
Sys.6 | 85h | ns | 7.0 | No Reading
Sys.7 | 86h | ns | 7.0 | No Reading
Sys.8 | 87h | ns | 7.0 | No Reading
Sys.9 | 88h | ns | 7.0 | No Reading
Sys.10 | 89h | ns | 7.0 | No Reading
Type Information
----------------------------------------
0 BIOS
1 System
2 Base Board
3 Chassis
4 Processor
5 Memory Controller
6 Memory Module
7 Cache
8 Port Connector
9 System Slots
10 On Board Devices
11 OEM Strings
12 System Configuration Options
13 BIOS Language
14 Group Associations
15 System Event Log
16 Physical Memory Array
17 Memory Device
18 32-bit Memory Error
19 Memory Array Mapped Address
20 Memory Device Mapped Address
21 Built-in Pointing Device
22 Portable Battery
23 System Reset
24 Hardware Security
25 System Power Controls
26 Voltage Probe
27 Cooling Device
28 Temperature Probe
29 Electrical Current Probe
30 Out-of-band Remote Access
31 Boot Integrity Services
32 System Boot
33 64-bit Memory Error
34 Management Device
35 Management Device Component
36 Management Device Threshold Data
37 Memory Channel
38 IPMI Device
39 Power Supply
Instead of type_id, you can also pass the keyword to the -t option of the dmidecode command. Following are the available keywords.
Keyword Types
------------------------------
bios 0, 13
system 1, 12, 15, 23, 32
baseboard 2, 10
chassis 3
processor 4
memory 5, 6, 16, 17
cache 7
connector 8
slot 9
# dmidecode -t 16
#dmidecode -t 17
or
#dmidecode -t memory
[2hei.net]# ipmitool
No command provided!
Commands:
raw Send a RAW IPMI request and print response
i2c Send an I2C Master Write-Read command and print response
spd Print SPD info from remote I2C device
lan Configure LAN Channels
chassis Get chassis status and set power state
power Shortcut to chassis power commands
event Send pre-defined events to MC
mc Management Controller status and global enables
sdr Print Sensor Data Repository entries and readings
sensor Print detailed sensor information
fru Print built-in FRU and scan SDR for FRU locators
gendev Read/Write Device associated with Generic Device locators sdr
sel Print System Event Log (SEL)
pef Configure Platform Event Filtering (PEF)
sol Configure and connect IPMIv2.0 Serial-over-LAN
tsol Configure and connect with Tyan IPMIv1.5 Serial-over-LAN
isol Configure IPMIv1.5 Serial-over-LAN
user Configure Management Controller users
channel Configure Management Controller channels
session Print session information
sunoem OEM Commands for Sun servers
kontronoem OEM Commands for Kontron devices
picmg Run a PICMG/ATCA extended cmd
fwum Update IPMC using Kontron OEM Firmware Update Manager
firewall Configure Firmware Firewall
shell Launch interactive IPMI shell
exec Run list of commands from file
set Set runtime variable for shell and exec
hpm Update HPM components using PICMG HPM.1 file
ekanalyzer run FRU-Ekeying analyzer using FRU files
[2hei.net]# ipmitool event 3
Sending SAMPLE event: Memory - Correctable ECC
0 | Pre-Init Time-stamp | Memory #0x53 | Correctable ECC | Asserted
[2hei.net]# ipmitool sdr elist
CPU0 below Tmax | 7Bh | ok | 3.0 | 47 degrees C
CPU1 below Tmax | 7Ah | ok | 3.1 | 39 degrees C
DIMM0 Area(RT3) | 7Eh | ok | 7.0 | 30 degrees C
PCI Area(RT2) | 7Fh | ok | 7.0 | 36 degrees C
CPU0 VCORE | 71h | ok | 3.0 | 0.90 Volts
[2hei.net~]#mcelog --cpu nehalem --dmi < /var/log/mcelog >> /home/2hei.net/mcelog.dmi
CPU1 VCORE | 70h | ok | 3.1 | 1.02 Volts
3.3V | 75h | ok | 7.0 | 3.30 Volts
+12V | 76h | ok | 7.0 | 11.81 Volts
VBAT | 79h | ok | 7.0 | 3.12 Volts
5V | 77h | ok | 7.0 | 4.90 Volts
Sys.1(CPU 1) | 80h | ns | 7.0 | No Reading
Sys.2(CPU 0) | 81h | ok | 7.0 | 6720 RPM
Sys.3(Front 1) | 82h | ok | 7.0 | 4080 RPM
Sys.4(Front 2) | 83h | ok | 7.0 | 3840 RPM
Sys.5(Rear 1) | 84h | ok | 7.0 | 4200 RPM
Sys.6 | 85h | ns | 7.0 | No Reading
Sys.7 | 86h | ns | 7.0 | No Reading
Sys.8 | 87h | ns | 7.0 | No Reading
Sys.9 | 88h | ns | 7.0 | No Reading
Sys.10 | 89h | ns | 7.0 | No Reading
CTRL + C Cancels the currently running command.
CTRL + D Logs out of the current session.
CTRL + Z Cancels current operation, moves back a directory or takes the current operation and moves it to the background.
CTRL + A Moves the cursor to first character.
CTRL + E Moves the cursor to last character.
CTRL + R Search history command
CTRL + W Deletes the last word typed in. For example, if you typed 'mv file1 file2' this shortcut would delete file2.
CTRL + U Erases the complete line.
CTRL + P Paste previous line(s). same as up
CTRL + B Moves the cursor backward one character.
CTRL + F Moves the cursor forward one character.
CTRL + H Erase one character. Similar to pressing backspace.
CTRL + S Stops all output on screen (XOFF).
CTRL + Q Turns all output stopped on screen back on (XON).
CTRL + D Logs out of the current session.
CTRL + Z Cancels current operation, moves back a directory or takes the current operation and moves it to the background.
CTRL + A Moves the cursor to first character.
CTRL + E Moves the cursor to last character.
CTRL + R Search history command
CTRL + W Deletes the last word typed in. For example, if you typed 'mv file1 file2' this shortcut would delete file2.
CTRL + U Erases the complete line.
CTRL + P Paste previous line(s). same as up
CTRL + B Moves the cursor backward one character.
CTRL + F Moves the cursor forward one character.
CTRL + H Erase one character. Similar to pressing backspace.
CTRL + S Stops all output on screen (XOFF).
CTRL + Q Turns all output stopped on screen back on (XON).
Just a mark:
nice -n 19 nice
19
sudo nice -n -20 nice
-20
-------------
$man nice
NICE(1) User Commands NICE(1)
NAME
nice - run a program with modified scheduling priority
SYNOPSIS
nice [OPTION] [COMMAND [ARG]...]
DESCRIPTION
Run COMMAND with an adjusted niceness, which affects process scheduling. With no COMMAND, print the current nice-
ness. Nicenesses range from -20 (most favorable scheduling) to 19 (least favorable).
-n, --adjustment=N
add integer N to the niceness (default 10)
--help display this help and exit
--version
output version information and exit
NOTE: your shell may have its own version of nice, which usually supersedes the version described here. Please
refer to your shell?. documentation for details about the options it supports.
dmesg has such logs:
usb 1-5.1: reset low speed USB device using ehci_hcd and address 4
usb 1-5.1: reset low speed USB device using ehci_hcd and address 4
usb 1-5.1: reset low speed USB device using ehci_hcd and address 4
usb 1-5.1: reset low speed USB device using ehci_hcd and address 4
usb 1-5.1: reset low speed USB device using ehci_hcd and address 4
usb 1-5.1: reset low speed USB device using ehci_hcd and address 4
usb 1-5.1: reset low speed USB device using ehci_hcd and address 4
# modprobe --help
modprobe: unrecognized option `--help'
Usage: modprobe [-v] [-V] [-C config-file] [-n] [-i] [-q] [-b] [-o <modname>] <modname> [parameters...]
modprobe -r [-n] [-i] [-v] <modulename> ...
modprobe -l -t <dirname> [ -a <modulename> ...]
#modprobe -r ehci_hcd
Sep 6 03:32:05 2hei.net kernel: usb 1-5.1: reset low speed USB device using ehci_hcd and address 4
Sep 6 03:33:44 2hei.net kernel: ehci_hcd 0000:00:1d.7: remove, state 1
Sep 6 03:33:44 2hei.net kernel: usb usb1: USB disconnect, address 1
Sep 6 03:33:44 2hei.net kernel: usb 1-5: USB disconnect, address 3
Sep 6 03:33:44 2hei.net kernel: usb 1-5.1: USB disconnect, address 4
Sep 6 03:33:44 2hei.net kernel: ehci_hcd 0000:00:1d.7: USB bus 1 deregistered
Sep 6 03:33:44 2hei.net kernel: ACPI: PCI interrupt for device 0000:00:1d.7 disabled
Sep 6 03:33:44 2hei.net kernel: usb 4-1: new full speed USB device using uhci_hcd and address 2
Sep 6 03:33:44 2hei.net kernel: usb 4-1: configuration #1 chosen from 1 choice
Sep 6 03:33:44 2hei.net kernel: hub 4-1:1.0: USB hub found
Sep 6 03:33:44 2hei.net kernel: hub 4-1:1.0: 3 ports detected
Sep 6 03:33:44 2hei.net kernel: usb 4-1.1: new full speed USB device using uhci_hcd and address 3
Sep 6 03:33:44 2hei.net kernel: usb 4-1.1: configuration #1 chosen from 1 choice
Sep 6 03:33:44 2hei.net kernel: input: American Megatrends Inc. Virtual Keyboard and Mouse as /class/input/input4
Sep 6 03:33:44 2hei.net kernel: input: USB HID v1.10 Keyboard [American Megatrends Inc. Virtual Keyboard and Mouse] on usb-0000:00:1d.2-1.1
Sep 6 03:33:44 2hei.net kernel: input: American Megatrends Inc. Virtual Keyboard and Mouse as /class/input/input5
Sep 6 03:33:44 2hei.net kernel: input: USB HID v1.10 Mouse [American Megatrends Inc. Virtual Keyboard and Mouse] on usb-0000:00:1d.2-1.1
For files in /tmp directory, linux has cron at /etc/cron.daily to deal with:
[2hei.net cron.daily]$ cat tmpwatch
flags=-umc
/usr/sbin/tmpwatch "$flags" -x /tmp/.X11-unix -x /tmp/.XIM-unix \
-x /tmp/.font-unix -x /tmp/.ICE-unix -x /tmp/.Test-unix 240 /tmp
/usr/sbin/tmpwatch "$flags" 720 /var/tmp
for d in /var/{cache/man,catman}/{cat?,X11R6/cat?,local/cat?}; do
if [ -d "$d" ]; then
/usr/sbin/tmpwatch "$flags" -f 720 "$d"
fi
done
Linux will keep 10 days files in /tmp and 30 days in /var/tmp by default.
[2hei.net cron.daily]$ man tmpwatch
NAME
tmpwatch - removes files which haven?. been accessed for a period of time
SYNOPSIS
tmpwatch [-u|-m|-c] [-MUadfqstvx] [--verbose] [--force] [--all]
[--nodirs] [--nosymlinks] [--test] [--fuser] [--quiet]
[--atime|--mtime|--ctime] [--dirmtime] [--exclude <path>]
[--exclude-user <user>] <hours> <dirs>
OPTIONS
-u, --atime
Make the decision about deleting a file based on the file?. atime (access time). This is the default.
Note that the periodic updatedb file system scans keep the atime of directories recent.
-m, --mtime
Make the decision about deleting a file based on the file?. mtime (modification time) instead of the atime.
-c, --ctime
Make the decision about deleting a file based on the file?. ctime (inode change time) instead of the atime;
for directories, make the decision based on the mtime.
-M, --dirmtime
Make the decision about deleting a directory based on the directory?. mtime (modification time) instead of
the atime; completely ignore atime for directories.
-a, --all
Remove all file types, not just regular files, symbolic links and directories.
-d, --nodirs
Do not attempt to remove directories, even if they are empty.
-d, --nosymlinks
Do not attempt to remove symbolic links.
-f, --force
Remove files even if root doesn?. have write access (akin to rm -f).
-q, --quiet
Report only fatal errors.
-s, --fuser
Attempt to use the "fuser" command to see if a file is already open before removing it. Not enabled by
default. Does help in some circumstances, but not all. Dependent on fuser being installed in /sbin. Not
supported on HP-UX or Solaris.
-t, --test
Don?. remove files, but go through the motions of removing them. This implies -v.
-U, --exclude-user=user
Don?. remove files owned by user, which can be an user name or numeric user ID.
-v, --verbose
Print a verbose display. Two levels of verboseness are available -- use this option twice to get the most
verbose output.
-x, --exclude=path
Skip path; if path is a directory, all files contained in it are skipped too. If path does not exist, it
must be an absolute path that contains no symbolic links.
[2hei.net cron.daily]$ cat tmpwatch
flags=-umc
/usr/sbin/tmpwatch "$flags" -x /tmp/.X11-unix -x /tmp/.XIM-unix \
-x /tmp/.font-unix -x /tmp/.ICE-unix -x /tmp/.Test-unix 240 /tmp
/usr/sbin/tmpwatch "$flags" 720 /var/tmp
for d in /var/{cache/man,catman}/{cat?,X11R6/cat?,local/cat?}; do
if [ -d "$d" ]; then
/usr/sbin/tmpwatch "$flags" -f 720 "$d"
fi
done
Linux will keep 10 days files in /tmp and 30 days in /var/tmp by default.
[2hei.net cron.daily]$ man tmpwatch
NAME
tmpwatch - removes files which haven?. been accessed for a period of time
SYNOPSIS
tmpwatch [-u|-m|-c] [-MUadfqstvx] [--verbose] [--force] [--all]
[--nodirs] [--nosymlinks] [--test] [--fuser] [--quiet]
[--atime|--mtime|--ctime] [--dirmtime] [--exclude <path>]
[--exclude-user <user>] <hours> <dirs>
OPTIONS
-u, --atime
Make the decision about deleting a file based on the file?. atime (access time). This is the default.
Note that the periodic updatedb file system scans keep the atime of directories recent.
-m, --mtime
Make the decision about deleting a file based on the file?. mtime (modification time) instead of the atime.
-c, --ctime
Make the decision about deleting a file based on the file?. ctime (inode change time) instead of the atime;
for directories, make the decision based on the mtime.
-M, --dirmtime
Make the decision about deleting a directory based on the directory?. mtime (modification time) instead of
the atime; completely ignore atime for directories.
-a, --all
Remove all file types, not just regular files, symbolic links and directories.
-d, --nodirs
Do not attempt to remove directories, even if they are empty.
-d, --nosymlinks
Do not attempt to remove symbolic links.
-f, --force
Remove files even if root doesn?. have write access (akin to rm -f).
-q, --quiet
Report only fatal errors.
-s, --fuser
Attempt to use the "fuser" command to see if a file is already open before removing it. Not enabled by
default. Does help in some circumstances, but not all. Dependent on fuser being installed in /sbin. Not
supported on HP-UX or Solaris.
-t, --test
Don?. remove files, but go through the motions of removing them. This implies -v.
-U, --exclude-user=user
Don?. remove files owned by user, which can be an user name or numeric user ID.
-v, --verbose
Print a verbose display. Two levels of verboseness are available -- use this option twice to get the most
verbose output.
-x, --exclude=path
Skip path; if path is a directory, all files contained in it are skipped too. If path does not exist, it
must be an absolute path that contains no symbolic links.
/usr/sbin/smartctl --all /dev/sda -d ata
smartctl version 5.38 [x86_64-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
Smartctl: Device Read Identity Failed (not an ATA/ATAPI device)
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
#my ENV:
[2hei.net ~]$ uname -a
Linux 2.6.18-194.26.1.el5 #1 SMP Tue Nov 9 12:54:20 EST 2010 x86_64 x86_64 x86_64 GNU/Linux
[2hei.net ~]$ cat /etc/redhat-release
CentOS release 5.5 (Final)
[2hei.net ~]# rpm -qa|grep smart
smartmontools-5.38-2.el5
[2hei.net ~]# rpm -qf /usr/sbin/smartctl
smartmontools-5.38-2.el5
Looks Sata discs are not accessed via the '-d ata' option
#smartctl --help
-d TYPE, --device=TYPE
Specify device type to one of: ata, scsi, marvell, sat, 3ware,N
#get rid of -d ata
[2hei.net ~]# /usr/sbin/smartctl --all /dev/sda
smartctl version 5.38 [x86_64-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF INFORMATION SECTION ===
Device Model: WDC WD1002FBYS-02A6B0
Serial Number: WD-WMATV6555969
Firmware Version: 03.00C06
User Capacity: 1,000,204,886,016 bytes
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: 8
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Wed Jul 6 03:32:03 2011 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x84) Offline data collection activity
was suspended by an interrupting command from host.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: (18600) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 214) minutes.
Conveyance self-test routine
recommended polling time: ( 5) minutes.
SCT capabilities: (0x303f) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0
3 Spin_Up_Time 0x0027 253 253 021 Pre-fail Always - 1100
4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 28
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0
7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always - 0
9 Power_On_Hours 0x0032 089 089 000 Old_age Always - 8195
10 Spin_Retry_Count 0x0032 100 253 000 Old_age Always - 0
11 Calibration_Retry_Count 0x0032 100 253 000 Old_age Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 26
192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 25
193 Load_Cycle_Count 0x0032 200 200 000 Old_age Always - 2
194 Temperature_Celsius 0x0022 116 112 000 Old_age Always - 34
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0030 200 200 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
200 Multi_Zone_Error_Rate 0x0008 200 200 000 Old_age Offline - 0
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Extended offline Completed without error 00% 8195 -
# 2 Short offline Completed without error 00% 8189 -
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
also some said libata patch is needed!
smartctl version 5.38 [x86_64-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
Smartctl: Device Read Identity Failed (not an ATA/ATAPI device)
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
#my ENV:
[2hei.net ~]$ uname -a
Linux 2.6.18-194.26.1.el5 #1 SMP Tue Nov 9 12:54:20 EST 2010 x86_64 x86_64 x86_64 GNU/Linux
[2hei.net ~]$ cat /etc/redhat-release
CentOS release 5.5 (Final)
[2hei.net ~]# rpm -qa|grep smart
smartmontools-5.38-2.el5
[2hei.net ~]# rpm -qf /usr/sbin/smartctl
smartmontools-5.38-2.el5
Looks Sata discs are not accessed via the '-d ata' option
#smartctl --help
-d TYPE, --device=TYPE
Specify device type to one of: ata, scsi, marvell, sat, 3ware,N
#get rid of -d ata
[2hei.net ~]# /usr/sbin/smartctl --all /dev/sda
smartctl version 5.38 [x86_64-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF INFORMATION SECTION ===
Device Model: WDC WD1002FBYS-02A6B0
Serial Number: WD-WMATV6555969
Firmware Version: 03.00C06
User Capacity: 1,000,204,886,016 bytes
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: 8
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Wed Jul 6 03:32:03 2011 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x84) Offline data collection activity
was suspended by an interrupting command from host.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: (18600) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 214) minutes.
Conveyance self-test routine
recommended polling time: ( 5) minutes.
SCT capabilities: (0x303f) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0
3 Spin_Up_Time 0x0027 253 253 021 Pre-fail Always - 1100
4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 28
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0
7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always - 0
9 Power_On_Hours 0x0032 089 089 000 Old_age Always - 8195
10 Spin_Retry_Count 0x0032 100 253 000 Old_age Always - 0
11 Calibration_Retry_Count 0x0032 100 253 000 Old_age Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 26
192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 25
193 Load_Cycle_Count 0x0032 200 200 000 Old_age Always - 2
194 Temperature_Celsius 0x0022 116 112 000 Old_age Always - 34
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0030 200 200 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
200 Multi_Zone_Error_Rate 0x0008 200 200 000 Old_age Offline - 0
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Extended offline Completed without error 00% 8195 -
# 2 Short offline Completed without error 00% 8189 -
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
also some said libata patch is needed!
ATA bus error in /var/log/messages:
SCSI device sdb: 490350672 512-byte hdwr sectors (251060 MB)
sdb: Write Protect is off
sdb: Mode Sense: 00 3a 00 00
SCSI device sdb: drive cache: write back
ata1.00: exception Emask 0x10 SAct 0x0 SErr 0x4010000 action 0xe frozen
ata1.00: irq_stat 0x00400040, connection status changed
ata1: SError: { PHYRdyChg DevExch }
ata1.00: cmd ea/00:00:00:00:00/00:00:00:00:00/a0 tag 0
res 40/00:c4:d1:67:e4/00:00:03:00:00/40 Emask 0x10 (ATA bus error)
ata1.00: status: { DRDY }
ata1: hard resetting link
ata1: link is slow to respond, please be patient (ready=0)
ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata1.00: configured for UDMA/133
ata1: EH complete
SCSI device sda: 490350672 512-byte hdwr sectors (251060 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: drive cache: write back
md: syncing RAID array md0
md: minimum _guaranteed_ reconstruction speed: 1000 KB/sec/disc.
md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for reconstruction.
md: using 128k window, over a total of 104320 blocks.
md: delaying resync of md1 until md0 has finished resync (they share one or more physical units)
md: md0: sync done.
md: syncing RAID array md1
RAID1 conf printout:
md: minimum _guaranteed_ reconstruction speed: 1000 KB/sec/disc.
md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for reconstruction.
md: using 128k window, over a total of 8385856 blocks.
--- wd:2 rd:2
disk 0, wo:0, o:1, dev:sda1
disk 1, wo:0, o:1, dev:sdb1
md: md1: sync done.
RAID1 conf printout:
--- wd:2 rd:2
disk 0, wo:0, o:1, dev:sda2
disk 1, wo:0, o:1, dev:sdb2
cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sdb1[1] sda1[0]
104320 blocks [2/2] [UU]
md1 : active raid1 sdb2[1] sda2[0]
8385856 blocks [2/2] [UU]
md2 : active raid1 sdb3[1] sda3[0]
236677504 blocks [2/2] [UU]
smartctl -a /dev/sdb
smartctl version 5.38 [x86_64-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF INFORMATION SECTION ===
Device Model: WDC WD2502ABYS-01B7A0
Serial Number: WD-WCAT1C148773
Firmware Version: 02.03B02
User Capacity: 251,059,544,064 bytes
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: 8
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Mon Jun 20 03:23:22 2011 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x84) Offline data collection activity
was suspended by an interrupting command from host.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: (4800) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 59) minutes.
Conveyance self-test routine
recommended polling time: ( 5) minutes.
SCT capabilities: (0x303f) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0
3 Spin_Up_Time 0x0027 200 195 021 Pre-fail Always - 1000
4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 36
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0
7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always - 0
9 Power_On_Hours 0x0032 078 078 000 Old_age Always - 16351
10 Spin_Retry_Count 0x0032 100 253 000 Old_age Always - 0
11 Calibration_Retry_Count 0x0032 100 253 000 Old_age Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 33
192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 30
193 Load_Cycle_Count 0x0032 200 200 000 Old_age Always - 36
194 Temperature_Celsius 0x0022 112 099 000 Old_age Always - 31
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0030 200 200 000 Old_age Offline - 1
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
200 Multi_Zone_Error_Rate 0x0008 200 200 000 Old_age Offline - 1
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Extended offline Completed without error 00% 51 -
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
Poor quality SATA cables possibly,may need change SATA cables.
ref link:
https://ata.wiki.kernel.org/index.php/Libata_error_messages
例子:使用两个参数匹配域名,其他部分自动补齐,减少键盘输入,然后ssh登陆到目的主机。
cat .bashrc
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# update the PATH
export PATH=${PATH}:/usr/sbin:/sbin
sss() {
ssh $1.$2.2hei.net
}
use:
$sss test blog
The authenticity of host 'test.blog.2hei.net (192.168.1.12)' can't be established.
RSA key fingerprint is 00:45:c8:28:29:cd:a6:50:26:a6:5d:23:a4:fb:10:9a.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'test.blog.2hei.net,192.168.1.12' (RSA) to the list of known hosts.
2hei@test.blog.2hei.net's password:
Last login: Thu Jun 9 06:12:21 2011 from 192.168.1.11
Kickstart-installed Red Hat Linux Wed Sep 15 22:25:51 UTC 2010
$
1. yum install openvpn
wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
yum install epel-release-5-4.noarch.rpm
yum intall openvpn
vnp configs: 2hei.net.ovpn
add:
--script-security 2
up "/etc/openvpn/update-resolv-conf up"
down "/etc/openvpn/update-resolv-conf down"
script: update-resolv-conf
#!/bin/bash
case "$1" in
up)
mv /etc/resolv.conf /etc/resolv.conf.openvpn
echo "# Generated by OpenVPN Client UP Script" > /etc/resolv.conf
echo "search 2hei.net" > /etc/resolv.conf
for opt in ${!foreign_option_*};
do
#echo ${!opt} | sed -e 's/dhcp-option DOMAIN/domain/g' -e 's/dhcp-option DNS/nameserver/g' >> /etc/resolv.conf
echo ${!opt} | sed -e 's/dhcp-option DNS/nameserver/g' >> /etc/resolv.conf
done
#add orig nameserver
grep nameserver /etc/resolv.conf.openvpn >> /etc/resolv.conf
;;
down)
mv /etc/resolv.conf.openvpn /etc/resolv.conf
;;
*)
echo "Pass either UP or DOWN"
;;
esac
cat start_client_dc1.sh
#!/bin/sh
/usr/sbin/openvpn /etc/openvpn/2hei.net.ovpn
2. update firefox on centos
down load new version of firfox
ln -s /usr/local/firefox/firefox /usr/bin
3. use java web start on firefox
download new version of jre
sh ./jre-6u25-linux-x64-rpm.bin
alternatives --install /usr/bin/java java /usr/java/jre1.6.0_25/bin/java 2
alternatives --config java # pick 1 or 2 or 3
java -version
cd /usr/lib/mozilla/plugins
ln -s /usr/java/jre1.6.0_25/lib/amd64/libnpjp2.so
4. vnc
[2hei.net# .vnc]$ cat xstartup
#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
gnome-session &
start vncserver
vncserver
####### bond0 #######
dond0 use dhcp
$cat ifcfg-bond0
DEVICE=bond0
BOOTPROTO=dhcp
ONBOOT=yes
$cat ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes
####### bond1 #######
$cat ifcfg-bond1
DEVICE=bond1
BOOTPROTO=none
ONBOOT=yes
IPADDR=192.168.56.101
NETMASK=255.255.255.0
BONDING_OPTS="mode=1 miimon=80 arp_interval=500 arp_ip_target=192.168.56.1"
$cat ifcfg-eth2
DEVICE=eth2
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond1
SLAVE=yes
$cat ifcfg-eth3
DEVICE=eth3
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond1
SLAVE=yes
#######################3
cat /etc/modprobe.conf
add:
alias bond1 bonding
options bond1 miimon=80 mode=1
$modprobe bonding
$sudo /sbin/service network restart
$cat /proc/net/bonding/bond0
$cat /proc/net/bonding/bond1
[root@2hei.net ~]# ifconfig
bond0 Link encap:Ethernet HWaddr 08:00:27:88:8C:E3
inet addr:10.100.10.110 Bcast:10.100.10.255 Mask:255.255.254.0
inet6 addr: fe80::a00:27ff:fe88:8ce3/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:50626 errors:0 dropped:0 overruns:0 frame:0
TX packets:2674 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4491313 (4.2 MiB) TX bytes:425663 (415.6 KiB)
bond1 Link encap:Ethernet HWaddr 08:00:27:6F:EE:83
inet addr:192.168.56.101 Bcast:192.168.56.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe6f:ee83/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:1980 errors:0 dropped:0 overruns:0 frame:0
TX packets:2064 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:124007 (121.1 KiB) TX bytes:111090 (108.4 KiB)
eth0 Link encap:Ethernet HWaddr 08:00:27:88:8C:E3
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:26130 errors:0 dropped:0 overruns:0 frame:0
TX packets:2405 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2316248 (2.2 MiB) TX bytes:386534 (377.4 KiB)
eth1 Link encap:Ethernet HWaddr 08:00:27:88:8C:E3
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:24505 errors:0 dropped:0 overruns:0 frame:0
TX packets:289 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2175605 (2.0 MiB) TX bytes:42289 (41.2 KiB)
eth2 Link encap:Ethernet HWaddr 08:00:27:6F:EE:83
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:1980 errors:0 dropped:0 overruns:0 frame:0
TX packets:2032 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:124007 (121.1 KiB) TX bytes:105295 (102.8 KiB)
eth3 Link encap:Ethernet HWaddr 08:00:27:6F:EE:83
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:5795 (5.6 KiB)
[root@2hei.net ~]# mii-tool
eth0: no autonegotiation, 100baseTx-FD, link ok
eth1: no autonegotiation, 100baseTx-FD, link ok
eth2: no autonegotiation, 100baseTx-FD, link ok
eth3: no autonegotiation, 100baseTx-FD, link ok
[root@2hei.net ~]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.4.0 (October 7, 2008)
Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth0
MII Status: up
Link Failure Count: 0
Permanent HW addr: 08:00:27:88:8c:e3
Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 08:00:27:2d:3d:56
[root@2hei.net ~]# cat /proc/net/bonding/bond1
Ethernet Channel Bonding Driver: v3.4.0 (October 7, 2008)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth2
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0
ARP Polling Interval (ms): 500
ARP IP target/s (n.n.n.n form): 192.168.56.1
Slave Interface: eth2
MII Status: up
Link Failure Count: 0
Permanent HW addr: 08:00:27:6f:ee:83
Slave Interface: eth3
MII Status: down
Link Failure Count: 1
Permanent HW addr: 08:00:27:9c:5a:b8
dond0 use dhcp
$cat ifcfg-bond0
DEVICE=bond0
BOOTPROTO=dhcp
ONBOOT=yes
$cat ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes
####### bond1 #######
$cat ifcfg-bond1
DEVICE=bond1
BOOTPROTO=none
ONBOOT=yes
IPADDR=192.168.56.101
NETMASK=255.255.255.0
BONDING_OPTS="mode=1 miimon=80 arp_interval=500 arp_ip_target=192.168.56.1"
$cat ifcfg-eth2
DEVICE=eth2
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond1
SLAVE=yes
$cat ifcfg-eth3
DEVICE=eth3
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond1
SLAVE=yes
#######################3
cat /etc/modprobe.conf
add:
alias bond1 bonding
options bond1 miimon=80 mode=1
$modprobe bonding
$sudo /sbin/service network restart
$cat /proc/net/bonding/bond0
$cat /proc/net/bonding/bond1
[root@2hei.net ~]# ifconfig
bond0 Link encap:Ethernet HWaddr 08:00:27:88:8C:E3
inet addr:10.100.10.110 Bcast:10.100.10.255 Mask:255.255.254.0
inet6 addr: fe80::a00:27ff:fe88:8ce3/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:50626 errors:0 dropped:0 overruns:0 frame:0
TX packets:2674 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4491313 (4.2 MiB) TX bytes:425663 (415.6 KiB)
bond1 Link encap:Ethernet HWaddr 08:00:27:6F:EE:83
inet addr:192.168.56.101 Bcast:192.168.56.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe6f:ee83/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:1980 errors:0 dropped:0 overruns:0 frame:0
TX packets:2064 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:124007 (121.1 KiB) TX bytes:111090 (108.4 KiB)
eth0 Link encap:Ethernet HWaddr 08:00:27:88:8C:E3
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:26130 errors:0 dropped:0 overruns:0 frame:0
TX packets:2405 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2316248 (2.2 MiB) TX bytes:386534 (377.4 KiB)
eth1 Link encap:Ethernet HWaddr 08:00:27:88:8C:E3
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:24505 errors:0 dropped:0 overruns:0 frame:0
TX packets:289 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2175605 (2.0 MiB) TX bytes:42289 (41.2 KiB)
eth2 Link encap:Ethernet HWaddr 08:00:27:6F:EE:83
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:1980 errors:0 dropped:0 overruns:0 frame:0
TX packets:2032 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:124007 (121.1 KiB) TX bytes:105295 (102.8 KiB)
eth3 Link encap:Ethernet HWaddr 08:00:27:6F:EE:83
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:5795 (5.6 KiB)
[root@2hei.net ~]# mii-tool
eth0: no autonegotiation, 100baseTx-FD, link ok
eth1: no autonegotiation, 100baseTx-FD, link ok
eth2: no autonegotiation, 100baseTx-FD, link ok
eth3: no autonegotiation, 100baseTx-FD, link ok
[root@2hei.net ~]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.4.0 (October 7, 2008)
Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth0
MII Status: up
Link Failure Count: 0
Permanent HW addr: 08:00:27:88:8c:e3
Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 08:00:27:2d:3d:56
[root@2hei.net ~]# cat /proc/net/bonding/bond1
Ethernet Channel Bonding Driver: v3.4.0 (October 7, 2008)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth2
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0
ARP Polling Interval (ms): 500
ARP IP target/s (n.n.n.n form): 192.168.56.1
Slave Interface: eth2
MII Status: up
Link Failure Count: 0
Permanent HW addr: 08:00:27:6f:ee:83
Slave Interface: eth3
MII Status: down
Link Failure Count: 1
Permanent HW addr: 08:00:27:9c:5a:b8
cat /proc/swaps
free -m
dd if=/dev/zero of=swapfile bs=1M count=8192
swapoff -a
mkswap swapfile
swapon swapfile
cat /etc/fstab
/usr/swapfile swap swap defaults 0 0
we have two ways:
1. finding netcard driver by syslog
grep -i 'driver' /var/log/messages
or
dmesg | grep -i driver
2.lsmod
#try to find netcard type.
[root@2hei.net]# modinfo e1000
filename: /lib/modules/2.6.9-34.ELsmp/kernel/drivers/net/e1000/e1000.ko
parm: debug:Debug level (0=none,...,16=all)
version: 6.1.16-k3-NAPI 4BCC06D27AAC4C711223CC9
license: GPL
description: Intel(R) PRO/1000 Network Driver
author: Intel Corporation, <linux.nics@intel.com>
[root@2hei.net]# modinfo igb
filename: /lib/modules/2.6.18-164.11.1.el5/kernel/drivers/net/igb/igb.ko
version: 1.3.16-k2
license: GPL
description: Intel(R) Gigabit Ethernet Network Driver
author: Intel Corporation, <e1000-devel@lists.sourceforge.net>
srcversion: 78555F0A019E05BADBD95AA
[root@2hei.net]# modinfo bonding
filename: /lib/modules/2.6.18-164.11.1.el5/kernel/drivers/net/bonding/bonding.ko
author: Thomas Davis, tadavis@lbl.gov and many others
description: Ethernet Channel Bonding Driver, v3.4.0
version: 3.4.0
license: GPL
srcversion: 7989A7EEF2EE7B5D78C0E79
depends: ipv6
vermagic: 2.6.18-164.11.1.el5 SMP mod_unload gcc-4.1
1. finding netcard driver by syslog
grep -i 'driver' /var/log/messages
or
dmesg | grep -i driver
2.lsmod
#try to find netcard type.
[root@2hei.net]# modinfo e1000
filename: /lib/modules/2.6.9-34.ELsmp/kernel/drivers/net/e1000/e1000.ko
parm: debug:Debug level (0=none,...,16=all)
version: 6.1.16-k3-NAPI 4BCC06D27AAC4C711223CC9
license: GPL
description: Intel(R) PRO/1000 Network Driver
author: Intel Corporation, <linux.nics@intel.com>
[root@2hei.net]# modinfo igb
filename: /lib/modules/2.6.18-164.11.1.el5/kernel/drivers/net/igb/igb.ko
version: 1.3.16-k2
license: GPL
description: Intel(R) Gigabit Ethernet Network Driver
author: Intel Corporation, <e1000-devel@lists.sourceforge.net>
srcversion: 78555F0A019E05BADBD95AA
[root@2hei.net]# modinfo bonding
filename: /lib/modules/2.6.18-164.11.1.el5/kernel/drivers/net/bonding/bonding.ko
author: Thomas Davis, tadavis@lbl.gov and many others
description: Ethernet Channel Bonding Driver, v3.4.0
version: 3.4.0
license: GPL
srcversion: 7989A7EEF2EE7B5D78C0E79
depends: ipv6
vermagic: 2.6.18-164.11.1.el5 SMP mod_unload gcc-4.1




