Change package IP address off line
Halt the package
# cmhaltpkg -v <package>
Update control files
/etc/cmcluster/package/package.conf
Propagate the changes manually or use cmapplyconf
(legacy or modular)
Start package
# cmrunpck <package>
Check that the IP was added.
# cmviewcl -v
Change package IP address on line
You can change the IP address while a package is up but there's some risky... but can be done.
The recommended is do it off line to avoid any problems.
Use the command cmmodnet to remove the IP addres and after to add.
Using netstat -in check that the ip address is correct.
Check the cluster status:
# cmviewcl -v
Update the package script, propagate the change to other nodes.
For more infos about cmmodnet check man pages.
Serviceguard - how to change package IP on line/ off line
Labels: MC ServiceGuard, Network
Serviceguard - Change node ip address
**In this situation we are changing just the ip, the subnet stil is the same**
Backup configuration files:
/etc/hosts
/etc/rc.config.d/netconf
/etc/cmcluster/
Move the package(s) to another node
# cmhaltpkg -v <package>
# cmrunpkg -v -n NODE <package>
Remove node from all packages
Run cmapplyconf (or send the configuration files for others nodes manualy)
Stop the node
# cmhaltnode -v <node>
Remove node from cluster configuration
Apply new cluster configuration
Change IP on node
/etc/rc.config.d/netconf
/etc/hosts
Restart the net deamon for apply the new network configuration
# /sbin/init.d/net stop
# /sbin/inti.d/net start
Add node to cluster
The bellow link is another post showing how to include a new node in the cluster running.
http://hp-ux-br.blogspot.com.br/2012/05/adding-new-node-in-running-cluster.html
Apply cluster configuration
Start the node again
# cmrunnode -v <node>
Add node to all relevant packages
Apply package configuration
Move package(s) back to node
# cmrunpkg -v -n NODE <package>
# cmhaltpkg -v <package>
Check cluster status
# cmviewcl -v
Labels: MC ServiceGuard, Network
Configuring LAN on MP
This tutorial explain how to change the LAN configuration on MP. You can also leave the DHCP enable if you want use the bootp from your server (or other).
1. Connect to the serial port.
2. At the MP Main Menu, enter CM and press Enter to select command mode.
3. At the command mode prompt, enter LC and press Enter. The screen displays the default LAN configuration values. Write down the default values, or log the information to a file. You may need the information for future troubleshooting.
4. Use the LC command to disable DHCP.
a. From the LC command menu, type D and press Enter.
b. Follow the instructions on the screen to change the DHCP status from Enabled to Disabled.
c. Enter XD -R to reset the iLO MP.
5. Use the LC command to enter information for the IP address, host, subnet mask, gateway parameters, and so on.
6. Enter XD -R to reset the iLO MP.
7. After the iLO MP resets, log in to the iLO MP again and enter CM at the MP:> prompt.
8. Enter LC to confirm that DHCP is disabled and display a list of updated LAN configuration
settings.
Glance Adviser Script - Averaged over # of CPU's
The following script will return the average CPU utilization (averaged over number of CPU's) for system, user and total utilization. It could easily be modified to be a feed into MRTG for graphing purposes.
Script
#
# Sample glance script showing average CPU utilization across all CPU's
#
headersprinted = 0
total_total = 0
total_sys = 0
total_user = 0
count = 0
# For each CPU
cpu loop {
# print headers if this is the first row
if headersprinted == 0 then {
print " Sys CPU User CPU Total CPU"
headersprinted = 1
}
total_total=total_total+GBL_CPU_TOTAL_UTIL
total_sys=total_sys+GBL_CPU_SYS_MODE_UTIL
total_user=total_user+GBL_CPU_USER_MODE_UTIL
count = count + 1
}
print total_sys/count, " ", total_user/count, " ", total_total/count
Output
# glance -j 5 -adviser_only -syntax cpu.cfg -iterations 3
Welcome to GlancePlus
Sys CPU User CPU Total CPU
8 30 38
Sys CPU User CPU Total CPU
5 31 35
Sys CPU User CPU Total CPU
4 24 28
Labels: GlancePlus
Glance Adviser Script - Detailed Process Gathering
You must be carefull with this example as it will generate a lot of data very quickly, depending on the interval. I.e. listing all processes every second is a lot of lines in a short period of time.
It would be pretty easy to modify this script to simply count the processes if you wanted to report back to MRTG the number of processes.
Script
process loop {
if ((proc_cpu_total_util > 0) or ( proc_stop_reason != "SLEEP" ))
then {
print gbl_statdate, "|", gbl_stattime, "|", proc_cpu_last_used, "|",
proc_mem_virt, "|", proc_mem_res, "|",
proc_cpu_total_util, "|",
proc_stop_reason, "|", proc_disk_logl_io_rate, "|",
proc_proc_id, "|", proc_parent_proc_id, "|",
proc_user_name, "|", proc_proc_name, "|",
proc_cache_wait_time, "|", proc_cdfs_wait_time, "|",
proc_disk_subsystem_wait_time, "|", proc_disk_wait_time, "|",
proc_graphics_wait_time, "|", proc_inode_wait_time, "|",
proc_ipc_subsystem_wait_time, "|", proc_ipc_wait_time, "|",
proc_jobctl_wait_time, "|", proc_lan_wait_time, "|",
proc_mem_wait_time, "|", proc_msg_wait_time, "|",
proc_nfs_wait_time, "|", proc_other_io_wait_time, "|",
proc_other_wait_time, "|", proc_pipe_wait_time, "|",
proc_pri_wait_time, "|", proc_rpc_wait_time, "|",
proc_sem_wait_time, "|", proc_socket_wait_time, "|",
proc_stream_wait_time, "|", proc_sys_wait_time, "|",
proc_term_io_wait_time
}
}
Labels: GlancePlus
Glance Adviser script - Lan statistics
This example will produce packet level statistics (in, out, collisions, errors...) for every lan interface in the server.
Script
# initialize variables:
netif_to_examine = "" # lan0 would only report on lan0, etc.
headers_printed = headers_printed
netif loop {
# print information for the selected interface or if null THEN all:
IF (BYNETIF_NAME == netif_to_examine) or
(netif_to_examine == "") THEN
{
# print headers the first time through the loop:
IF headers_printed == 0 THEN
{
print "Date Time Interface InPkts OutPkts OutQ Colls Errs"
print " "
headers_printed = 1
}
# print one line per interface reported:
print GBL_STATDATE, " ", GBL_STATTIME, " ", BYNETIF_NAME|8,
BYNETIF_IN_PACKET, BYNETIF_OUT_PACKET,
BYNETIF_QUEUE, BYNETIF_COLLISION, BYNETIF_ERROR
# (note that some interface types do not report collisions or errors)
}
}
print " "
Execute your lan script (lan.cfg) now:
# glance -j 5 -adviser_only -syntax lan.cfg -iterations 3
Welcome to GlancePlus
Date Time Interface InPkts OutPkts OutQ Colls Errs 04/28/04 15:01:00 lan0 3 2 0 0 0 04/28/04 15:01:00 lan3 35 39 0 0 0 04/28/04 15:01:00 lan6 31 32 0 0 0 04/28/04 15:01:00 lan7 50 31 0 0 0 04/28/04 15:01:00 lan8 0 0 0 0 0 04/28/04 15:01:00 lan4 0 0 0 0 0 04/28/04 15:01:00 lan9 0 0 0 0 0 04/28/04 15:01:00 lan10 0 0 0 0 0 04/28/04 15:01:00 lan11 0 0 0 0 0 04/28/04 15:01:00 lan5 3 2 0 0 0 04/28/04 15:01:00 lo0 26 26 0 na 0 04/28/04 15:01:05 lan0 13 7 0 0 0 04/28/04 15:01:05 lan3 173 230 0 0 0 04/28/04 15:01:05 lan6 121 129 0 0 0 04/28/04 15:01:05 lan7 197 142 0 0 0 04/28/04 15:01:05 lan8 1 1 0 0 0 04/28/04 15:01:05 lan4 1 1 0 0 0 04/28/04 15:01:05 lan9 1 1 0 0 0 04/28/04 15:01:05 lan10 1 1 0 0 0 04/28/04 15:01:05 lan11 1 1 0 0 0 04/28/04 15:01:05 lan5 13 7 0 0 0 04/28/04 15:01:05 lo0 3 3 0 na 0 04/28/04 15:01:10 lan0 12 7 0 0 0 04/28/04 15:01:10 lan3 151 221 0 0 0 04/28/04 15:01:10 lan6 97 105 0 0 0 04/28/04 15:01:10 lan7 165 126 0 0 0 04/28/04 15:01:10 lan8 1 1 0 0 0 04/28/04 15:01:10 lan4 1 1 0 0 0 04/28/04 15:01:10 lan9 1 1 0 0 0 04/28/04 15:01:10 lan10 1 1 0 0 0 04/28/04 15:01:10 lan11 1 1 0 0 0 04/28/04 15:01:10 lan5 12 7 0 0 0 04/28/04 15:01:10 lo0 0 0 0 na 0
You can redirect the output for a file.
Labels: GlancePlus
Check/Set boot order
Check the boot order:
# setboot
Change primary boot device:
# setboot -p <HW ADDRESS>
Change alternate boot:
# setboot -a <HW ADDRESS>
For more options check setboot man pages.
Labels: Boot