dropdown menu

System - Kernel

The AIX Kernel is the heart (central core) of the operating system. It has complete control over everything that occurs in the system. A kernel can be contrasted with a shell (ksh, bash, csh) which is the outermost part of the operating system and the shell interacts with users via commands. The kernel does not interact directly with the user. It interacts with the shell, with other programs and with the hardware devices (CPU, memory, disk drives..)

The kernel is the first part of the operating system which is loaded during startup (booting) and it remains there continuouly because its services are required all the time. Because of its critical nature, the kernel code is loaded into a protected are of the memory, which prevents it from being overwritten by other programs. The kernel performs its tasks (for exapmle handling interrupts, executiong processes) in kernel space. A normal user performs its tasks (for example writing text...) in user space. This separation is made in order to prevent user data and kernel data from interfering ith each other. (When a computer crashed it actually means the kernel has crashed. If only a single user program has crashed, then the kernel itself has not crashed.)

The kernel provides basic services for all other parts of the operating system: memory/process/IO - management (for example accessing peripheral devices). These services are requested by other parts of the oprating system or by application programs through a specified set of program interfaces referred to as system calls.

The AIX kernel device is the sys0. Some operating system settings can be viewed by lsattr -El sys0 and changed by chdev -ls sys0 ... (smitty chgsys)

who -b                 info about the last boot
slibclean              Removes any currently unused modules in kernel and library memory

uname -a               shows the OS of the machine
uname -M               shows the machine model
uname -n               displays the hostname
uname -m               shows the cpuid
uname -L               shows LPAR ID and LPAR name

bootinfo -K            the running kernel 32-bit or 64-bit
bootinfo -y            shows if the machine (hardware) 32 or 64 bit
bootinfo -p            displays the hardware platform (chrp is necessary from 5.2, chrp: powerpc specification that can run multiple OSes)
bootinfo -a            ?same as bootinfo -p, just with numbers (3: CHRP)
bootinfo -b            reports last device system booted from
bootinfo -B <disk>     shows if the device is capable for booting (1:yes, 0:no))   
bootinfo -s <disk>     disk size in MB           
bootinfo -t            specifyes the type of boot (1:DISK 3:CD-ROM 4:TAPE 5:NETWORK)
bootinfo -z            shows if the machine multiprocessor capable (0: not MP capable 1:MP capable)
bootinfo -v            shows boot logical volume name, from which the system booted
bootinfo -r            shows system installed memory size

ls -l /unix            uniprocessor or multiprocessor kernel:
                       /unix -> /usr/lib/boot/unix_up         # 32 bit uniprocessor kernel
                       /unix -> /usr/lib/boot/unix_mp         # 32 bit multiprocessor kernel
                       /unix -> /usr/lib/boot/unix_64         # 64 bit multiprocessor kernel

lsmcode                shows firmware level (permanent level: aka the backup level, temporary level: aka the installed level)
lsmcode -c             shows system firmware level (same as above)
lsmcode -A             shows firmware level of all supported device (or lscfg -vp | grep -p "ROM")

prtconf                general info
lparstat               reports logical partition ( LPAR ) related information and statistics

lsvpd|grep 'AC PS'     shows the Power Supplies of a system

genkex                 lists kernel extensions currently loaded onto the system
genld -l               obtain the list of loaded objects for each running process

------------------------
Switch from 32 bit mode to 64 (and back):
ln  -sf  /usr/lib/boot/unix_64  /unix
ln  -sf  /usr/lib/boot/unix_64  /usr/lib/boot/unix
bosboot  -ak  /usr/lib/boot/unix_64
shutdown  -Fr

The  kernel  mode  of  your  AIX  host  system  is  switched  to  64-bit  mode  after  the system  restarts.

If  your  host  system  is  currently  running  in  64-bit  mode,  you  can  switch  it  to  32-bit mode  by  typing  the  following  commands  in  the  given  order:
ln  -sf  /usr/lib/boot/unix_mp  /unix
ln  -sf  /usr/lib/boot/unix_mp  /usr/lib/boot/unix
bosboot  -ak  /usr/lib/boot/unix_mp
shutdown  -Fr

------------------------

5 comments:

  1. Up to which AIX OS level we have the possibility of using both 32 & 64 bit kernels?

    ReplyDelete
  2. Hello,
    Can you please let me know, how can i know, which user has rebooted or shutdown the server.
    eg:
    If a oracle user has given root access as sudo..
    how can we know who exactly given the shutdown command

    ReplyDelete
    Replies
    1. Oracle 10g and 11gR1 run a process called oprocd. The idea of OPROCD is quite straightforward. It’s goal is to provide I/O fencing. Basically oprocd works by setting a timer, then sleeping. If, when it wakes up again and gets scheduled onto cpu, it sees that a longer time has passed than the acceptable margin, oprocd will decide to reboot the node.

      Delete
  3. Hi admin,
    Can you please provide the solution of above question, that would be helpful please.

    ReplyDelete