Linux Scroll

Just another WordPress.com site

Monthly Archives: August 2011

ILOM

Oracle(R) Integrated Lights Out Manager - ILOM

  show /SP/console/history 
  show /SP/logs/event/list 
  show -o table -level all /sys 
  show [FRU] 
  showfaults

-> help

Commands are:
cd
create
delete
dump
exit
help
load
reset
set
show
start
stop
version
Advertisements

ALOM

Sun Integrated Lights Out Manager - ALOM

sc> consolehistory -v       
sc> showlogs -v           
sc> showenvironment       
sc> showfru

sc> help

Available commands
------------------
Power and Reset control commands:
  powercycle [-y] [-f]
  poweroff [-y] [-f]
  poweron [-c] [FRU]
  reset [-y] [-c] [-d] [-f] [-n]

Console commands:
  break [-y] [-c]
  console [-f]
  consolehistory [-b lines|-e lines|-v] [-g lines] [boot|run]

Boot control commands:
  bootmode [normal|reset_nvram|bootscript="string"|config="configname"]
  setkeyswitch [-y] 
  showkeyswitch

Locator LED commands:
  setlocator [on|off]
  showlocator

Status and Fault commands:
  clearasrdb
  clearfault 
  disablecomponent [asr-key]
  enablecomponent [asr-key]
  removefru [-y] 
  setfru -c [data]
  showcomponent [asr-key]
  showenvironment
  showfaults [-v]
  showfru [FRU]
  showlogs [-b lines|-e lines|-v] [-g lines] [-p logtype[r|p]]
  shownetwork [-v]
  showplatform [-v]
  showpower [-v]

ALOM Configuration commands:
  setdate 
  setsc [param] [value]
  setupsc
  showdate
  showhost [version]
  showsc [-v] [param]

ALOM Administrative commands:
  flashupdate  [-v] [-y] [-c]
  help [command]
  logout
  password
  resetsc [-y]
  restartssh [-y]
  setdefaults [-y]
  ssh-keygen [-l|-r] 
  showusers [-g lines]
  useradd 
  userclimode  
  userdel [-y] 
  userpassword 
  userperm  [c][u][a][r][o][s]
  usershow [username]

diskinfo

diskinfo – describe characteristics of a disk device

/usr/sbin/diskinfo [-b|-v]

The diskinfo command displays information about the following characteristics of disk drives:
Vendor name Manufacturer of the drive (SCSI only)
Product ID Product identification number or ASCII name
Type Floppy or SCSI classification for the device
Disk Size of disk specified in bytes
Sector Specified as bytes per sector

# diskinfo -b

-b Return the size of the disk in 1024-byte sectors.

# diskinfo -v

-v Display a verbose summary of all of the information available from the device.

top

# top -H

Cpu(s): 25.6% us, 2.6% sy, 0.0% ni, 71.8% id, 0.0% wa, 0.0% hi, 0.0% si

us - Percentage of CPU time spent in user space.
sy - Percentage of CPU time spent in kernel space.
ni - Percentage of CPU time spent on low priority processes.
id - Percentage of CPU time spent idle.
wa - Percentage of CPU time spent in wait (on disk).
hi - Percentage of CPU time spent handling hardware interrupts.
si - Percentage of CPU time spent handling software interrupts.

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND

PID - The thread ID.
USER - The user ID of the user that started the process.
PR - The priority of the thread.
NI - The "nice" value for the process.
VIRT - The virtual memory (allocated) usage of the process.
RES - The resident memory (committed) usage of the process.
SHR - The shared memory usage of the process.
S - The state of the thread. This can be one of the following:
R - Running
S - Sleeping
D - Uninterpretable sleep
T - Traced
Z - Zombie
%CPU - The percentage of a single CPU usage by the thread.
%MEM - The percentage of the memory used by the process.
TIME+ - The amount of CPU time used by the thread.
COMMAND - The name of the process executable.

ls

List all files by arrange by access time:

# ls -ltra

-t Sorts by time stamp (latest first) instead of by name.
The default is the last modification time. (See -u and -c.)
-r Reverses the order of sort to get reverse alphabetic
or oldest first as appropriate.
-l Lists in long format,
-a Lists all entries, including those that begin with a dot (.),
which are normally not listed.

topas – AIX

topas – Reports selected local and remote system statistics.

To display the five most active processes:

# topas -p5 -n0 -d0 -f0

-p Specifies with the hotprocess parameter the number of hot processes to be monitored.

AIX – errpt

errpt – Generates a report of logged errors.

To display a complete summary report:

# errpt

To display a complete detailed report:

# errpt -a

-a Displays information about errors in the error log file in detailed format.

To display a detailed report of all errors logged for the error identifier E19E094F:

# errpt  -a  -j E19E094F

-j ErrorID

To display a detailed report of all errors logged in the past 24 hours:

# errpt  -a  -s mmddhhmmyy

-s StartDate
(current month, day, hour, minute, and year)-24

To list error-record templates for which logging is turned off for any error-log entries:

# errpt  -t  -F log=0

-F
alert=0
Selects error-record templates with the Alert field set to False.
alert=1
Selects error-record templates with the Alert field set to True.
log=0
Selects error-record templates with the Log field set to False.
log=1
Selects error-record templates with the Log field set to True.
report=0
Selects error-record templates with the Report field set to False.
report=1
Selects error-record templates with the Report field set to True.

To view all entries from the alternate error-log file /var/ad/ras/errlog.alternate:

#errpt  -i /var/adm/ras/errlog.alternate

-i Uses the error log file specified by the File variable. If this flag is not specified, the value from the error log configuration database is used.

To view all hardware entries from the alternate error-log file /var/adm/ras/errlog.alternate:

# errpt  -i /var/adm/ras/errlog.alternate -d H

-d H (hardware), S (software), 0 (errlogger command messages), and U (undetermined)

To display a detailed report of all errors logged for the error label ERRLOG_ON:

# errpt  -a  -J ERRLOG_ON

-J ErrorLabel

To display a detailed report of all errors and group duplicate errors:

# errpt -aD

-D Consolidates duplicate errors.

To display a detailed report of all errors logged for the error labels DISK_ERR1 and DISK_ERR2 during the month of August:

# errpt -a -J DISK_ERR1,DISK_ERR2 -s 0801000004 -e 0831235904

-s StartDate
-e EndDate

ethtool

ethtool – Display or change ethernet card settings.
ethtool will only work against physical ethernet adapters.

# ethtool eth0

Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbag
Wake-on: g
Current message level: 0x00000001 (1)
Link detected: yes

Gathering statistics:

# ethtool -S eth0


NIC statistics:
tx_packets: 182368
rx_packets: 160421
tx_errors: 0
rx_errors: 0
rx_missed: 0
align_errors: 0
tx_single_collisions: 0
tx_multi_collisions: 0
unicast: 216722
broadcast: 28439
multicast: 59472
tx_aborted: 0
tx_underrun: 0

tx = transmitted
rx = received

Blinking eth0 every 10 seconds:

# ethtool -p eth0 10

Testing NIC:

# ethtool -t eth0 [offline|online]

nvram test (online) 0
link test (online) 0

register test (offline) 0
memory test (offline) 0
loopback test (offline) 0
interrupt test (offline) 0

Linux log file

Linux Log file

General log messages:

# tail /var/log/messages 

# less -500 /var/log/messages
# tail -f /var/log/messages

System boot log:

# /var/log/boot

Debugging log messages:

# /var/log/debug

User login and authentication logs:

# /var/log/auth.log

Running services such as squid, ntpd and others log message:

# /var/log/daemon.log

Linux kernel ring buffer log:

# dmesg

# /var/log/dmesg

All binary package log includes package installation:

# /var/log/dpkg.log

User failed login log file:

# /var/log/faillog

Kernel log file

# /var/log/kern.log

Printer log file

# /var/log/lpr.log

All mail server message log files

# /var/log/mail.log

MySQL server log file

# /var/log/mysql.log

All userlevel logs

# /var/log/user.log

X.org log file

# /var/log/xorg.0.log

Apache web server log files

# /var/log/apache2/*

Application crash report / log file:

# /var/log/apport.log  

Manage print job in linux

Manage printer job

PrinterA accepting print job:

# accept printerA

PrinterA reject print job:

# reject -r "Your Message" printerA

Check print queue:

# lpstat -o 

# lpstat -a printerA

PrinterB cancel print job:

# disable -c printerB

Move print job from PrinterC to PrinterA:

# lpmove printerC printerA

Move print job from PrinterC 10-12 to PrinterA:

# lpmove printerC-10 printerC-12 printerA

Print Log:

# tail /var/lp/logs

Print request:

# ls -l /var/spool/lp