AIX Tips

AIX Tips

 

You can use the prtconf command to list your AIX hardware configuration. including CPU's, memory, adapters, disk and network. The prtconf command is available the current version of AIX 4.3.3**, and on AIX 5. For those running older versions of AIX, here's a list of commands that provide the same information.

  

General

prtconf -  list system configuration

lscfg [-v] - devices (-v = verbose for microcode levels, etc)

lscfg -v  - devices verbose (microcode level, firmware, etc)

lsdev -Cc adapter - adapter cards

lsdev -Cc disk - disks

lsdev -Cc processor     - CPU's

lsattr -El sys0 - serial number, model number, memory

 

Software

List server software inventory: lslpp -L 
List server software history: lslpp –h
List all hardware attached to the server: lsdev –C | sort –d
 

AIX

oslevel - AIX OS level

instfix -i |grep ML              - AIX maintenance level

lslpp -l                              - installed SW and levels

List all system resources on the server: lssrc –a 

List all host entries on the servers: hostent -S
 

Logs

alog -L # List the defined log types
alog -o -t boot # View the boot log
alog -o -f '/var/adm/ras/bootlog'
alog -o -t console # View the console log
strings /var/adm/sulog #View su activity
Examine the AIX failed logins: who –s /etc/security/failedlogin
Examine the AIX user log: who /var/adm/wtmp
who /var/adm/wtmp
 

Disk

lsvg -o - active volume groups

lsvg -p vgname - disk drives in VG

lsvg -l  vgname - LV's in VG

lslv  lvname - LV detail

lslv -l lvname - LV disk location

lspv - disks

lspv -l hdisk# - LV's residing on a disk

Determine active logical volume groups on the servers: lsvg -o
List physical volumes in each volume group: lsvg –p “vgname”
List logical volumes for each volume group: lsvg –l “vgname”
lspv hdiskx
lspv –p hdiskx
lspv –l hdiskx
 

Network

lsdev -Cc if -List network interfaces

netstat -rn -List network gateways
Display active connection on boot: odmget -q value=up CuAt | grep name|cut -c10-12
Show network interfaces that are connected: lsdev –Cc if

 

 

 

Services

stopsrc -s sshd  # replace sshd with servicename you want to stop or start

startsrc -s sshd
stopsrc -s yppasswdd
stopsrc -s ypupdated
stopsrc -s ypserv
stopsrc -s ypbind

List inetd services: lssrc –t ‘service name’ –p ‘process id’ 

mount -a  # to mount all the entries in /etc/filesystems

 

List all user attributes:  lsuser ALL | sort –d 

List all group attributes:  lsgroup ALL

Search for .rhosts and .netrc files: find / -name .rhosts  -print ; find / -name .netrc –print

Display active connection on boot: odmget -q value=up CuAt | grep name|cut -c10-12

/etc/security/user

/etc/security/login.cfg

/etc/sudoers  #visudo

/etc/security/limits

/etc/security/user 

/etc/motd  

/etc/rc.net

/etc/inetd.conf

/etc/inittab 

/etc/rc.tcpip

 

pwdck –n ALL  #use -y instead to fix inconsistencies

grpck –n ALL

Review all SETUID programs: find / -perm -1000 –print

Review all SETGID programs: find / -perm -2000 –print

Review all sticky bit programs: find / -perm -3000 –print

Set user .profile in /etc/security/.profile

$HOME directories should be 710

Look for un-owned files on the server: find / -nouser –print

Change /etc/host file permissions to 660 and review its contents weekly

Check for both tcp/udp failed connections to the servers: netstat –p tcp; netstat –p udp

Verify contents of /etc/exports

 

 

 

 


No comments: