Tuesday, August 2, 2011

To restart the Lpar from HMC

Hi Friends,

Here is command to restart the LPAR from HMC.

chsysstate -m -o shutdown -r lpar --immed --restart -n

Before go for shutdown Mandatory logs need take.

1. #df -k
2. #ps -ef|grep -v root (If any process running please stop the process)
3. #ifconfig -a
4. #netstat -nr
5. #lsvg rootvg
6. #bootlist -m normal -ov
7. #lspv
8. #errpt|pg
9. #hastatus -sum (If it is cluster check the server is in online or offline)
10.#vxdisk list
11.#vxprint -hrt
12.#sysdumpdev -l (check for Primary & Secondary is dump device)
13.#oslevel -s
14.#cat /etc/inetd.conf|grep telnet (Enable telnet for safer side)
15.#lssrc -g cluster (stop the local server and do)

Then check the uptime and the users accessing the server. Send a WALL message n do the reboot.

Emergency FIX

Before patching check with this command #lppchk -v ...... If you get any fix to install run this script to, It will help you complete the FIX.

/usr/sbin/emgr -P | egrep -v 'PACKAGE|=' | awk '{print $3}' | while read ff
do
emgr -r -L $ff
done

Friday, March 18, 2011

errpt / errpt daemon

When I tried to check errpt on an AIX 5.2 server, I got the following error.
# errpt
0315-132 The supplied error log is not valid: /var/adm/ras/errlog.
0315-180 logread: UNEXPECTED EOF
0315-171 Unable to process the error log file /var/adm/ras/errlog.

# ls -l /var/adm/ras/errlog
-rw-rw-r-- 1 root system 0 Mar 09 13:40 /var/adm/ras/errlog
Solution:

1. Stop errdaemon

# /usr/lib/errstop
2. Remove /var/adm/ras/errlog
# ls -l /var/adm/ras/errlog
-rw-rw-r-- 1 root system 0 Mar 09 13:40 /var/adm/ras/errlog
# rm /var/adm/ras/errlog
3. Restart errdaemon
# /usr/lib/errdemon
4. Now errpt is normal.
# errpt
IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION
9DBCFDEE 0318135809 T O errdemon ERROR LOGGING TURNED ON