Friday, December 17, 2010

HP-UX Kernel

Kernel files are stored under /stand.

Commands :

1. To display detailed information about a kernel module :
# kcmodule -v autofs

2. To load a module :
# kcmodule autofs=best

3. To unload a module :
# kcmodule autofs=unused

4. To view the values of tunables :
# kctune acctresume

5. To view the values of tunables with description :
# kctune -d acctresume

6. To view the values of tunables with detailed information :
# kctune -v acctresume

7. To change a tunable's value to the default :
# kctune nproc=Default

8. To change the value of a tunable :
 # kctune nproc=3500

9. To view the list of module changes  for next boot :
# kcmodule -D

10. To view the list of tunable changes  for next boot :
# kctune -D

11. To view the list of module and tunable changes  for next boot :
# kconfig -D

12. To view the list of module settings that are set to non-default :
# kcmodule -S

13. To view the list of tunable settings that are set to non-default :
# kctune -S

14. To view the list of module and tunable settings that are set to non-default :
# kconfig -S

15. To unhold all the module and tunable settings being held for next boot :
# kconfig -H











Points to remember :

Different states of kernel modules :
unused         -  This module is not used, but installed in the system.
static            -  This module will be statically bound to the kernel executable
loaded         -  This module will be dynamically bound to the kernel while booting
auto             -  The module will be dynamically loaded into the kernel when it is first needed after each boot.

NFS in HP-UX

There has been a vast difference between HP-UX 11i v3 with the older versions.Prior to v3, HP-UX used NFS concepts (commands and files) a like AIx. From v3, it following Solaris-like environment.

Configuration Files :

/etc/exports                  -  Contains a list of exportable file systems. This file is available in upto HP-UX 11i v2
/etc/dfs/dfstab               - Contains a list of sharable file systems. This file is available from HP-UX 11i v3 
/etc/rc.config.d/nfsconf  - NFS server configuration file contains the nfs, autofs and mountd daemons startup


Command :

1.  To start NFS server daemons :
# /sbin/init.d/nfs.server start

2. To stop NFS server daemons :
# /sbin/init.d/nfs.server stop

3. To start NFS daemons on system boot,
Change the value of NFS_SERVER to "1" in /etc/rc.config.d/nfsconfig file.


For Ex,
NFS_SERVER=1
4. To export or share a file system :
# exportfs /data         <--- Upto HP-UX 11i v2
# share     /data         <--- From HP-UX 11i v3

5. To unexport or unshaer a file system :
# exportfs -u /data         <--- Upto HP-UX 11i v2
# unshare     /data          <--- From HP-UX 11i v3

6. To export or share all the filesystems defined in /etc/exports or /etc/dfs/dfstab :
# exportfs -a         <--- Upto HP-UX 11i v2
# shareall              <--- From HP-UX 11i v3

Network Configuration in HP-UX

Configuration File :
/etc/rc.config.d/netconf        -  Contains the hostname, ip address, default route
/etc/hosts                            -  Contains the hsotname to IP address mapping
/etc/resolv.conf                   -  Contains DNS server details
/etc/inetd.conf                     - Internet daemon configuration file

Configuration Files used for DNS Client:
/etc/nsswitch.compat
/etc/nsswitch.nis
/etc/nsswitch.ldap
/etc/nsswitch.conf
/etc/nsswitch.files
/etc/nsswitch.hp_defaults

Scripts :
/sbin/init.d/net start  - To start network services
/sbin/init.d/net stop  - To stop network services

Commands :

1. To set the hostname :
# set_parms hostname

2. To set primary ip address :
# set_parms ip_address

3.  To set the default gateway, DNS/NIS server details :
# set_parms addl_netwrk

4.  To restart inetd daemon :
# inetd -c

5. To display the ip address configuration details :
# netstat -i

6. To set the IP details of lan0 :
# ifconfig lan0

7. To display all the network adapters :
# lanscan

8. To display routing table :
# netstat -rn

9. To add a route :
# route add default 192.168.1.254 1

10. To enable a network interface :
# ifconfig lan0 up

11. To disable a network interface :
# ifconfig lan0 down

12. To change NIC settings like speed, duplex,..
# lanadmin

Thursday, December 9, 2010

Managing vPars in SuperDome 2

1. To start a vpar from MON> prompt,

MON> vparload -p vPar_name

2. To boot a vpar from command line,

# vparload -p vPar_name

3. To show vpar info from MO> prompt,

MON> vparinfo

4. To show vpar status from command prompt,
# vparstatus

Under Construction.

Managing nPartitions in SuperDome 2

Following commands are to executed by logging (telnet/h) into Onboard Administrator's CLI.

1. To display all the blades and enclosures in a superdome 2 machine,
>  parstatus

2. To display all the nPars,
> parstatus -P

3. To allow an operating system running in a npar to perform partition configuration operations on other partitions,
> parperm npar on 1

4. To create a nPar using blade 1/2 and IO bay 5/1,
> parcreate -P nPar0002 -a blade:1/2:::: -a io:5/1::

5. To create a nPar using blades 1 and 3 from enclosure 1 and IO lot in IOX enclosure 5, bay 1,
> parcreate -p nextPartition -a blade:1/1:::: -a blade:1/3:::: -a io:5/1:

6. To display the details on a specific nPar,
> parstatus –Vp1
or
> parstatus –Vp nPar0001

7. To remove a nPar,
> parremove -p 2
or
> parremove -p nPar0002

8. To rename a nPar,
> parmodify -p1 -PnPar0005

9. To add the blade in enclosure 1, slot 5 to the existing nPartition 1,
> parmodify -p 1 -a blade:1/5:base:y:ri:50%

10. To add I/O bay 2 in enclosure 3 to the existing nPartition3,
> parmodify -p 3 -a io:3/2:

11 To remove the blade in enclosure 1, slot 5 from nPartition 1,
> parmodify -p 1 -d blade:1/5

12. To remove I/O bay 2 in enclosure3 from nPartition3,
> parmodify -p 3 -d io:3/2

 13. To power on nPar ID 1,
> poweron partition 1

Note: You can also use the legacy bo or pe command(menu based) to power on a nPartition.

14. To view the powr status of nPars,
> parstatus -P

15. To open the console of nPartition id 1,
> connect partition 1

Note: You can also use the legacy co command to get the console.

16.

Superdome OA - User Management commands

1. Add user,
ADD USER jack password

2. Disable User,
DISABLE USER jack

3. Enable User,
ENALE USER jack

4. Remove User,
REMOVE USER jack

5. Show History,
HISTORY

6. Set paword for the currently logged in user id,
SET PASSWORD

7. To set admin priviliage to an user,
SET USER ACCESS jack ADMINISTRATOR

HP BLADE MANAGEMENT COMMANDS

1. To open the console of a blade,
> CONNECT BLADE bay_number

2. To poweroff all the blades,
> POWEROFF BLADE ALL

3. To poweroff a specific blade,
> POWEROFF BLADE bay_number

4. To forcefully poweroff a specific blade,
> POWEROFF BLADE bay_number FORCE

5. To poweron all the blades,
> POWERON BLADE ALL

6. To poweron a specific blade,
> POWERON BLADE bay_number

7. To Reboot all the blades,
> REBOOT BLADE ALL

8. To Reboot a specific blade,
> REBOOT BLADE bay_number

9. To Forcefully Reboot a specific blade,
> REBOOT BLADE bay_number FORCE

10. To set hard disk as the bootdevice for the next boot of the blade,
> SET BLADE ONCE HDD bay_number

11. To set PXE (N/w) as the bootdevice for the next boot of the blade,
> SET BLADE ONCE PXE bay_number

12. To set hard disk as the bootdevice for he blade,
> SET BLADE ONCE HDD bay_number

13. To set PXE (N/w) as the bootdevice for the blade,
> SET BLADE ONCE PXE bay_number

14. To turn on/off the Blade UID LED,
> SET BLADE UID ALL ON
> SET BLADE UID bay_number OFF

15. To show the boot settings for a specific blade,
> SHOW BLADE BOOT bay_number

16. To show the blade information,
> SHOW BLADE INFO bay_number

17. To show the list of blades,
> SHOW BLADE LIST

18. To show the blade names,
> SHOW BLADE NAMES

19. To show the blade status of bay number 2,
> SHOW BLADE STATUS 2

20. To show the blade temperature of bay 2,
> SHOW BLADE TEMP 2

21. To show syslog of bay 2,
> SHOW SYSLOG BLADE 2