Administering HP-UX
- Performance Monitoring and Tuning in HP-UX
- Software and Patch Management
- HP-UX Startup and Shutdown Process
- Managing and tuning Kernel
- Device management
- Tools like SAM, SMH, SFM, WBEM, EMS and etc.
- Managing Ignite-UX
- Basic Network Management
- Managing Service Guard
- System Security in HP-UX
- Dump & Swap management
- Managing LVM & File systems
- HP-UX Tips and Tricks
- New Features in HP-UX 11i v3
Porting and Archive Center for UP-UX
- Most of the OPEN SOURCE packages which have been configured and ported to HP-UX can be downloaded from one of the following Liks
- Some useful HP-UX Tips and Tricks can be found: Here
- Refer HP-UX Certification Study Guide Here
System Administration
SAM
All actions taken by SAM are logged into the SAM log file /var/sam/log/samlog. The log entries in this file can be viewed via the SAM utility samlog_viewer. samlog_viewer can filter the log file by user name, by time of log entry creation, and by level of detail.
All actions taken by SAM are logged into the SAM log file /var/sam/log/samlog. The log entries in this file can be viewed via the SAM utility samlog_viewer. samlog_viewer can filter the log file by user name, by time of log entry creation, and by level of detail.
To configure the initial parameters
#set_parmsTo configure additional network parameter
# set_parms addl_network
SMH System Management Homepage
The text-based HP-UX System Management Homepage (HP SMH) replaces the System Administration Manager (SAM). It operates as a logged-in management tool
The web based SMH can be accessed using http://targetsystem:2301/ address. After a brief time, this will open a another login screen in https://targetsystem:2381/ address.
To start the HP SMH Daemon
# /opt/hpsmh/bin/hpsmh autostart
As system administrator, you can give limited
text based HP SMH access to nonsuperuser individually by user and
collectively by primary group name.
To activate restricted HP SMH
# /usr/sbin/smh -r
HP Web Based Enterprise Management (WBEM)
WBEM is a set of management and internet technologies based on Common Information Model (CIM).
Three core standards used by HP WBEM are
- A data Model, CIM, The Common Information Model Standard
- An encoding specification xmlCIM for representing CIM in XML
- A transport mechanism, CIM operations over HTTP
WBEM providers provide configuration data and information about a device or service and performs a requested action on it.
WBEM clients are WBEM-enabled management applications
that receive data from providers and allow you to perform needed
management operations. HP offers two WBEM clients - HP SIM and HP SMH -
in addition to basic clients that come with HP WBEM Service Software.
HP WBEM Services includes a server component that acts
as an intermediary between the client and providers. All communication
between the client and providers passes through it. The server
components is based on CIM and, therefore, referred as CIM Server. Key
configuration files for the CIM servers are cimserver_current.conf and cimserver_planned.conf located in /var/opt/wbem directory.
When the client issues a request to retrieve data from
a managed hardware or software resource, the request goes to CIM server
which looks into the CIM repository for the information. IF the
requested information is available, the CIM server simply send it back
to the client. In case the information is unavailable, it engages
appropriate providers. The providers obtain the information and rerun it
the CIM server, which updates the repository and forward the
information to the client.
- cimservera - Works with PAM to provide authentication services to cimserverd
- cimserverd - Main Daemon. Interacts with cimservera for authentication
- cimconfig - Set, unset and get CIM server properties
- cimprovider - disable, enable, remove or list registered CIM providers or CIM provider modules and module status
- cimserver - starts, stops and manages daemons
cimserver
is a HP WBEM Services daemon process; it is designed to restart
automatically when the operating system reboots, and stay running as
long as the operating system is running. If cimserver should fail on
HP-UX, another daemon (cimserverd)
automatically restarts it. However, cimserver will not be automatically
restarted in two cases. In both cases, you need to start it with the
cimserver command.
- If a user deliberately stopped the CIM Server with the cimserver -s command, and then never restarted it
- If a user disabled both the HTTP and the HTTPS connections. This is done with the cimconfig command, setting both enableHttpConnection and enableHttpsConnection to false. When you restart CIM Server, you can specify the type of connection on the cimserver command line to get started. Once the CIM Server is running, use cimconfig to enable one type of connection type in the properties file.
# cimserver # without any options, it starts the CIMSERVER # cimserver -s # stops the cimserver # cimserver -v # displays the version number of cimserver
By default, cimserverd checks the status of the
cimserver process every 30 seconds. To adjust the time between checks,
edit the value in the /etc/opt/wbem/cimserver_retry.conf file. After editing the file, you must kill the process to force cimserverd to read the file:
- Find the cimserverd PID (process identification number), using ps -ef |grep cimserverd
- Kill the process, using kill -9 <pid_number>
- cimserverd will automatically respawn, because it has an entry in /etc/inittab
-d # Disables the specified CIM provider module -e # Enables the specified CIM Provider module -r # Disables and removes the specified provider module and all of its contained providers -l Displays all the registered providers module -s Displays the status of provider modules -m module # Specifies the module for operation -p provider # Specifies the provider for operation
To list the registered providers and their status
$ cimprovider -l -s MODULE STATUS OperatingSystemModule OK ComputerSystemModule OK ProcessModule OK IPProviderModule OK DNSProviderModule OK -------- --------
To Disable provider module "OperatingSystemModule" and all of its contained providers (placing them in a stopped state).
# cimprovider -d -m OperatingSystemModuleTo Enable provider module "OperatingSystemModule" and all of its contained providers (placing them in an OK state).
# cimprovider -e -m OperatingSystemModuleTo Disable and remove (un-register) the "OperatingSystemModule" provider module and all of its contained providers.
# cimprovider -r -m OperatingSystemModuleTo Disable and remove (un-register) the "PG_OperatingSystemProvider" provider that is contained in the "OperatingSystemModule" provider module.
# cimprovider -r -m OperatingSystemModule -p PG_OperatingSystemProvider
The cimconfig command manages CIM Server configuration properties. The operations are executed on the local host by submitting requests to the CIM Server. An operation on a current configuration property takes effect immediately, and an operation on a planned configuration property takes effect the next time the CIM Server is started with cimserver.
-g - Get the value of the specified configuration property. -c - Use the current configuration. -p - Configuration user on the next CIM server start. -d - Use the default configuration. -s - Add or update configuration property value. -u - Reset the configuration property to its default value. -l - Display all the configuration properties.Get the current value for the configuration property shutdownTimeout
# cimconfig -g shutdownTimeout -c PGC00213: The current property value is 30.
Get the planned value for the configuration property shutdownTimeout.
# cimconfig -g shutdownTimeout -pGet the default value for the configuration property shutdownTimeout.
# cimconfig -g shutdownTimeout -dSet the current value of the property shutdownTimeout to the new value 15.
# cimconfig -s shutdownTimeout=15 -c
Display all the configuration properties
# cimconfig -l enableAuditLog sslClientVerificationMode idleConnectionTimeout enableSubscriptionsForNonprivilegedUsers shutdownTimeout authorizedUserGroups enableRemotePrivilegedUserAccess enableHttpsConnection enableNamespaceAuthorization enableHttpConnection
osinfo command run a HP WBEM Services client that gathers information about the operating system where the command is issued. The command uses the Operating System Provider, which is bundled with HP WBEM Services for HP-UX.
# osinfo OperatingSystem Information Host: test1 Name: HP-UX Version: B.11.31 UserLicense: Unlimited user license Number of Users: 1 users Number of Processes: 469 processes OSCapability: 64 bit LastBootTime: Mar 14, 2010 3:08:53 (-0500) LocalDateTime: Mar 15, 2010 16:22:04 (-0500) SystemUpTime: 133991 seconds = 1 day, 13 hrs, 13 mins, 11 secs
System Fault Management
The SFM software is a collection of tools used to monitor the health of HP servers running HP-UX. SFM retrieves information about a system’s hardware devices such as CPU, memory, power supply, and cooling devices. SFM operates within the Web-Based Enterprise Management (WBEM) environment- The log file for sfm provider module is /var/opt/sfm/log/sfm.log
- The events monitored by sfm are logged to /var/opt/sfm/log/event.log
To confirm the current monitoring mode
# /opt/sfm/bin/sfmconfig -w -q EMS hardware monitors are disabled & SysFaultMgmt is monitoring devices.
To switch the monitoring mode from EMS to SFM
# /opt/sfm/bin/sfmconfig -w -s
To switch back from the SFM monitoring mode to the EMS monitoring mode
# /opt/sfm/bin/sfmconfig -w -e
To send a test event for checking if the SFMIndicationProvider is working properly
# /opt/sfm/bin/sfmconfig -t -m Sending test event for memory monitor.
To view the list of events
# evweb eventviewer -L EvArchNo Severity Event # Event Category Archive Time Summary 35 Information 103 Memory 2010-03-15 16: This is a t... 34 Critical 932 System Hard... 2010-03-14 04: Power is no... 33 Critical 931 System Hard... 2010-03-14 04: Power is no...
To view the details of an event
# evweb eventviewer -E -n <event number> # evweb eventviewer -E -n 35 Event Time...........: Mon Mar 15 16:31:49 2010 Severity.............: Information Provider.............: MemoryIndicationProviderIA Event #..............: 103 ............. ............. ............. Error Details: Additional information on this event can be obtained by viewing the low level log details for logid 4724 using the command: evweb logviewer -E -r -i 4724
To view, create, modify and delete event subscriptions, use evweb subscribe option
evweb {-C [ -e|-h|-i|-n|-r|-t|-s|-v|-o ] # creates new subscription + -n subscription_name + -e [eq|ne|le|ge|bw]:severity_level1[,severity_level2] + -v [event_category] + -i Event_ID + -o Provider_Name + -t [archive|email][handler_properties] + -s [syslog] + -h (help) {-D [ -f|-n ] } # Deletes subscription + -n subscription_name + -f {-E [ -h|-n ] } # Lists details of an event subscription {-L [ -n|-h ] } # Lists a summary of event subscriptions {-M [ -e|-h|-i|-n|-r|-t|-s|-v|-o ] # Modifies the subscription + -n subscription_name + -e [eq|ne|le|ge|bw]:severity_level1[,severity_level2] + -v [event_category] + -i Event_ID + -o Provider_Name + -t [archive|email][handler_properties] + -s [syslog] + -r + -hLists all subscriptions that are created using EVWEB
# evweb subscribe -L Subscription Name HP Known Is Deprecated Event Archive Email Syslog HP_defaultSyslog FALSE FALSE FALSE FALSE TRUE HP_General Filter@1_V1 TRUE FALSE TRUE FALSE FALSE
To Display details of the subscription
# evweb subscribe -E -n "HP_General Filter@1_V1" Subscription Details ==================== Subscription Name : HP_General Filter@1_V1 HP Known : TRUE Filter Type : HP Advised Subscription Criteria : Query : Select * from HP_DeviceIndication Subscription Destinations : Event Archive
To create a new subscription named "Email_Subs" to email the event details in case of events with severity level 1 or more
# evweb subscribe -C -n Email_subs -e ge:1 -t email:to:user@xyz.com;user2@xyz.com:cc:user3@xyz.com
TO Change the sender address in the SFM email notifications,
01. Edit the from email id in: /var/opt/sfm/conf/evweb.conf to suit your domain. 02. Enter the following command at the HP-UX prompt: # /opt/sfm/bin/sfmconfig -c /var/opt/sfm/conf/evweb.conf
HP's EMS Hardware Monitoring
Hardware monitoring gives you the ability to detect problems with many of your system hardware resources. By providing immediate detection and notification, hardware monitoring allows you to quickly identify and correct problems - often before they impact system operation.
By default, EMS HW Monitoring is enabled on your
system (In 11i v3, SFM is enabled by defaul). Also by default, messages
regarding major warnings, serious and critical events that occur on
hardware being monitored will be:
- Written to /var/adm/syslog/syslog.log
- E-mailed to root
- Written to /var/adm/syslog/syslog.log
- E-mailed to root
All events will be stored in /var/opt/resmon/log/event.log.
To send an test event to disk_em monitor
# /etc/opt/resmon/lbin/send_test_event disk_em
EMS HW Monitoring can be reconfigured using the Monitoring Request Manager, /etc/opt/resmon/lbin/monconfig.
Complete information on using hardware monitoring is
included in the EMS Hardware Monitors User's Guide, which can be
downloaded from Hewlett-Packard's external web site at http://docs.hp.com/hpux/diag/.
To stop or start EMS Hardware Monitoring
# /etc/opt/resmon/lbin/monconfig Press K for Kill (Disable) Event Monitoring Press E for Enabling Event Monitoring
To check the current Monitoring status
# /etc/opt/resmon/lbin/moncheck >/StorageAreaNetwork/events/SAN_Monitor ... NOT MONITORING. (Possibly there is no hardware to monitor.) >/system/events/cpu/cmc ... OK. For /system/events/cpu/cmc/cache_errors: Events >= 3 (MAJOR WARNING) Goto SYSLOG Events >= 3 (MAJOR WARNING) Goto EMAIL; addr=root Events >= 1 (INFORMATION) Goto TEXTLOG; file=/var/opt/resmon/log/event.log >/system/events/cpu_hitachi/cmc ... NOT MONITORING. (Possibly there is no hardware to monitor.) >/system/events/cpe ... OK. ..... ..... >/system/events/system_status ... OK. For /system/events/system_status/ui_host/aemhpvm1: Events >= 1 (INFORMATION) Goto TEXTLOG; file=/var/opt/resmon/log/event.log Events >= 3 (MAJOR WARNING) Goto SYSLOG Events >= 3 (MAJOR WARNING) Goto EMAIL; addr=root
To stop getting monitoring alerts for any devices, add the HW address of the device not to be monitored in "/var/stm/data/tools/monitor/disabled_instances"
file and restart (stop and start) EMS services. For more information,
open the file /var/stm/data/tools/monitor/disabled_instances in vi and
refer the examples.
/opt/resmon/bin/emsui /opt/resmon/bin/EMSconfig.ui
Performance
$ vmstat 2 procs memory page faults cpu r b w avm free re at pi po fr de sr in sy cs us sy id 3 1 0 2814429 1073396 13 7 28 20 2 0 65 1388 10409 946 25 3 72 3 1 0 2814429 1073319 12 2 0 0 0 0 0 539 12408 311 1 0 99 3 1 0 2814429 1073319 12 0 9 0 0 0 0 533 12371 323 2 2 97 3 1 0 2814429 1073319 7 0 5 0 0 0 0 539 15867 365 1 1 97The fields for vmstat's display are
procs Number of kernel threads in each of the three following states r run queue b blocked kernel threads waiting for IO w idle processes that have been swapped at some time Memory Report on usage of virtual and real Memory avm active virtual pages in 4KB free size of the free list in 4KB Page re pages reclaimed from free list pi pages paged in from filesystem or swap device to Memory po pages paged out to filesystem or swap device from Memory fr pages that have been freed or destroyed de pages freed after writes sr Pages scanned by clock algorithm per second CPU Percentage usage of CPU us user time sy system time id idle time
SWAPINFO: Prints information about device and file system paging space.
swapinfo -m displays values in Mb instead of Kb -t add totals line -a show all device paging area swapinfo -tam Mb Mb Mb PCT START/ Mb TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME dev 20480 15578 4902 76% 0 - 1 /dev/vg00/lvol2 reserve - 4863 -4863 memory 16349 6417 9932 39% total 36829 26858 9971 73% - 0 -
top
To find out the process which are using more memory# top -f top.out -n 10000 -d 1 # sort -n -k7,7 top.out # sort -n -k7,7 top.out | awk '{if ($7~/M$/) {print $0}}'
glance
GlancePlus is a powerful and easy-to-use online performance diagnostic tool for HP-UX systems. It is distributed in two forms: "gpm", a Motif-based program and "glance", a character mode program.
The most use full sub command of glance when used on character based program are:
a CPU By Processor c CPU Report d Disk Report g Process List i IO By File System l Network By Interface m Memory Report n NFS By System t System Tables Report u IO By Disk v IO By Logical Volume w Swap Space U IO By HBA Card V Logical System List j Adjust intervel ? Commands Menu
sar
-L report activity for each active lunpath. If no lunpath is active, then a blank line is printed
-L report activity for each active lunpath. If no lunpath is active, then a blank line is printed
# sar -L 2 2 HP-UX aembwqd1 B.11.31 U ia64 06/12/09 12:42:29 lunpath %busy avque r/s w/s blks/s avwait avserv %age num num num num msec msec 12:42:31 disk127_lunpath103 1.00 0.50 0 1 9 0.00 5.70 12:42:33 disk101_lunpath3 0.50 0.50 0 3 6 0.00 6.28 disk101_lunpath53 0.50 0.50 0 3 6 0.00 7.67 disk127_lunpath103 2.50 0.50 0 4 56 0.00 33.09 Average disk127_lunpath103 1.75 0.50 0 2 32 0.00 27.00 Average disk101_lunpath3 0.25 0.50 0 2 3 0.00 6.28 Average disk101_lunpath53 0.25 0.50 0 2 3 0.00 7.67
Tuning
kctune: kctune is the administrative command for HP-UX kernel tunable parameters. It gives information about tunable parameters and their values, and makes changes to tunable values.
To see all tunables and their current values:
$ kctuneTo see which tunables have new values being held until next boot:
$ kctune -DTo To see the tunables with only non default value
$ kctune -STo see verbose information about a tunable:
$ kctune -v tunablenameTo set a tunable value on the running system:
$ kctune tunable=12To set a tunable value to be used when the system reboots:
$ kctune -h tunable=12To increase a tunable's value by 100:
$ kctune tunable+=100
Software and Patch Management: (SD-UX)
The software in SD-UX is organized in a hierarchy of
components or objects. These components are filesets, subproducts,
products and bundles. The place where these components are stored is
called a software depot.
Filesets: It is a collection of files
and some control scripts. It is the basic entity in the SD-UX
hierarchy. One file set can belong to only on product. But it can be
included in a number of sub-products and bundles.
Sub-products: If a file set contains several filesets, it is better to combine logically related filesets in to subproducts.
Products: It is a superset of filesets and / or subproducts.
Bundles: Bundles are usually packaged
by HP-UX for the distribution of software. The bundle may contain
filesets that may belong to different products.
- The SD-UX daemon is “swagentd”. It is started on init level 2. To start it manually,
# /usr/sbin/swagentd -r
- The swagent agent process is executed by swagentd to perform specific software management tasks. The swagent agent is never invoked by the user.
- /var/spool/sw/ The default location of a source and target software depot.
- Software codes are stored in /var/adm/sw/.codewords
- SD-UX database is stored in /var/adm/sw/products directory. It is called as Installed Product Database (IPD)
- Log of swinstall command is stored in /var/adm/swinstall.log
- Log of swremove commands are stored in /var/adm/swremove.log
To restart the swagent daemon
# /usr/sbin/swagentd -r
SD-UX Commands
To list the software installed in a systemswlist
To find out Which Operating Environment Currently installed# swlist -l bundle | grep HPUX11i HPUX11i-OE-Ent B.11.23.0706 HP-UX Enterprise Operating Environment Component
To run the swlist interactive interface at host1
# swlist -i @ host1
To use interactive swlist to view a depot
# swlist -i -d @ /tmp/depot
To generate a comprehensive listing that includes all filesets for the product NETWORKING
# swlist -v -l fileset NETWORKING
To list the contents of the local tape, /dev/rmt/0m
# swlist -d @ /dev/rmt/0m (or) # swlist -s /dev/rmt/0m
To list the products stored in a remote depot
#swlist -d @ hostA:/depot
To list all depots on a host
# swlist -l depot @ hostA # swlist -l product -d @ /tmp/depot
To list all filesets belong to a product called openssl
# swlist -l fileset openssl # swlist -l fileset LVM -d @ aembwqc1:/cdrom
To find out which product a file belongs to
1st way, its slow:
1st way, its slow:
# swlist -l file |grep /bin/ls OS-Core.CMDS-MIN: /usr/bin/lsacl OS-Core.UX-CORE: /usr/bin/ls
2nd way much quicker, as root:
# find /var/adm/sw/products -name INFO -exec grep -l /bin/ls {} +
Installing and removing software
To install the softwareswinstall -s <source> -x options -x autoreboot=true # To automatically reboot system if required after install -x mount_all_filesystems=false # to continue even if all file system are not mounted
To install all products from /SD_CDROM
#swinstall -s /SD_CDROM
To install the C and Pascal products to a set of remote hosts
#swinstall -s sw_server cc pascal @ hostA hostB hostC
Install Product1 from remote depot /tmp/depot.1 on host swposix
#swinstall -s swposix:/tmp/depot.1 Product1
To install a fileset
# swinstall -x autoreboot=true -s aembwqc1:/cdrom LVM.LVM-MIRROR-RUN # swinstall -s /SD_CDROM OnlineJFS01
swremove To remove software from the system
To remove the package B1868AA from the system
# swremove B6818AA
To preview the remove of Pascal and C
# swremove -p cc pascal
To remove the entire contents of a local depot (-d operates on depot instead of system)
# swremove -d \* @ /var/spool/sw
Verify the installed softwares
swverify: To verify the integrity of the installed software# swverify B5725AA
To verify the contents of a local depot (-d operates on depot instead of system)
# swverify -d \* @ /var/spool/sw
To verify the entire contents of a system
# swverify \*
Managing software Depots
To register or unregister Software depot
To register /SD_CDROM as a depot
swreg -l depot /SD-CDROM
To unregister the depot /SD_CDROM
swreg -u -l depot /SD_CDROM @ hostA
To remove the software from the depots
To remove all software from /var/spool/sw depot
# swremove -d * @ /var/spool/sw
swcopy: To copy software
products for subsequent installation or distribution. This is command
copies the software from an existing depot to the new depot and
automatically registers the depot.
To copy the product B6818AA from depot /SD_CDROM to /var/spool/sw
# swcopy -s /SD_CDROM B6818AA @ /var/spool/sw
To copy all products from the cartridge tape /dev/rmt/0m to the default depot on the local host
# swcopy -s /dev/rmt/0m \*
To package software products into a target depot or tape
To re-package the entire contents of the depot /var/spool/sw onto the tape at /dev/rmt/0m
# swpackage -s /var/spool/sw -x media_type=tape @ /dev/rmt/0
swjob
The swjob command displays job information and removes jobs. It supports these features:- Display the current install jobs, copy jobs, and other SD jobs initiated by the SD commands.
- Specify a specific job to list or remove.
- Display the command logfile for a specific job.
- Display the target logfile for a specific target.
-a attribute -u To remove a job -v to list all available attributes, one per line # swjob # # Controller: test2 # #jobid operation state results title # test2-0025 Remove Complete test2-0028 Remove Complete test2-0030 Install Complete test2-0031 Install Complete
# swjob -a log test2-0025 or # swjob -a log test2-0025 @ test2:/ ======= 06/04/09 23:25:38 CDT BEGIN swremove SESSION (non-interactive) (jobid=test2-0025) * Session started for user "root@test2". * Beginning Selection * Target connection succeeded for "test2:/". * Software selections: ......... ........ .......... * Summary of Execution Phase: * 5 of 5 filesets had no Errors or Warnings. * The Execution Phase succeeded. ======= 06/04/09 23:25:43 CDT END remove AGENT SESSION (pid=24811) (jobid=test2-0025)
Patch management:
Types of patches:- Command patches PHCO_XXXXX
- Kernel Patches PHKL_XXXXX
- Network Patches PHNE_XXXXX
- Subsystem Patches PHSS_XXXXX
Usually, system has to be rebooted after installing a kernel patch.
To list the installed patches:
swlist -l product PH* # In HP-UX 10.X swlist -l patch # In HP-UX 11.X
HP-UX patches are distributed as shar files.
When a patch is downloaded from HP FTP or Web site, sh command is used
to unshare the patch. When a patch is unshared using sh command, it
creates two files. One *.depot file and *.text file.
To install a downloaded patch PHCO_15220, complete the following steps.
01. Unshare the patch using sh command
sh PHCO_15220 (Note: The above command creates PHCO_15220.depot (compressed) and PHCC_15220.text)
02. Create a patch depot using swcopy command
swcopy -s PHCO_15220.depot PHCO_15220 @ /var/spool/sw
03. Install it using swinstall command
Swinstall –s /var/spool/sw
HP-UX Software assistant
- HP-UX Software Assistant (SWA) can analyze a system (and some types of depots) for patch warnings, critical defects, security bulletins, missing Quality Pack patch bundle, and user-specified patches and patch chains. SWA uses an HP-supplied catalog file to analyze system and generate reports.
- From this analysis, swa get can download patches and build a Software Distributor (SD-UX) depot which will fix many of the issues in the report.
- SWA also recommends additional actions in the report which you need to take care of manually.
- SWA combines most of the abilities of Security Patch Check (SPC) and all of the abilities of the HP IT Resource Center (ITRC) Patch Assessment tool into a single solution that runs locally on HP-UX systems.
- SWA is divided into two bundles, SwAssistant (which contains security_patch_check and swa), and SwMgmtMin.
- The SwAssistant bundle must be installed to get full
functionality, whereas the SwMgmtMin bundle only allows you to inventory
systems and remove files created by SWA.
$HOME/.swa.conf - Per-user SWA Config File
/etc/opt/swa/swa.conf - System wide SWA Config file
/var/opt/swa/swa.log - Default log file location for root users
swa command has four major modes
report: Generates reports on Issues and recomended actions
get: Download software and create a depot. Depending upon option, either new depot created or an exixting depot is added to
step: Perform an individual step of the swa report or swa get command, both of which are acrually composed of multiple steps
clean: Remove software and files cached by SWA.
report: Generates reports on Issues and recomended actions
get: Download software and create a depot. Depending upon option, either new depot created or an exixting depot is added to
step: Perform an individual step of the swa report or swa get command, both of which are acrually composed of multiple steps
clean: Remove software and files cached by SWA.
Startup
System Startup and Shutdown
System boot process:- Power on
- PDC executes CPU, Memory and other tests
- PDC initialize the console to display messages
- Looks for Primary boot path
- It loads and executes Initial System Loader (ISL). Roll of boot ROM ends.
- ISL loads the secondary system loader called "hpux". It resides on boot area of the disk
- "hpux" loads "/stand/vmunix" into memory and hands control over to kernel
- Kernel loads the device drivers
- Swapper process started. It has process ID 0. It manages memory for swapping in and out. It schedules all other process. Its first job is to startup the init process.
- /sbin/pre_init_rc getting executed. It checks and repairs root file system.
- /sbin/init started. Process ID is 1. It refers /etc/inittab. It does the following.
- read the /etc/inittab for default run level
- ioinitrc - It invokes insf command with -e option to find any new devices.
- bcheckrc - activates LVM and run fsck on file systems if required.
- /sbin/rc - It brings the system to the default run level. This script is run whenever the system moves from to a higher one or vice versa.
- /usr/bin/getty
To add a program to the startup time:
- Execution script for starting and stopping is installed in /sbin/init.d directory
- Configuration files are placed in /etc/rc.config.d directory
- If script is to be run on run level 2, place a link to the execution script at /sbin/rc2.d directory
- ISL: Initial program loader
- hpux: Secondary system loader
- AUTO: contains hpux utility name and arguments to be passed to the hpux utility
- LIF volume header that identifies LIF volume
- File containing hp-ux volume name
ISL Commands:
ISL> hpux show autofile # To view the contents of AUTO file
ISL> hpux -is boot # To boot the system in the single user mode
ISL> hpux -lq boot # To ignore quorum and boot
ISL> hpux -lm boot # To boot in the maintenance mode
ISL> hpux -ll /stand # To list the files in the /stand directory
hpux Commands:
setboot command is used to view or change the boot path in a running system
To set the primary path to scsi.1.0 and auto boot on
To set the primary path to scsi.1.0 and auto boot on
# setboot -p scsi.1.0 -b on
To create an area on the boot disk for a LIF volume, boot utilities and BDRA
# pvcreate -B /dev/rdsk/c0t0d0
To place the boot utilities on the boot disk:
# mkboot /dev/rdsk/c0t0d0
To add an AUTO file in boot area:
# mkboot -a "hpux (52.3.0;0)/stand/vmunix" /dev/rdsk/c0t0d0
To List the contents of LIF volume
# lifls -l /dev/dsk/c0t0d0
lifcp command is used to copy files to or from the LIF volume
To copy the contents of AUTO file to file1
To copy the contents of AUTO file to file1
# lifcp /dev/rdsk/c0t0d0:AUTO file1 # Copies the contents of AUTO file to file1.
EFI Commands reference
Boot Commands — EFI Shell Commands related to nPartition bootingautoboot - Set/view autoboot timeout variable. bcfg - Display/modify the driver/boot configuration. boottest - Set/view BootTest bits. dbprofile - Display/modify direct boot profiles for use by lanboot. lanboot - Boot over the LAN. reconfigreset - Reset the system (nPartition) for reconfiguration; the nPartition remains inactive, in the shutdown for reconfig state. reset - Reset the system (nPartition). search - Connect drivers for bootables devices.
Configuration Commands — for changing and retrieving system (nPartition) information.
cellconfig - Deconfigure/reconfigure cells. (Set cell use-on-next-boot values.) cpuconfig - Deconfigure/reconfigure processors and processor cores.. date - Display the current date or set the date of the system (nPartition). dimmconfig - Deconfigure/reconfigure memory (DIMMs). err - Display/change the error level. errdump - View/clear logs. fru - View FRU data. info - isplay hardware information. monarch - Set/view a monarch processor. romdrivers - Enable/disable PCI expansion ROM drivers. rootcell - Set/view preferred root cells. (Set nPartition core cell choices.) tftp Performs - TFTP operation to a bootp/DHCP enabled Unix boot server. time - Display the current time or set the time of the system (nPartition). EFI time is set and presented in GMT (Greenwich mean time). variable - Save/restore specific EFI variables. ver - Display the version information.
Filesystem Commands — For managing files, directories, and attributes
attrib - Display/change the attributes of files/directories. cd - Update/view the current directory. comp - Compare the contents of two files. cp - Copy one or more files/directories to another location. edit - Edit an ASCII or UNICODE file in full screen. eficompress - Compress infile and write to outfile. efidecompress - Decompress infile and write to outfile. ls - Display a list of files and subdirectories in a directory. mkdir - Create one or more directories. mount - Mount a filesystem on a block device. rm - Delete one or more files/directories. touch - Update time of file/directory with current time. type - Display the contents of a file. vol - Display volume information of the file system.
Kernel
To analyze the system and display the tunable parameters
# sysdef <enter> (This command will be available after 11i v3 release)
There are three primary commands used to manage
kernel configurations: kconfig, kcmodule, and kctune; and two other
commands: kcpath and kclog.
- The kconfig command manages whole kernel configurations. It allows configurations to be saved, loaded, copied, renamed, deleted, exported, imported, etc. It can also list existing saved configurations and give details about them.
- The kcmodule command manages kernel modules. Kernel modules can be device drivers, kernel subsystems, or other bodies of kernel code. Each module can be unused, statically bound into the main kernel executable, or dynamically loaded. The kcmodule command will display or change the state of any module in the currently running configuration or any saved configuration.
- The kctune command manages kernel tunable parameters. These are variables that control the behavior of the kernel. They have many uses; common ones include controlling the allocation of system resources and tuning aspects of kernel performance. The kctune command will display or change the value of any tunable parameter in the currently running configuration or any saved configuration.
- The kcpath command prints information about the location of the currently running kernel. It is intended for use by scripts and applications that need this information.
- The kclog command searches the kernel configuration log file.
- kcalarm - add, delete, or list kernel tunable alarms, as well as turn kernel tunable monitoring on and off.
- the mk_kernel command, present in previous HP-UX releases, should be aware that the command can still be used. It is included as a small shell script that invokes the kconfig command. This older command is obsolescent and will be removed in a future release.
Kernel Log File
The kernel configuration tools automatically maintain a log file at /var/adm/kc.log. This file lists every change made using the kernel configuration commands. Changes made through HP SMH, the web-based interface for kernel configuration, are logged since HP SMH uses the kernel configuration commands to make the changes.
The kernel configuration tools automatically maintain a log file at /var/adm/kc.log. This file lists every change made using the kernel configuration commands. Changes made through HP SMH, the web-based interface for kernel configuration, are logged since HP SMH uses the kernel configuration commands to make the changes.
The log file is a plain text file that you can view
directly. The kclog command is provided for when you want to do an
intelligent search of the log file.
All of the kernel configuration commands accept a -C
(comment) option when they are being used to make configuration changes.
The -C option allows you to specify a comment that will be included in
the log entry for your change. This can help readers of the log
understand the reasons for your changes.
Query, set, or reset system parameter
Startin HP-UX 11i v.2, config, kmadmin, kminstall, kmmodreg, kmsystem, and kmupdate commands are obsolete and have been removed. The kmtune, kmpath, and mk_kernel commands have been deprecated and are obsolescent.
Common Kernel Command Line options
-a Include all information in the output
-b Specify whether or not to update the automatic backup configuration before the requested change
-c Specify the saved configuration to manage. if omitted, manage the currently running configuration
-C Include a comment in the kernel configuration log file
-d Display descriptions of each item
-D (difference) Display only the changes being held for next boot
-h (hold) Hold the requested changes for next boot
-P (parse) Use the special parsable output format.
-S Display only elements that have been set to something other than default
-v (verbose) Display items using verbose output format
kctune:
kctune commad is used to get information about tunable parameters and their values, and makes changes to tunable values
To set a tunable value on the running system:
$ kctune tunable=12
To set a tunable value to be used when the system reboots:
$ kctune -h tunable=12 To increase a tunable's value by 100:
$ kctune tunable+=100 To see all tunables and their current values:
$ kctune To see which tunables have new values being held until next boot:
$ kctune -D To see verbose information about a tunable:
$ kctune -v tunablename To sort the output (group) by tunables name
$ kutune -g
kcmodule
To display the Kernel moudles status of KeyboardMUX PCItoPCI autofs cachefs
# kcmodule KeyboardMUX PCItoPCI autofs cachefs Module State Cause Notes KeyboardMUX unused PCItoPCI static depend autofs static best cachefs auto best auto-loadable, unloadable
The -d option adds the description of each module.
# kcmodule -d PCItoPCI cachefs
Module State Cause Notes
Description
PCItoPCI static depend
Generic PCI to PCI Bridge Adapter CDIO
cachefs auto best auto-loadable, unloadable
Cache File System
The -v option gives verbose, multiline information about each module:
# kcmodule -v autofs
Module autofs (1.0)
Description Automounter File System
Timestamp Tue Sep 12 21:53:28 2006 [45078EC8]
State static (best state)
State at Next Boot static (best state)
Capable static unused
Depends On module nfswrp:0.0.0
interface HPUX_11_31_PERF:1.0
To change the state of a module
# kcmodule cdfs=loaded
# kcmodule cdfs=best (same as previous command)
To unload it:
# kcmodule cdfs=unused
kconfig
When you run kconfig with no options, it shows you the saved configurations on your system. There will always be a saved configuration called backup, which is automatically maintained by the system; any other saved configurations on the system will also be listed
With no options, the output looks like this:
# kconfig
Configuration Title
backup Automatic Backup
day Configuration for daytime multiuser processing
last_install Created by last OS install
The -v option gives verbose, multiline information about each saved configuration:
# kconfig -v day
Configuration day
Title Configuration for daytime multiuser processing
Created Thu Oct 12 01:33:36 2006 by allanp
as a copy of ’last_install’
Modified Thu Oct 12 01:37:14 2006 by allanp
Kernel Path /stand/day/vmunix
To save the currently running config to myconfig
# kconfig -s
# kconfig -v myconfig
Configuration myconfig
Title
Created Wed Mar 3 14:35:31 2010 by jkailasa
by saving the running configuration
Kernel Path /stand/testconfig/vmunix
To load a saved config to a running kernel
# kconfig -l myconfig
kclog
To see the last three entries in the log:
$ kclog 3 To see the last entry for the tunable nproc:
$ kclog -t tunable -n nproc To see the last five entries for module changes:
$ kclog -t module 5
Managing Configurations with System Files
Every kernel configuration has a corresponding system file. A system file is a flat text file that describes all of the configuration settings in a compact, machine-readable, portable format. System files provide an alternate mechanism for kernel configuration, because configuration changes can be made by editing a system file and then telling the kernel configuration tools to apply the changes.- The system automatically maintains system files for each configuration.
- The system file for the currently running configuration is located at /stand/system.
- The system file for any saved configuration is located at /stand/configname/system.
If you want to create a new system file for a configuration, use the kconfig -e (export) command.
To export the running configuration:
# kconfig –e filename
To Export a already saved configuration:
# kconfig –e configname filename
Once you have a system file, you can edit it using any text editor, making the changes
you desire. After editing it, you can apply the changes with the kconfig -i (import)
command.
you desire. After editing it, you can apply the changes with the kconfig -i (import)
command.
To Import to the running configuration now:
# kconfig -i filename
To Import and hold for next boot:
# kconfig -h -i filename To Import to saved configuration:
# kconfig -i configname filename
Booting a saved configuration or in Fail-safe Mode
In extreme circumstances, a mistaken configuration change can result in a kernel configuration that won’t boot. In these cases, you have two options: boot a different configuration, such as the automatic backup configuration, and/or boot in fail-safe mode (
Integrity
To boot a saved configuration on an Integrity system,
To boot a saved configuration on an Integrity system,
- interrupt the automatic boot process when it reaches the point that it has started the HP-UX boot loader. (On most
- At the HPUX> prompt, type
HP 9000
To boot a saved configuration on an HP 9000 system,
To boot a saved configuration on an HP 9000 system,
- Interrupt the automatic boot process when you arrive at the boot console handler.
- Tell it to boot from the desired device (typically with a boot pri command).
- When it asks if you want to interact with the ISL or IPL, say Yes.
- At the ISL> prompt, type
ISL>hpux myconfig/vmunix
To Boot in Fail-Safe mode on Integrity servers
hpux> boot -tm
To boot in Fail-Safe mode in HP 9000
ISL> hpux -tm
Modifying Tunable Values at boot time
To boot the myconfig configuration and set nproc to 6000, the minimum commands would be:
HPUX> boot myconfig nproc=6000 # For Integrity
ISL> hpux myconfig/vmunix nproc=6000 # For HP 9000
To boot the myconfig configuration and set nproc to 6000, the minimum commands would be:
HP-UX kernel configuration tool
kcweb is used to manage kernel tunables, modules and alarms. It provides both Web-based and terminal user interface. The Web-based interface is launched through the HP System Management Homepage. Please find bellow the screen shot of kcweb in terminal mode# kcweb Kernel Configuration ----------------------------------------------------------------------------------------------- t - Tunables View or modify kernel tunables m - Modules View or modify kernel modules and drivers a - Alarms View or modify alarms for kernel tunables l - Log Viewer View the changes made to kernel tunables or modules u - Usage View usage of kernel tunables c - Manage Configuration View the options available to manage configurations b - Restore Previous Boot Values Restores Previous Boot Values for Tunables And Modules ----------------------------------------------------------------------------------------------- x-Exit smh ENTER-Select ESC-Back 1-Help Kernel Configuration->Tunables (All) ------------------------------------------------------------------------------------------------------------------------------------ Tunable Tuning Current Next Boot Default Usage Module Capability Value Value Value ==================================================================================================================================== NSTREVENT Static 50 50 50 - hpstreams NSTRPUSH Static 16 16 16 - hpstreams NSTRSCHED Static 0 0 0 - hpstreams STRCTLSZ Static 1024 1024 1024 - hpstreams STRMSGSZ Static 0 0 0 - hpstreams acctresume Static 4 4 4 - pm_acct acctsuspend Static 2 2 2 - pm_acct aio_iosize_max Dynamic 0 0 0 - aio aio_listio_max Dynamic 256 256 256 - aio aio_max_ops Dynamic 2048 2048 2048 - aio aio_monitor_run_sec Dynamic 30 30 30 - aio aio_physmem_pct Dynamic 10 10 10 - aio aio_prio_delta_max Dynamic 20 20 20 - aio aio_proc_max Dynamic 0 0 0 - aio aio_proc_thread_pct Dynamic 70 70 70 - aio aio_proc_threads Dynamic 1024 1024 1024 - aio ---------------------------------------------------------------------------------------------------------------------------SCROLL \/ x-Exit smh ESC-Back p-Pending b-Restore Previous Boot Values 2-kctune Manpage /-Search ENTER-Details m-Modify d-Dynamic 1-Help 3-Tunable Manpage
Managing kernel in older HP-UX (11i v.1 and older)
kmtunekmtune command query, set, or reset system parameters. kmtune displays the value of all system parameters when used without any options or with the -S or -l option.
By default, kmtune's changes affect the currently
running kernel configuration, marked to take effect at next boot. If
the -u option is specified, kmtune's changes affect the current
configuration, and take effect immediately.
-l Print a detailed report
-q name Query the value of the specified system parameter
-s name{=|+}value Set the value of the specified system parameter
-S system_file Specify the HP-UX system description file name.
If not specified, /stand/system is used as the default
-r Reset the value of the specified system parameter to default
-u Update the current kernel configuration. This modifies the -s and -r
options so that their effects take effect immediately rather than at next boot.
Note: kmtune is an obsolete command that is replaced by kctune in the newer version of HP-UX
# kmtune -q shmseg Parameter Value shmseg 120 # kmtune -s shmseg=128 # kmtune -l -q shmseg Parameter: shmseg Value: 128 Default: 120 Minimum: - Module: # kmtune -r shmseg # kmtune -q shmseg Parameter Value shmseg 120
kmsystem - set, query configuration and loadable flags for a module
-c value Set the configuration status of module_nameto value.
Value must be Y or y to configure the module, or N or n to
not configure it.
-q Print the loadable and configuration flag information for
module_name. If the loadable information does not apply,
then a - is printed.
To add the tape drive support:
# kmsystem -q stape
Module Configured Loadable
stape
# kmsystem -S /stand/build/system | grep stape
stape N -
# kmsystem -S /stand/build/system -c Y stape
# kmsystem -S /stand/build/system | grep stape
stape Y -
#/usr/sbin/mk_kernel -s /stand/build/system
# mv /stand/system /stand/system.prev
# mv /stand/build/system /stand/system
# /usr/sbin/kmupdate
Kernel update request is scheduled.
Default kernel /stand/vmunix will be updated by
newly built kernel /stand/build/vmunix_test at next system shutdown or
startup time.
/usr/conf - supported device drivers and sub systems
kmupdate - this command is used to update the kernel file.
To rebuild the kernal:
- Go to /stand/build directory
- /usr/lbin/sysadm/system_prep -s system # creates the system file
- edit the system file as required using vi
- mk_kernel -s ./system # creates the new kernel file using system fiel. It creates a kernel file ./vmunix_test
- backup the old kernel and the system files
- cp /stand/system /stand/system.old
- cp /standvmunix /stand/vmunix.old
- Install the new kernel
- mv /stand/build/system /stand
- mv /stand/build/vmunix_test /stand/vmunix
- Reboot the system
Devices
ioscan scans system hardware, usable I/O system devices, or kernel I/O system data structures as appropriate, and lists the results. For each hardware module on the system, ioscan displays by default the hardware path to the hardware module, the class of the hardware module, and a brief description.
ioscan -N displays output using the agile view instead of the legacy view -s lists the stale entries present in the system -b Explicitly defers a binding operation until the next reboot. -B Lists any pending deferred binding operations -r Removes any pending deferred binding operations.
–b, -r, -B Initiates, removes, and lists deferred bindings.
The existing –M and –H options force a named driver to bind to a specified hardware path. If that driver does not support online binding or the currently bound driver cannot unbind, then the binding operation is deferred until the next reboot. The –b option explicitly requests a deferred binding rather than an immediate one. The -r option, when used with the -H option, removes a deferred binding. The -B option lists all deferred bindings.
lssf and rmsf for stale devices
lssf -s # Displays stale DSFs—devices that have no associated hardware. rmsf -x # Removes stale entries from the I/O configuration as well as their associated DSFs.
To list all the fibre scsi cards on a HP-UX system
ioscan -fnC fc Class I H/W Path Driver S/W State H/W Type Description fc 0 0/8/0/0 td CLAIMED INTERFACE HP Tachyon XL2 Fibre Channel Mass Storage Adapter /dev/td0 fc 1 1/10/0/0 td CLAIMED INTERFACE HP Tachyon XL2 Fibre Channel Mass Storage Adapter /dev/td1
To list the physical memory present
# ioscan -Fnc memoryTo List all the disks
# ioscan -FunC disksTo find out number of Processors
# ioscan -FnC processorTo find out the number of ethernet cards
# ioscan -FnC lanTo find the system type and user license
# uame -a
To find the model number
# model
To find the system serial number
# getconf MACHINE_SERIAL
To get the ioscan output in single line for all disks
# ioscan -funC disk | awk '$1=="disk" { getline L2; print $0,L2 }'
To get only the claimed disks and remove extra spaces
# ioscan -funNC disk | awk '{if ($5=="CLAIMED") {L1=$0;getline; sub (" *","");print L1,$0}}' # ioscan -funC disk | awk '$1=="disk" {L1=$0;getline; sub (" *",""); print L1,$0}'
Support Tools Manager
stm - Runs support tools manager mstm - Menu Based STM running from terminals cstm - Command based STM xstm - Xwindows based STM
It allows you to access and run various support
tools (information modules, firmware update tools, verifiers,
diagnostics, exercisers, and utilities, depending upon your level of
licensing privilege) on one or more PA-RISC machines
To get the processor information using cstm
# cstm Running Command File (/usr/sbin/stm/ui/config/.stmrc). -- Information -- Support Tools Manager Version C.56.00 --- --- cstm> map ## To list all the devices cstm> select device <device #> cstm> info cstm> infolog
To list the WWN, linkspeed, current status of fibre adapters
# fcmsutil /dev/td1 Vendor ID is = 0x00103c Device ID is = 0x001029 XL2 Chip Revision No is = 2.3 PCI Sub-system Vendor ID is = 0x00103c PCI Sub-system ID is = 0x00128c Topology = PTTOPT_FABRIC Link Speed = 2Gb Local N_Port_id is = 0x632b13 N_Port Node World Wide Name = 0x50060b000024eda9 N_Port Port World Wide Name = 0x50060b000024eda8 Driver state = ONLINE Hardware Path is = 1/10/0/0 Number of Assisted IOs = 120739 Number of Active Login Sessions = 1 Dino Present on Card = NO Maximum Frame Size = 2048 Driver Version = @(#) PATCH_11.11: libtd.a : Dec 12 2003, 14:34:15, PHSS_28509 # machinfo CPU info: 4 Intel(R) Itanium 2 9100 series processors (1.42 GHz, 12 MB) 532 MT/s bus, CPU version A1 8 logical processors (2 per socket) Memory: 65504 MB (63.97 GB) Firmware info: Firmware revision: 04.03 FP SWA driver revision: 1.18 IPMI is supported on this system. BMC firmware revision: 5.23 Platform info: Model: "ia64 hp server rx6600" Machine ID number: df386377-1d23-11de-978b-4f36ee938173 Machine serial number: USE49087YK OS info: Nodename: aemtest2 Release: HP-UX B.11.31 Version: U (unlimited-user license) Machine: ia64 ID Number: 3745014647 vmunix _release_version: @(#) $Revision: vmunix: B.11.31_LR FLAVOR=perf
Disks
To set the queue depth of a disk to 32 from default value of 8# scsictl -m queue_depth=32 /dev/rdisk/disk14
To display the data moved through each lun path
# iostat -L 5 lunpath bps sps msps disk16_lunpath6 3046 70.1 1.0 disk17_lunpath7 3288 26.1 1.0 disk16_lunpath11 3035 70.1 1.0 disk17_lunpath12 3289 26.1 1.0 disk16_lunpath6 14950 272.5 1.0 disk17_lunpath7 17072 42.9 1.0 disk16_lunpath11 15286 272.3 1.0 disk17_lunpath12 16929 43.1 1.0 disk16_lunpath6 12118 194.0 1.0 disk17_lunpath7 18365 45.6 1.0 disk16_lunpath11 12121 194.0 1.0 disk17_lunpath12 18486 45.6 1.0
Locating the SAS drives in integrity servers
01. Scan the SAS controllers in the sytem# ioscan -fnkd sasd Class I H/W Path Driver S/W State H/W Type Description escsi_ctlr 0 0/4/1/0 sasd CLAIMED INTERFACE HP PCI/PCI-X SAS MPT Adapter /dev/sasd002. Get the Bay details for each drives
# sasmgr get_info -D /dev/sasd0 -v -q lun=all -q lun_locate LUN LUN HW Path Enc Bay Locate LED === === === /dev/rdsk/c6t0d0 0/4/1/0.0.0.0.0 1 5 OFF /dev/rdsk/c6t1d0 0/4/1/0.0.0.1.0 1 6 OFF /dev/rdsk/c6t3d0 0/4/1/0.0.0.3.0 1 8 OFF /dev/rdsk/c6t4d0 0/4/1/0.0.0.4.0 1 7 OFF # sasmgr get_info -D /dev/sasd0 -q raid Wed Jan 19 17:34:15 2011 ---------- PHYSICAL DRIVES ---------- LUN dsf SAS Address Enclosure Bay Size(MB) /dev/rdsk/c6t0d0 0x5000c50005273005 1 5 70007 /dev/rdsk/c6t1d0 0x5000c5000526b285 1 6 70007 /dev/rdsk/c6t3d0 0x500000e012b795d2 1 8 70007 /dev/rdsk/c6t4d0 0x5000c5002beae9cd 1 7 70007
03. To make the locate LED on for disk /dev/rdsk/c6t4d0
# sasmgr set_attr -D /dev/sasd0 -q lun=/dev/rdsk/c6t4d0 -q locate_led=on Locate LED set to ON. # sasmgr get_info -D /dev/sasd0 -v -q lun=all -q lun_locate LUN LUN HW Path Enc Bay Locate LED === === === /dev/rdsk/c6t0d0 0/4/1/0.0.0.0.0 1 5 OFF /dev/rdsk/c6t1d0 0/4/1/0.0.0.1.0 1 6 OFF /dev/rdsk/c6t3d0 0/4/1/0.0.0.3.0 1 8 OFF /dev/rdsk/c6t4d0 0/4/1/0.0.0.4.0 1 7 ON
04. After maintenance, bring the locate LED off
# sasmgr set_attr -D /dev/sasd0 -q lun=/dev/rdsk/c6t4d0 -q locate_led=off Locate LED set to OFF
Ignite-UX
To add a new client to the Ignite UX server, from the client
# add_new_client -s <server_name> -R <release name> [-f] [-d]
-f overwrite existing client information files in the /var/opt/ignite/clients/0xLLA
(eg) # add_new_client -s 216.226.174.37 -f
To change the system name on ignite:
01. Change the IP address and hostname on /etc/hosts
02. Change the link name to new name on /var/opt/ignite/clients
03. Change the client_name file under /var/opt/ignite/clients/<hostname)/
04. Change the entries in /etc/bootptab or /etc/opt/ignite/instl_boottab
---
To LAN Boot the itanium based servers
From EFI Shell, create the Direct Boot Profile
Shell> dbprofile
Profile List
Shell> dbprofile -dn ignite -sip 216.226.174.37 -cip 216.226.174.88 -gip 216.226.174.2 -m 255.255.255.0 -b "/opt/ignite/boot/nbp.efi"
Creating profile ignite
Shell> dbprofile
Profile List
Profile Name: ignite
Network Type: IPv4
Client IP address: 216.226.174.88
Gateway IP address: 216.226.174.2
Subnet Mask: 255.255.255.0
Server IP address: 216.226.174.37
Boot File: /opt/ignite/boot/nbp.efi
Optional Data:
Shell> lanboot select -dn ignite
/opt/ignite/boot/AUTO file
While trying to install HP-UX from ignite server using software depot, if the desired OS version is not available for selection to the client systems, make sure /opt/ignite/boot/AUTO files contains the necessary entry for the OS level you are trying to install.
Example: While trying to install HP-UX 11.31, the OS
version selection was not available for the client. The contents of AUTO
was
# cat /opt/ignite/boot/AUTO
KernelPrompt "Choose an operating system to install that your hardware supports:" 120 1
reset
"target OS is B.11.23 IA" boot Rel_B.11.23/IINSTALL
"Exit Boot Loader" exit
After adding the follwing line, it was possible to select HP-UX 11.31
"target OS is B.11.31 IA" boot Rel_B.11.31/IINSTALL
# cat /opt/ignite/boot/AUTO
KernelPrompt "Choose an operating system to install that your hardware supports:" 120 1
reset
"target OS is B.11.23 IA" boot Rel_B.11.23/IINSTALL
"target OS is B.11.31 IA" boot Rel_B.11.31/IINSTALL
"Exit Boot Loader" exit
Creating HP-UX OE Depot for client Installation
01. Copy the OE DVD contents to IGNITE-UX server. We can either use make_depot command or swcopy command# /opt/ignite/bin/make_depots -s /dev/dsk/c1t2d0 \ -d /var/opt/ignite/depots/Rel_B.11.23/HAOE OR # swcopy -s /dev/dsk/c1t2d0 \* @ /export/ignite/depots/Rel_B.11.31/HAOE 02. Create HP-UX OE Configuration Information on the Ignite-UX Server
# /opt/ignite/bin/make_config -s /export/ignite/depots/Rel_B.11.31/HAOE \ -c /var/opt/ignite/data/Rel_B.11.31/HAOE_cfg NOTE: make_config can sometimes take a long time to complete. Please be patient! 03. Add the Configuration Information to the Ignite-UX INDEX file. First copy the default "HP-UX B.11.31 Default" clause to a new clause called "HP-UX B.11.31 HAOE March 2009". After creating the new clause, add the configuration file we created in the last step to the new clause.
# /opt/ignite/bin/manage_index -n "HP-UX B.11.31 Default" \ -c "HP-UX B.11.31 HAOE March 2009" # /opt/ignite/bin/manage_index -a -f /var/opt/ignite/data/Rel_B.11.31/HAOE_cfg \ -c "HP-UX B.11.31 HAOE March 2009" 04. View the description of the newly created configuration clause
# manage_index -x -c "HP-UX B.11.31 HAOE March 2009" This selection supplies the default system configuration that HP supplies for the B.11.31 release. 05. Change the description to something meaningful
# manage_index -c "HP-UX B.11.31 HAOE March 2009" \ -y "HP-UX B.11.31 HAOE from March 2009 Media" 06. Verify that Description is changed
# manage_index -x -c "HP-UX B.11.31 HAOE March 2009" HP-UX B.11.31 HAOE from March 2009 Media
More Information, refer Ignite-UX Quick Start Guide
Golden Image
Before taking golden image, Install Fresh OS. Apply required patches. Install additional software. Customize the system as required. Do not use the system while taking the Golden Image. While running make_sys_image, the device files are removed, the host and networking information on the system is reset. After the command is complete, these files are put back. By default, make_sys_image stores the archive in /var/tmp directory. We can also the save the archive in remote system.
01. Copy /opt/ignite/data/scripts/make_sys_image to /tmp. Set the permission to 755.
02. Create a directory to store the golden image
03. Take the Golden Image
# /tmp/make_sys_image -d <directory_to_place_Image> -s local -n image_name.gz
or to store the image in a remote system
# /tmp/make_sys_image -d <directory_to_place_Image> -s <remote_system_IP address>
02. Create a directory to store the golden image
03. Take the Golden Image
make_sys_image is a shell script. By default,
certain files are reset to default initial settings while we use level 2
(-l 2) backup which is the default level. These files are listed under LEVEL2_RESET variable in make_sys_image script. There is also another variable called LEVEL2_NO_ARCHIVE.
Files listed under this variable are altogether skipped from backup. If
we don't want to exclude the files listed under this sections, simply
edit the script.
Configure the Ignite Server to recognize the golden Image
Create the Ignite-UX configuration file for the golden image. We can use the example file /opt/ignite/data/examples/B.11.31.golden_image.cfg
01. Copy the example configuration file to /var/opt/ignite/data/Rel_B.11.31 directory
# cp /opt/ignite/data/examples/B.11.31.golden_image.cfg\
/var/opt/ignite/data/Rel_B.11.31/golden_image_11.31_cfg
02. Modify the golden_image_11.31_cfg file to
set up the golden image NFS transfer. In the sw_source clause, change
the nfs_source to the NFS server name and exported directory name. Make
sure to use the IP address instead of hostname since the loading of NFS
image may fail if hostname is used.
nfs_source = "192.168.248.237:/backup/AEM/ignite/golden_images"
03. In the sw_sel clause, change the archive
path. If the full path of the archive is
192.168.248.237:/backup/AEM/ignite/golden_images/Rel_B.11.31/goldserver.gz,
just add Rel_B.11.31/goldserver.gz alone.
archive_path = "Rel_B.11.31/aemtest2.gz"
04. Run the archive_impact command and get archive impact values
/opt/ignite/lbin/archive_impact -t -g <archive_file_name>
05. Include the results in the configuration file, replacing the example impacts line.
06. Add the new configuration file (golden_image_11.31_cfg) to /var/opt/ignite/INDEX file.
cfg "HP-UX B.11.31 Golden Image" {
description "Default system configuration for B.11.31 release."
"/opt/ignite/data/Rel_B.11.31/config"
"/opt/ignite/data/Rel_B.11.31/hw_patches_cfg"
"/var/opt/ignite/data/Rel_B.11.31/golden_image_cfg"
"/var/opt/ignite/config.local"
}
The config and config.local files contains
default configuration. config.local should be the last file in the cfg
clause. The opt/ignite/data/Rel_B.11.31/config supplies the disk and
file system layout default plus other control information required by
Ignite-UX.
07. Make sure the the target system can access the archive file using NFS.
Now, the above cfg clause appears as an available configuration to Ignite-UX.
Cloning a system using make_net_recovery
01. Create the system recovery image of the system to be cloned using "make_net_recovery" command
02. The recovery configurations and archives created
by make_net_recovery are stored in a separate directory on Ignite-UX
server for each client. If the client to be installed does not currently
have a directory in /var/opt/ignite/clients but is up and running,
create the directory using "Add new Client for Recovery" from Actions
menu on Ignite-UX GUI (From server). Alternatively, we can also run add_new_client -s <ignite-ux_server_name>
from the client. If the client is not running, you will have to boot
the system from the Ignite-UX server to get the directory created.
03. Copy the CINDEX and recovery directory from the source client to the target client directory. If the CINDEX file already exits, either create a backup copy of the CINDEX or edit the CINDEX file to add the desired entries from the source client.
cd /var/opt/ignite/clients/src_client_name
find CINDEX recovery | cpio -pdvma ../target_client_name
04. Give the target client NFS access to recovery image of the source system
03. Copy the CINDEX and recovery directory from the source client to the target client directory. If the CINDEX file already exits, either create a backup copy of the CINDEX or edit the CINDEX file to add the desired entries from the source client.
05. Boot the target client from the ignite-UX server
06. Change the system networking parameters for the client during installation
For more information, refer Cloning Using Ignite-UX.PDF
To restore individual files form make_net_recovery
01. Using gzcat and pax to restore /etc/hosts file
# gzcat <image_name> | pax -r -f - etc/hosts Note: There should not be any leading slash in the file to be recovered. The file will be restored to the current directory.
02. Usng gzcat and tar
# gzcat <image_name> | tar -xvf - etc/hosts
/etc/opt/ignite/instl_boottab
/etc/bootptab
Network
01. Configuring Network in HP-UX
02. Network Interface Cards (NIC) Management
03. Netstat and Traceroute tips
04. Autoport Aggregator (NIC Bonding)
05. Network Tracing and logging
06.Setting up FTP (wuftp) in chroot jail
07.Setting up SFTP (Secure FTP) in chroot jail
02. Network Interface Cards (NIC) Management
03. Netstat and Traceroute tips
04. Autoport Aggregator (NIC Bonding)
05. Network Tracing and logging
06.Setting up FTP (wuftp) in chroot jail
07.Setting up SFTP (Secure FTP) in chroot jail
HP-UX stores network interface configuration information on /etc/rc.config.d/netconf file.
# cat /etc/rc.config.d/netconf HOSTNAME="it-hp49" OPERATING_SYSTEM=HP-UX LOOPBACK_ADDRESS=127.0.0.1 INTERFACE_NAME[0]="lan0" IP_ADDRESS[0]="216.131.195.137" SUBNET_MASK[0]="0xffffff00" BROADCAST_ADDRESS[0]="216.131.195.255" INTERFACE_STATE[0]="" DHCP_ENABLE[0]=0 ROUTE_DESTINATION[0]="default" ROUTE_MASK[0]="" ROUTE_GATEWAY[0]="216.131.195.10" ROUTE_COUNT[0]="1" ROUTE_ARGS[0]=""
To add a alias address to lan0, add the network information to /etc/rc.config.d/netconf file
INTERFACE_NAME[0]=lan0:1 IP_ADDRESS[0]=216.131.195.138 SUBNET_MASK[0]=255.255.255.0 BROADCAST_ADDRESS[0]="" INTERFACE_STATE[0]="" DHCP_ENABLE[0]=0 INTERFACE_MODULES[0]=""
Restart the network service
/sbin/init.d/net start
Network Interface Card Management
The following commands are used to view and manage various NIC settings.- lanscan
- lanadmin
- nwmgr (new in 11i v3)
lanscan
To display the network interface cards and status
To display the network interface cards and status
# lanscan Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI Path Address In# State NamePPA ID Type Support Mjr# 0/0/0/0 0x00306E1CC281 0 UP lan0 snap0 1 ETHER Yes 119 1/12/0/0 0x00306E210F32 3 UP lan3 snap3 2 ETHER Yes 119
lanadmin
To configure the NIC cards such as speed, MTU, etc..
To configure the NIC cards such as speed, MTU, etc..
# lanadmin (it is a interactive tool)
To find out the speed of duplex setting of lan0
# lanadmin -x 0 Speed = 1000 Full-Duplex. Autonegotiation = On.
nwmgr (Network Interface Management)
The nwmgr program is the unified command to administer all HP-UX LAN and RDMA interfaces. This command can be used to:
The nwmgr program is the unified command to administer all HP-UX LAN and RDMA interfaces. This command can be used to:
- Display information of an interface
- Modify settings of an interface
- Reset the interface or its statistics
- Diagnose link connectivity
- Create and set configuration information for a component simultaneously
- Delete or erase components
# nwmgr Name/ Interface Station Sub- Interface Related ClassInstance State Address system Type Interface ============== ========= ============== ======== ============== ========= lan2 DOWN 0x001A4B096828 iether 1000Base-T lan0 UP 0x001A4B097F9A iether 1000Base-T lan1 DOWN 0x001A4B097F9B iether 1000Base-T
# nwmgr --help -S all # lists all the subsystems # nwmgr --help -S subsystem # display subsystem specific usageTo View Interface attributes
# nwmgr -A all -c lan0 lan0 current values: Link State = Up Speed = 1 Gbps Full Duplex (Autonegotiation : On) MTU = 1500 MAC Address = 0x001a4b097f9a Receive Flow Control = On Transmit Checksum Offload = Off Receive Checksum Offload = Off Virtual MTU = 0 TCP Segmentation Offload is now disabled. Max Send Buffers = 1 Max Send Coalesce Ticks = 150 Max Recv Buffers = 1 Max Recv Coalesce Ticks = 0 Interrupt Throttle Mode = -1 Diagnostics Threshold = 0 512byte transmit buffer size limit = 0
To get interface statistics for interface lan0
# nwmgr --st all -c lan0
To View interface details
# nwmgr -q info -c lan0
To get interface vital product data
# nwmgr -q vpd -c lan0
To set interface attributes
# nwmgr -s -A attr1-value, attr2=value ... -c lan0
Reset statistics for an interface
# nwmgr -r --st -c lan<instance>
Some nwmgr Syntax and their Equivalent lanadmin and linkloop Syntax are given bellow
nwmgr -S vlan lanadmin -V scan nwmgr -c lan5000 lanadmin -V info 5000 nwmgr -a -S vlan -A vlanid=10, ppa=1 lanadmin -V create vlanid 10 1 nwmgr -s -c lan5000 -A vlanid=20 lanadmin -V modify vlanid 20 5000 nwmgr -d -c lan5000 lanadmin -V delete 5000 nwmgr --cra -c lan5000 lanadmin -p 5000 nwmgr --diag -c lan5000 -A dest=0xaabbccddeeff linkloop -i 5000 0xaabbccddeeff
APA (Auto Port Aggregator)
/sbin/init.d/hpapa/sbin/init.d/lm
netstat and traceroute tips
To list all the configured interfaces and IP addresses# netstat -in
To force HP-UX to use specific interface card
# traceroute -i lan2 10.20.30.40
Network Tracing and logging
Network Tracing and LoggingThe nettl command is a tool used to capture network events or packets.
Initialize the tracing/logging facility:
# nettl -start
Display the status of the tracing/logging facility.
# nettl -status all
How to setup FTP in chroot jail?
01. Create a group called 'ftpusers'
02. Create a user called 'user1' and make the default shell as /usr/bin/false. Add the user to "ftpusers' group.
03. Modify the home directory of the user if required.
user1:x:1001:500:FTP user:/home/ftphome/./user1:/usr/bin/falseThe above line make the home directory of FTP user user1 as /home/ftphome. However when user1 logs in, /./user1 after /home/ftphome makes the user goes to /user1 instead of /.
02. Create a file called /etc/shells if not already present
# touch /etc/shells03. Add "/usr/bin/false" to /etc/shells
# echo "/usr/bin/false" >> /etc/shells04. Create /etc/ftpd/ftpaccess file as follows. The last line adds ftpuser unix group to guestgroup. Now, all the users in ftpusers group will be chrooted to their home directory. A sample file is there in /usr/newconfig/etc/ftpd/examples directory
class all real,guest,anonymous *
limit all 40 Any /etc/msgs/msg.dead
readme README* login
readme README* cwd=*
message /welcome.msg login
message .message cwd=*
compress yes all
tar yes all
log commands real
log transfers anonymous,real inbound,outbound
shutdown /etc/shutmsg
guestgroup ftpgroup
05. Modify the inetd.conf file for ftp entry to usr /etc/ftpd/ftpaccess file
ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l -a /etc/ftpd/ftpaccess06. Restart the inetd daemon
# inetd -c07. Create usr/bin directory in user1's home directory and copy /sbin/ls to it.
# cd /home/ftphome; mkdir -p usr/bin # cp /sbin/cp usr/bin/Now, if user1 log in to the system, he would be chroot to his home directory.
How to Setup Secure FTP (SFTP) in chroot jail in HP-UX?
01. Download and install the latest OpenSSH software from software.hp.com
02.Create a user called "user1" and setup password for that user
03. Make sure that user is able to login to the system using his password
04. Make the user to sftponly user by running the following command. Follow the instructions.
# /opt/ssh/utils/ssh_chroot_setup.sh05. The above command will create the necessary ftp directory structure. If /ftproot was selected as the root directory for the user, then all the /usr, /etc, /dev, /bin directory structure and the required commands like ls, cd, mv, etc.. are copied to the directory structure created.
06. Copy /opt/ssh/utils/sftponly to /bin and /ftproot/bin directory
# cp /opt/ssh/utils/sftponly # cp /opt/ssh/utils/sftponly /ftproot/bin/sftponly
07. Add /bin/sftponly entry to /etc/shells file
# echo "/bin/sftponly" >> /etc/shells
08. Modify the user1's home directory and shell in /etc/password as follows.
user1:x:1000:1000:chrooted user:/ftproot/./home/user1:/bin/sftponly
09. Make sure the user1 home directory is created if not already created
# mkdir -p /ftproot/home/user1 # chown user1 ftproot/home/user1
09. Now, the user is jailed within /ftproot
directory. Also, user1 can not login to the system using ssh since his
shell is set as /bin/sftponly.
Network File system
- HP-UX 11i v1 and 11i v2 supports NFS v2 and v3.
- HP-UX 11i v3 supports NFS v2, v3 and v4.
Advantages of NFS v3
- Files of sizes up to 128GB
- Uses TCP versus UDP in v2
- Enhanced Performance
- AutoFS is supported versus automounter in v2
Advantages of NFS v4
- Enhanced Security
- Scalability
- Better cross platform interoperability
- Works better through firewall and on the internet
NFS v3 is still the default protocol for NFS in v3.
Some Important files to remember
- /etc/dfs/dfstab # Replaces /etc/exports file
- /etc/dfs/sharetab # Contains a list of shared resources
- /etc/rmtab # contains list of shared resources which are mounted by clients
AutoFS
cifs
To mount a windows share in HP-UX
01. Edit /etc/rc.config.d/cifsclient and make "RUN_CIFSCLIENT=1"
02. Start the cifsclient daemon ry running
02. Start the cifsclient daemon ry running
# /sbin/init.d/cifsclient start03. Make sure the Windows System Name is listed in /etc/hosts file with short and fully qualified domain name
192.168.1.10 testsystem.testdomain.local testsystem04. Mount the file system using cifsmount command
# cifsmount -U <username> -P <passwd> -D <domain_name,optional> //system_name/share_name /Mount_point05. Run cifslist to list all the connected shares
cifslist Mounted Object Mountpoint State ------------------------------------------------------------------------------- \\testsytem\share1 /mnt M Server Local User Remote User Domain State ------------------------------------------------------------------------------- testsystem root testuser domain L
Make the file system to mount automatically using /etc/fstab
01. Add the entry to /etc/fstab file.
01. Add the entry to /etc/fstab file.
cifs_server_name:/share_name /mount_point cifs defaults 0 0NOTE: The cifs_server_name MUST be a WINS name!!
02. Do a cifslogin for the user with the '-s' option
to save the password in a user database
(/var/opt/cifsclient/cifsclient.udb)
# cifslogin -s -U <user_name> -P <password> -D <Domain_name> cifs_server_name
03. Check to make sure the password db was created
# ll /var/opt/cifsclient/cifsclient.udb
04. Mount the file system
# mount /mount_point
Make the file system available to other users other than root
The user which use to login on hpux server should have the required permission. Otherwise he will not be able to access the files under the cifs filesytem. To give access to "user5" to the cifs file syste,
The user which use to login on hpux server should have the required permission. Otherwise he will not be able to access the files under the cifs filesytem. To give access to "user5" to the cifs file syste,
01. Login to the UNIX system as "user5"
02. Save the CIFS user/password credentials
02. Save the CIFS user/password credentials
$ cifslogin -s -U <user_name> -P <password> -D <Domain_name> cifs_server_name03. Verify if the new user is added using cifslist command
cifslist Mounted Object Mountpoint State ------------------------------------------------------------------------------- \\testsytem\share1 /mnt M Server Local User Remote User Domain State ------------------------------------------------------------------------------- testsystem root testuser domain L testsystem user5 testuser domain L04. After successful login, user5 will be able to access the CIFS share.
Tips
NFS Stale File handle error# fuser -cu <mount_point> # /sbin/init.d/nfs.client stop # /sbin/init.d/nfs.server stop # /sbin/init.d/nfs.core stop # /sbin/init.d/nfs.client start # /sbin/init.d/nfs.server start # /sbin/init.d/nfs.core start
Service Guard
Fundas:
The three central components of Serviceguard arePackage Manager
Cluster Manager
Network Manager
A manual startup forms a cluster out of all the nodes
in the cluster configuration. Manual startup is normally done the first
time you bring up the cluster, after cluster-wide maintenance or
upgrade, or after reconfiguration.
The system administrator starts the cluster in
Serviceguard Manager or with the cmruncl command issued from one node.
The cmruncl command can only be used when the cluster is not running,
that is, when none of the nodes is running the cmcld daemon.
Automatic cluster startup will take place if the flag
AUTOSTART_CMCLD is set to 1 in the /etc/rc.config.d/cmcluster file. When
any node reboots with this parameter set to 1, it will rejoin an
existing cluster, or if none exists it will attempt to form a new
cluster.
Service Guard Daemons:
- /usr/lbin/cmclconfd - SG Configuration Daemon
- /usr/lbin/cmcld - SG Cluster Daemon
- /usr/lbin/cmlogd - SG Syslog Daemon
- /usr/lbin/cmlvmd - SG LVM Daemon
- /usr/lbin/cmsnmpd - SG Cluster SNMP subagent
- /usr/lbin/cmnetd - SG Network Manager Daemon
- /usr/lbin/qs - SG Quarum Server daemon
- /usr/lbin/cmlockd - SG lock LUN Daemon
cmclconfd: This daemon is
used by the Serviceguard commands to gather information from all the
nodes within the cluster. It gathers configuration information such as
information on networks and volume groups. It also distributes the
cluster binary configuration file to all nodes in the cluster. This
daemon is started by inetd.
cmcld: Two of the central components
of SG - Package Manager and Cluster Manager - run as parts of cmcld
daemon. This daemon determines cluster membership by sending heartbeat
messages to cmcld daemons on other nodes in the SG Cluster.
cmnetd: This daemon monitors the
health of the cluster networks, and performs local LAN failover. It also
handles the addition and deletion of relocatable package IP(s).
Package Manager
Packages are the means by which Serviceguard starts and halts configured applications. A package is a collection of services, disk volumes and IP addresses.
The package manager residing on the cluster coordinator is known as package coordinator.
The package coordinator does the following
- Decides when and where to run, halt, or move packages.
The package manager on all nodes does the following:
- Executes the control scripts that run and halt packages and their services.
- Reacts to changes in the status of monitored resources
Package Types:
There are three different types of packages.
01. Failover package (Most common type)
02. System multi-node package (Runs on all nodes)
03. Multi-node package (run on all or some of the nodes)
There are three different types of packages.
01. Failover package (Most common type)
02. System multi-node package (Runs on all nodes)
03. Multi-node package (run on all or some of the nodes)
Serviceguard uses a special file, /etc/cmcluster.conf, to define the locations for configuration and log files within the HP-UX filesystem. The following locations are defined in the file:
################## cmcluster.conf ############### # Highly Available Cluster file locations # This file must not be edited ################################################# SGCONF=/etc/cmcluster SGSBIN=/usr/sbin SGLBIN=/usr/lbin SGLIB=/usr/lib SGRUN=/var/adm/cmcluster SGAUTOSTART=/etc/rc.config.d/cmcluster SGFFLOC=/opt/cmcluster/cmff CMSNMPD_LOG_FILE=/var/adm/SGsnmpsuba.log }
Disabling Service guard:
To disable service guard on a system, comment out the following two lines from /etc/inetd.conf file and force the inetd daemon to re-read the file using inetd -c command.
hacl-cfg dgram udp wait root /usr/lbin/cmclconfd cmclconfd -p hacl-cfg stream tcp nowait root /usr/lbin/cmclconfd cmclconfd -c
To disable the package switching to node2
# cmmodpkg -n node2 -d pkg1
To enable package switching to node 2
# cmmodpkg -n node2 -e pkg1
To view the cluster config and status
# cmciewcl -v
To stop monitoring pakage pkg1, create a file MAINT in /etc/cmcluster/pkg1/MAINT
# Touch /etc/cmcluster/pkg1/MAINT
To restart the packge again
# rm /etc/cmcluster/pkg1/MAINT
To activate a VG which is under Service Guard control, and when the cluster is not running
#vgchange -c n vgname #vgchange -a y vgnameand when you are done you just need to deactivate your VG with
#vgchange -a n vgname
Quorum Server
If equal-sized groups of nodes become separated from each other, the Quorum Server allows one group to achieve quorum and form the cluster, while the other group is denied quorum and cannot start a cluster
The Quorum Server uses TCP/IP, and listens to
connection requests from the Serviceguard nodes on port # 1238. The
server maintains a special area in memory for each cluster; when a node
obtains the cluster lock, this area is marked so that other nodes will
recognize the lock as “taken.”
Configuring the Quorum server
01. Install the Quorum server using swinstall command
02. Add the following line in /etc/inittab file
qs:345:respawn:/usr/lbin/qs >> /var/adm/qs/qs.log 2>&103. Start the Quorum Server as follows:
# init q04. Verify the Quorum Server is running by checking the qs.log file
# vi /var/adm/qs/qs.log05. Creating and Updating the Authorization File.
# cat /etc/cmcluster/qs_authfile test1 test2
Security
To prevent users from loggin in:
01. Modify NOLOGIN variable in /etc/default/security to 1 (NOLOGIN=1)
02. Create /etc/nologin file with the text you want to display the users.
To make the HP-UX system to use /etc/shadow file to store ecrypted password instead of /etc/passwd
# pwconv
To switch to standard password mode from shadow mode
# pwunconv To list all the failed login attempts
# lastb To force the user "user1" to change his password during next login;
# passwd -f user1 To set the password expire after 90 days for user root
# passwd -x 90 root To find out the last passwd change date and number of days left for the passwd to expire from the password change date
passwd -s root root PS 06/26/08 0 126 To remove password for a user (blank passwd)
passwd -d user1 To lock user1
passwd -l user1 # it replaces password with *
Format of /etc/shadow
loginname:password:lastchange:mindays:maxdays:warndays:inactivity:expiration:reserved
Some files related to logged in users
/var/adm/wtmps ## all the successful logins. Access using last command
/var/adm/btmps ## all the bad login info. Access using lastb
/var/adm/utpms ## has the list of currently logged in users. Access using who command.
Standard Mode security Extensions
A security attribute defines how to control security configurations, such as passwords, logins,and auditing. The security attributes description file, /etc/security.dsc, lists the attributes that can be defined either in /etc/default/security, in the user database in /var/adm/userdb, or in both files. Some attributes are configurable and some are internal.
To check the status of local user accounts
# userstat -a
When an account has been locked due to too many authentication failures, root can unlock the account by
01. su'ing to the account or 02. # userdbset -d -u username auth_failures
To display all attributes for user "user1"
# userdbget -u user1
To set the Minimum password length to 7 and UMAK to 0022 for user user1
# userdbset -u user1 MIN_PASSWORD_LENGTH=7 UMASK=0022
To identiy and repair the problems in User database
# userdbck
Account locking if OpenSSH is used
If you are using OpenSSH:
- Make sure PAM support is enabled by setting UsePAM yes in sshd_config.
- You may want to disable password authentication by setting PasswordAuthentcation no in sshd_config. Without this, you will be prompted two additional times for your password if your account is locked (although you still won't be able to authenticate).
Adding and removing users
useradduseradd -u uid -g group ## primary group -G groups ## other groups user need to be member of -d dir ## home directory -c comment -m ## create home directory if it does not present -s shell -k skel_dir -o # allow UID to be non unique (duplicate) -D # Manage defaults for various options -t template # specify the template to be used when loading the defaults for options
To change the default base directory to /u01 from /home for all new users to be created
# useradd -D -b /u01
HP-UX Bastille
HP-UX bastille is a security hardening and lock down tool that enhances the system security by implementing various levels of hardening. This tool can be integrated with HP System Insight Manager. It can generate reports on system security configuration and allows you compare current systems security settings with saved settings.
It can be used to
- Securing files which are world writtable
- securing user login and crons
- turning off unneeded inetd services
- Making sendmail, FTP server, apache and DNS more secure
- Stops print scheduler and associated daemons if not necessory
- Performing security configurations actions
- Runs SWA (Software Assistant) or SPC (Security Patch check) for patches and reports
- Configuring IP-Filter based firewall.
The key Bastille files are
- /etc/opt/sec_mgmt/bastille/config # config file that include answers to the most recently saved session
- /etc/opt/sec_mgmt/bastille/log/error-log # logs error generated while running bastille
- /etc/opt/sec_mgmt/bastille/sction-log # Includes steps taken during executing bastille
- /etc/opt/sec_mgmt/bastille/revert/revert-sctions # includes list of files that were changed when bastille was run
Install Time Security Bundles
There are four predefined security configuration Bundles- Sec00Tools # The install time security Infrastructure. No security changes
- Sec10Host # Host based lockdown. No firewall. Many common clear text based services turned off excluding telnet and ftp.
- Sec20MngDMZ # Lockdown. IP filter firewall blocks incoming connections except common, secured, management protocols
- Sec30DMZ # Full lockdown. IP filter blocks all imcoming connections except SSH.
setprivgrp (man 1m setprivgrp)
getprivgrp
privgrp
/etc/privgrp
Dump
# swapinfo -tam Mb Mb Mb PCT START/ Mb TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME dev 20480 0 20480 0% 0 - 1 /dev/vg00/lvol2 reserve - 19211 -19211 memory 32637 3252 29385 10% total 53117 22463 30654 42% - 0 -
To get the physical Memory
grep "Phycical:" /var/adm/syslog/syslog.log
To get physical Memory in Itanium
# /usr/contrib/bin/machinfo| grep -i Memory Memory: 32736 MB (31.97 GB) # swapinfo -tam | grep memory memory 32637 3252 29385 10%
Logical Volume Manager and File system
New HP-UX supports the normal mount command with -F cdfs option.
mount -F cdfs -o cdcase /dev/dsk/c2t5d0 /cdrom
mount -F cdfs -o cdcase /dev/dsk/c2t5d0 /cdrom
Another way
HP-UX uses a mechanism called portable file system (PFS) on PA-RISC machines to mount Rock-Ridge and ISO 9660 CDs. This procedure describes how to use the PFS method.
HP-UX uses a mechanism called portable file system (PFS) on PA-RISC machines to mount Rock-Ridge and ISO 9660 CDs. This procedure describes how to use the PFS method.
01. Login as root
02. Determine the CDROM drive device file name by running ioscan command
# ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
disk 0 10/0/14/0.0.0 sdisk CLAIMED DEVICE TEAC CD-224E
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
disk 1 10/0/15/1.5.0 sdisk CLAIMED DEVICE HP 36.4GST336706LC
/dev/dsk/c3t5d0 /dev/rdsk/c3t5d0
03. Start the pfsd daemon.PFS mounting is not active on HP-UX
systems by default. The pfsd daemon must be running to mount a CD-ROM
device. To start the daemon, run the following commands:
02. Determine the CDROM drive device file name by running ioscan command
# /usr/sbin/pfs_mountd & # /usr/sbin/pfsd & 04. Insert the CDROM and mount using pfs_mount command
# pfs_mount -o xlat=unix /dev/dsk/c0t0d0 /cdrom
To unmount the CDROM
# pfs_umount /cdrom
Step by step to create a New VG and and File system on a new disk
Create a directory for the volume group# mkdir /dev/vggis Create device file named "group"
# mknod /dev/vggis/group c 64 0x010000 Create a physical volume using pvcreate with the -B option.
# pvcreate /dev/rdsk/c9t0d0 Create a VG with PE size of 32MB and with 50000 extends
# vgcreate -s 32 -e 50000 /dev/vggis /dev/dsk/c9t0d0 Volume group "/dev/vggis" has been successfully created. Volume Group configuration for /dev/vggis has been saved in /etc/lvmconf/vggis.conf Create LV with 10GB size
# lvcreate -n oracle -L 10240 vggis Warning: rounding up logical volume size to extent boundary at size "10016" MB. Logical volume "/dev/vggis/oracle" has been successfully created with character device "/dev/vggis/roracle". Logical volume "/dev/vggis/oracle" has been successfully extended. Volume Group configuration for /dev/vggis has been saved in /etc/lvmconf/vggis.conf Create file system with largefiles enabled
#newfs -F vxfs -o largefiles /dev/vggis/rgis Mirror the LV to another disk
# lvextend -m 1 /dev/vg00/gis /dev/dsk/c2t1d0 The newly allocated mirrors are now being synchronized. This operation will take some time. Please wait .... Logical volume "/dev/vg00/gis" has been successfully extended. Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
LVM Mirroring
To Mirror a Logical Volume# lvextend -m <number_of_mirror_copies> <lv_name> <physical_disk_name> # lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c0t0d0
To break a mirror (remove mirror copies from /dev/dsk/c0t0d0 disk)
# lvreduce -m 0 /dev/vg00/lvol1 /dev/dsk/c0t0d0
Mirroring Root, Boot, Primary Swap Logical Volumes in HP-UX (PA-RISC)
01. Create a physical volume using pvcreate with the -B option.# pvcreate -B /dev/rdsk/c0t3d0 02. Add the physical volume to your existing root volume group
# vgextend /dev/vg00 /dev/dsk/c0t3d0 03. Use mkboot to place boot utilities in the boot area
# mkboot /dev/rdsk/c0t3d0 04. Use mkboot -a to add an AUTO file in boot LIF area
# mkboot -a "hpux (;0)/stand/vmunix" /dev/rdsk/c0t3d0 05. Using lvextend command, mirror each LV in vg00
a. Get the list of logical volumes using pvdislay
# pvdisplay -v /dev/dsk/c3t6d0 | grep current | grep 00000 b. Extend each LV
# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c0t3d0 # lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c0t3d0 # lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c0t3d0 # lvextend -m 1 /dev/vg00/lv0l4 /dev/dsk/c0t3d0 # lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c0t3d0 # lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c0t3d0 # lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c0t3d0 # lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c0t3d0 06. Update the root volume group information
# lvlnboot -R /dev/vg00 07. Display the BRDA.
# lvlnboot -v Boot Definitions for Volume Group /dev/vg00: Physical Volumes belonging in Root Volume Group: /dev/dsk/c3t2d0 (0/1/1/1.2.0) -- Boot Disk /dev/dsk/c2t1d0 (0/1/1/0.1.0) -- Boot Disk Boot: lvol1 on: /dev/dsk/c3t2d0 /dev/dsk/c2t1d0 Root: lvol3 on: /dev/dsk/c3t2d0 /dev/dsk/c2t1d0 Swap: lvol2 on: /dev/dsk/c3t2d0 /dev/dsk/c2t1d0 Dump: lvol2 on: /dev/dsk/c3t2d0, 0
08. Specify the mirror disk as the alternate boot path
# setboot -a /dev/dsk/c0t3d0
09. Add a line to /stand/bootconf for the new boot disk
# vi /stand/bootconf l /dev/dsk/c0t3d0
Mirroring Root, Boot, Primary Swap Logical Volumes in HP-UX (Itanium)
01. Partition the disk using the idisk command and a partition description filea. Create a partition description file. For example:
# vi /tmp/idf 3 EFI 500MB HPUX 100% HPSP 400MB
NOTE: The values in the example
represent a boot disk with three partitions: an EFI partition, an HP-UX
partition, and an HP Service partition.
Boot disks of earlier HP Integrity Servers may have an EFI partition of only 100MB and may not contain the HPSP partition.
b. Partition the disk using idisk and your partition description file:
# idisk -f /tmp/idf -w /dev/rdsk/c3t1d0
c. To verify you can run:
Boot disks of earlier HP Integrity Servers may have an EFI partition of only 100MB and may not contain the HPSP partition.
b. Partition the disk using idisk and your partition description file:
# idisk /dev/rdsk/c3t1d0
02. Use the insf command with the -e option to create the device files for all the partitions.
# insf -e -H 0/18/1/2/0.0.1.0
You should now have eight device files for this disk:
/dev/[r]dsk/c?t?d?
(This refers to the entire disk)
/dev/[r]dsk/c?t?d?s1
(This refers to the EFI partition)
/dev/[r]dsk/c?t?d?s2
(This will be the HP-UX partition)
/dev/[r]dsk/c?t?d?s3
(This refers to the Service partition)
03. Use pvcreate to make the HP-UX partition of the disk an LVMmanaged disk
# pvcreate -B /dev/rdsk/c3t1d0s2
04. Add the disk to vg00:
# vgextend vg00 /dev/dsk/c3t1d0s2 05. Place the boot files on the disk using mkboot:
# mkboot -e -l /dev/rdsk/c3t1d0 06. Copy any autoboot file from the original boot disk to this one.
a. Use efi_cp to copy the AUTO file from the original boot disk’s EFI partition to the current directory. Make sure to use the device file with the s1 suffix, as it refers to the EFI partition
# efi_cp -d /dev/rdsk/cntndns1 -u /efi/hpux/auto ./AUTO b. Copy the file from the current directory into the new disk’s EFI partition:
# efi_cp -d /dev/rdsk/c3t1d0s1 ./AUTO /efi/hpux/auto 07. Use the lvextend command to mirror each logical volume in the root volume group onto the desired physical volume. The logical volumes must be extended in the same order that they are configured on the
original boot disk. Use the pvdisplay command with the -v option to determine the list of logical volumes and their order. For example:
# pvdisplay -v /dev/dsk/c0t0d0s2 | grep ’current.*0000$’ 00000 current /dev/vg00/lvol1 00000 00038 current /dev/vg00/lvol2 00000 00550 current /dev/vg00/lvol3 00000 00583 current /dev/vg00/lvol4 00000 00608 current /dev/vg00/lvol5 00000 00611 current /dev/vg00/lvol6 00000 00923 current /dev/vg00/lvol7 00000 01252 current /dev/vg00/lvol8 00000 In this example, mirror the logical volumes as follows:
# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c3t1d0s2 # lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c3t1d0s2 # lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c3t1d0s2 # lvextend -m 1 /dev/vg00/lv0l4 /dev/dsk/c3t1d0s2 # lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c3t1d0s2 # lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c3t1d0s2 # lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c3t1d0s2 # lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c3t1d0s2 08. Update the root volume group information:
lvlnboot -R /dev/vg00 09. Display the BDRA.
# lvlnboot –v 10. Specify the mirror disk as the alternate boot path in nonvolatile memory:
# setboot -a path_to_disk 11. Add a line to /stand/bootconf for the new boot disk using vi
vi /stand/bootconf l /dev/dsk/c3t1d0s2 where l denotes LVM.
LVM On Service Guard Clusters
To copy the mapping of the Volume group file# vgexport -p -s -m <map_file_name> /dev/vg_name
To import the VG using the map data
# mkdir /dev/vg_name
# mknod /dev/vg_name/group c 64 0xXX0000
# vgimport -s -m <map_file_name> /dev/vg_name
To manually activate a VG under Service Guard control
# vgchange -c n <vg_name>
# vgchange -a y <vg_name>
To Bring back the VG under Service Guard control
# vgchange -a n <vgname>
# vgchange -c y <vgname>
Other LVM tasks
To modify the Volume group properties such as max physical extends, max physical volumes and etc...vgmodify [-e MaxPhysicalExtents] [-p MaxPhysicalVolumes] [-l MaxLogicalVolumes] [-v] [-n] [-r] [-B bootable] VolumeGroupName {[pv_path] [pv_path] ....}
Note: vgmodify may fail if the first extend of
each disk in a VG is not free. To free up the first extend, use the
pvmove command.
pvmove
To move physical extents from /dev/dsk/c1t0d0 to /dev/dsk/c2t0d0
# pvmove /dev/dsk/c1t0d0 /dev/dsk/c2t0d0 To move only the physical extents for logical volume /dev/vg01/lvol2
# pvmove -n /dev/vg01/lvol2 /dev/dsk/c1t0d0 /dev/dsk/c2t0d0 To Relocate PE number 0 from /dev/dsk/c1t0d0 to any free extent in the volume group
# pvmove /dev/dsk/c1t0d0:0
Extend the file system using Online JFS
To make the file system size to 1GBfsadm -F vxfs -b $((1000*1024)) /gis or fsadm -F vxfs -b 15000000 /gis # maks fs to 15GB
Another Way
# lvextend -L 1024 /dev/byvg/lvol
# bc
1024*1024
1048576
- fsadm -F vxfs b 1048576 /mymount
The easiest way
# lvextend -L 1024 /dev/byvg/lvol
# fsadm -F vxfs -b 1024M /dev/byvg/lvol
To upgrade a mounted VxFS file system from disk layout 4 to disk layout 7
# vxupgrade -n 5 <mount_point>
# vxupgrade -n 6 <mount_point>
# vxupgrade -n 7 <mount_point>
To convert any non-VxFS file system on your system to a VxFS file system
# /opt/VRTS/bin/vxfsconvert <vol_name>
How to replace a failed mirrored boot disk in HP-UX on itanium systems?
01. Save the hardware path to the Disk# ioscan -m lun /dev/disk/disk25 Class I Lun H/W Path Driver S/W State H/W Type Health Description disk 25 64000/0xfa00/0x6 esdisk CLAIMED DEVICE online HP DH072ABAA6 0/4/1/0.0x5000c50005267f31.0x0 /dev/disk/disk25 /dev/disk/disk25_p2 /dev/rdisk/disk25 /dev/rdisk/disk25_p2 /dev/disk/disk25_p1 /dev/disk/disk25_p3 /dev/rdisk/disk25_p1 /dev/rdisk/disk25_p3 02. Halt LVM Access to the disk
# pvchange -a N /dev/disk/disk25_p2 Warning: Detaching a physical volume reduces the availability of data within the logical volumes residing on that disk. Prior to detaching a physical volume or the last available path to it, verify that there are alternate copies of the data available on other disks in the volume group. If necessary, use pvchange(1M) to reverse this operation. Physical volume "/dev/disk/disk25_p2" has been successfully changed.
03. Replace the disk. If it is hotswapbable, simply replace the disk now. Use the sasmgr command to identify the bay number
# sasmgr get_info -D /dev/sasd0 -q raid
Tue Apr 5 18:43:51 2011
---------- PHYSICAL DRIVES ----------
LUN dsf SAS Address Enclosure Bay Size(MB)
/dev/rdsk/c8t0d0 0x5000c50005267f31 1 5 70007
/dev/rdsk/c8t2d0 0x500000e11176be32 1 8 70007
04. Notify the mass storage subsystem that the
disk has been replaced. If the system was not rebooted to replace the
failed disk, then run scsimgr before using the
new disk as a replacement for the old disk.
# scsimgr replace_wwid -D /dev/rdisk/disk25
scsimgr:WARNING: Performing replace_wwid on the resource may have some impact on system operation.
Do you really want to replace? (y/[n])? y
scsimgr: Successfully validated binding of LUN paths with new LUN.
05. Create Partition
new disk as a replacement for the old disk.
a. cat /tmp/idf 3 EFI 500MB HPUX 100% HPSP 400MB b. idisk -f /tmp/idf -w /dev/rdisk/disk5 c. ioscan -fnNC disk d. insf -e 06. Assign the old instance number to the replacement disk
# io_redirect_dsf -d /dev/disk/disk25 -n /dev/disk/disk5 07. Restore LVM configuration information to the new disk.
# vgcfgrestore -n /dev/vg00 /dev/rdisk/disk25_p2 Volume Group configuration has been restored to /dev/rdisk/disk25_p2 08. Restore LVM access to the disk.
# pvchange -a y /dev/disk/disk25_p2 Physical volume "/dev/disk/disk25_p2" has been successfully changed. 09. Place boot utilities in the boot area.
# mkboot -e -l /dev/rdisk/disk25 10. Add an autoboot file to the disk boot area
# mkboot -a "boot vmunix" /dev/rdisk/disk25
Other vxfs related commands
fsadm Resize or defragment a VxFS file system.fscat Cats a VxFS file system.
fsck Checks and repairs a VxFS file system.
fsdb VxFS file system debugger.
fstyp Returns the type of file system on a specified disk partition.
getext Gets extent attributes for a VxFS file system.
mkfs Constructs a VxFS file system.
mount Mounts a VxFS file system.
newfs Creates a new VxFS file system.
setext Sets extent attributes on a file in a VxFS file system.
vxdump Incremental file system dump.
vxedquota Edits user quotas for a VxFS file system.
vxfsconvert Converts an unmounted file system to VxFS or upgrades a VxFS disk layout version.
vxfsstat Displays file system statistics.
vxlsino VxFS reverse path name lookup utility.
vxrestore Restores a file system incrementally.
vxtunefs Tunes a VxFS file system.
vxupgrade Upgrades the disk layout of a mounted VxFS file system.
vxumount Unmount a VxFS File System
Tips
To make the bdf output appear in single line instead of splitting into two lines
# bdf | awk '{if(NF==1){l=$0;getline;sub(" *"," ");print l$0}else print}' # bdf | tail +2 |grep ^/dev/|awk '{print $3 /1024 }' | awk '{sum += $1} END {print sum}' # bdfmegs | awk '{sum += $3} END {print sum}'
The following script can be used to list the file systems in MB and GB format
Attach:bdfmegs
Attach:bdfmegs
How to stress the CPU using a one line command
#perl -e 'fork; fork; 1 while {}'The above command launches 4 fork processes, you wan't more just add more forks they grow exponentialy
To get the ioscan output in single line for all disks
# ioscan -funC disk | awk '$1=="disk" { getline L2; print $0,L2 }'
To get only the claimed disks and remove extra spaces
# ioscan -funNC disk | awk '{if ($5=="CLAIMED") {L1=$0;getline; sub (" *","");print L1,$0}}'
To find out the slot numbers of the Hot-Swappable disks
# sasmgr get_info -D /dev/sasd0 -q raid Fri Sep 25 14:43:23 2009 ---------- PHYSICAL DRIVES ---------- LUN dsf SAS Address Enclosure Bay Size(MB) /dev/rdsk/c8t0d0 0x5000c50005267f31 1 5 70007 /dev/rdsk/c8t1d0 0x500000e012b796f2 1 8 70007
SNMP
# snmpget -v1 -c public aembwqc1 system.sysDescr.0 # snmpwalk -Os -c public -v 1 localhost system # snmpwalk -Os -c public -v 1 localhost # snmpwalk -Os -c public -v 2c localhost # snmptranslate -On -IR ipAdEntAddr .1.3.6.1.2.1.4.20.1.1 # snmpwalk -v 2c -c public localhost:9999 ipAdEntAddr IP-MIB::ipAdEntAddr.127.0.0.1 = IpAddress: 127.0.0.1 # snmpwalk -v 2c -c public localhost:9999 system.sysDescr.0 SNMPv2-MIB::sysDescr.0 = STRING: HP-UX aemsapa2 B.11.23 U ia64
11iv 3
Enable or disable the Legacy Naming Model
To disable the Legacy naming model of disk drivesrmsf -L WARNING: This command may be disruptive to the system. Before running this command, make sure you have first run iofind(1M) and migrated all applications using legacy device special files. Please refer to the man page of rmsf(1M) to verify the possible side effects of the option '-L'. Do you want to continue ? (You must respond with 'y' or 'n'.): y rmsf: Legacy mode has been successfully disabled
To enable the legacy naming model
# insf -L
This command will re-install all legacy I/O nodes and legacy DSFs.
Do you want to continue ?
(You must respond with 'y' or 'n'.): yes
insf: Legacy mode has been successfully enabled
Migration from Legacy VG
vgdsf is a script to migrate a LVM volume group from legacy to agile naming model.# vgdsf USAGE: vgdsf {-a | -d | -c} vg_name -a - Add persistent DSFs to the volume group -d - Delete legacy DSFs from the volume group -c - Convert legacy DSFs to persistent DSFs (-a and -d)in the volume group
IOSCAN Improvements:
-N displays output using agile view instead of legacy view# ioscan -fnNC disk Class I H/W Path Driver S/W State H/W Type Description =================================================================== disk 2 64000/0xfa00/0x0 esdisk CLAIMED DEVICE HP DG146BB976 /dev/disk/disk2 /dev/disk/disk2_p2 /dev/rdisk/disk2 /dev/rdisk/disk2_p2 /dev/disk/disk2_p1 /dev/disk/disk2_p3 /dev/rdisk/disk2_p1 /dev/rdisk/disk2_p3 disk 3 64000/0xfa00/0x1 esdisk CLAIMED DEVICE HP DG146BB976 /dev/disk/disk3 /dev/disk/disk3_p2 /dev/rdisk/disk3 /dev/rdisk/disk3_p2 /dev/disk/disk3_p1 /dev/disk/disk3_p3 /dev/rdisk/disk3_p1 /dev/rdisk/disk3_p3 disk 17 64000/0xfa00/0x9 esdisk CLAIMED DEVICE DGC CX3-20cWDR5 /dev/disk/disk17 /dev/rdisk/disk17 disk 18 64000/0xfa00/0xa esdisk CLAIMED DEVICE DGC CX3-20cWDR5 /dev/disk/disk18 /dev/rdisk/disk18 # ioscan -kfnNC tgtpath Class I H/W Path Driver S/W State H/W Type Description ================================================================= tgtpath 5 0/1/2/0.0x5006016141e0b836 estp CLAIMED TGT_PATH fibre_channel target served by fcd driver, target port id 0x10000 tgtpath 4 0/1/2/0.0x5006016941e0b836 estp CLAIMED TGT_PATH fibre_channel target served by fcd driver, target port id 0x20000 tgtpath 3 0/5/2/0.0x5006016041e0b836 estp CLAIMED TGT_PATH fibre_channel target served by fcd driver, target port id 0x10000 tgtpath 2 0/5/2/0.0x5006016841e0b836 estp CLAIMED TGT_PATH fibre_channel target served by fcd driver, target port id 0x20000 # ioscan -kfnNC lunpath Class I H/W Path Driver S/W State H/W Type Description ================================================================== lunpath 4 0/1/2/0.0x5006016141e0b836.0x0 eslpt CLAIMED LUN_PATH LUN path for ctl4 lunpath 10 0/1/2/0.0x5006016141e0b836.0x4000000000000000 eslpt CLAIMED LUN_PATH LUN path for disk17 lunpath 11 0/1/2/0.0x5006016141e0b836.0x4001000000000000 eslpt CLAIMED LUN_PATH LUN path for disk18 lunpath 5 0/1/2/0.0x5006016941e0b836.0x0 eslpt CLAIMED LUN_PATH LUN path for ctl4 lunpath 12 0/1/2/0.0x5006016941e0b836.0x4000000000000000 eslpt CLAIMED LUN_PATH LUN path for disk17 lunpath 13 0/1/2/0.0x5006016941e0b836.0x4001000000000000 eslpt CLAIMED LUN_PATH LUN path for disk18 lunpath 0 0/4/1/0.0x5000c5000f38d269.0x0 eslpt CLAIMED LUN_PATH LUN path for disk2 lunpath 1 0/4/1/0.0x5000c5000f393f49.0x0 eslpt CLAIMED LUN_PATH LUN path for disk3 lunpath 2 0/5/2/0.0x5006016041e0b836.0x0 eslpt CLAIMED LUN_PATH LUN path for ctl4 lunpath 14 0/5/2/0.0x5006016041e0b836.0x4000000000000000 eslpt CLAIMED LUN_PATH LUN path for disk17 lunpath 15 0/5/2/0.0x5006016041e0b836.0x4001000000000000 eslpt CLAIMED LUN_PATH LUN path for disk18 lunpath 3 0/5/2/0.0x5006016841e0b836.0x0 eslpt CLAIMED LUN_PATH LUN path for ctl4 lunpath 16 0/5/2/0.0x5006016841e0b836.0x4000000000000000 eslpt CLAIMED LUN_PATH LUN path for disk17 lunpath 17 0/5/2/0.0x5006016841e0b836.0x4001000000000000 eslpt CLAIMED LUN_PATH LUN path for disk18
To find out which legacy DSF does /dev/rdisk/disk17 map?
# ioscan -m dsf /dev/rdisk/disk17
Persistent DSF Legacy DSF(s)
/dev/rdisk/disk17 /dev/rdsk/c6t0d0
/dev/rdsk/c5t0d0
/dev/rdsk/c7t0d0
/dev/rdsk/c8t0d0
To which persistent DSF does /dev/rdsk/c5t2d4 map?
# iioscan -m dsf /dev/rdsk/c6t0d0
Persistent DSF Legacy DSF(s)
/dev/rdisk/disk17 /dev/rdsk/c6t0d0
To get Hardware path information of drives
# ioscan -m hwpath
Lun H/W Path Lunpath H/W Path Legacy H/W Path
====================================================================
64000/0xfa00/0x0
0/4/1/0.0x5000c5000f38d269.0x0 0/4/1/0.0.0.1.0
64000/0xfa00/0x1
0/4/1/0.0x5000c5000f393f49.0x0 0/4/1/0.0.0.0.0
64000/0xfa00/0x9
0/1/2/0.0x5006016941e0b836.0x4000000000000000 0/1/2/0.2.0.0.0.0.0
0/1/2/0.0x5006016141e0b836.0x4000000000000000 0/1/2/0.1.0.0.0.0.0
0/5/2/0.0x5006016041e0b836.0x4000000000000000 0/5/2/0.1.0.0.0.0.0
0/5/2/0.0x5006016841e0b836.0x4000000000000000 0/5/2/0.2.0.0.0.0.0
64000/0xfa00/0xa
0/1/2/0.0x5006016941e0b836.0x4001000000000000 0/1/2/0.2.0.0.0.0.1
0/1/2/0.0x5006016141e0b836.0x4001000000000000 0/1/2/0.1.0.0.0.0.1
0/5/2/0.0x5006016041e0b836.0x4001000000000000 0/5/2/0.1.0.0.0.0.1
0/5/2/0.0x5006016841e0b836.0x4001000000000000 0/5/2/0.2.0.0.0.0.1
64000/0xfa00/0xb
0/1/2/0.0x5006016141e0b836.0x0 0/1/2/0.1.0.255.0.0.0
0/1/2/0.0x5006016941e0b836.0x0 0/1/2/0.2.0.255.0.0.0
0/5/2/0.0x5006016041e0b836.0x0 0/5/2/0.1.0.255.0.0.0
0/5/2/0.0x5006016841e0b836.0x0 0/5/2/0.2.0.255.0.0.0
# ioscan -m lun
Class I Lun H/W Path Driver S/W State H/W Type Health Description
======================================================================
disk 19 64000/0xfa00/0x4 esdisk CLAIMED DEVICE online HP DH072ABAA6
0/4/1/0.0x5000c50005274b25.0x0
/dev/disk/disk19 /dev/disk/disk19_p2 /dev/rdisk/disk19 /dev/rdisk/disk19_p2
/dev/disk/disk19_p1 /dev/disk/disk19_p3 /dev/rdisk/disk19_p1 /dev/rdisk/disk19_p3
disk 20 64000/0xfa00/0x5 esdisk CLAIMED DEVICE online HP DG072A8B54
0/4/1/0.0x5000c50001d7194d.0x0
/dev/disk/disk20 /dev/disk/disk20_p2 /dev/rdisk/disk20 /dev/rdisk/disk20_p2
/dev/disk/disk20_p1 /dev/disk/disk20_p3 /dev/rdisk/disk20_p1 /dev/rdisk/disk20_p3
disk 21 64000/0xfa00/0xc esdisk CLAIMED DEVICE online TEAC DV-28E-N
64000/0x0/0x0.0x0.0x0
/dev/disk/disk21 /dev/rdisk/disk21
ctl 7 64000/0xfa00/0xd esctl CLAIMED DEVICE online FUJITSU E4000
0/3/1/0.0x2040000b5d6a0582.0x0
0/7/1/0.0x2041000b5d6a0582.0x0
/dev/pt/pt7
disk 42 64000/0xfa00/0xe esdisk CLAIMED DEVICE online FUJITSU E4000
0/3/1/0.0x2040000b5d6a0582.0x4000000000000000
0/7/1/0.0x2041000b5d6a0582.0x4000000000000000
/dev/disk/disk42 /dev/rdisk/disk42
disk 43 64000/0xfa00/0xf esdisk CLAIMED DEVICE online FUJITSU E4000
0/3/1/0.0x2040000b5d6a0582.0x4001000000000000
0/7/1/0.0x2041000b5d6a0582.0x4001000000000000
/dev/disk/disk43 /dev/rdisk/disk43
SCSIMGR
The scsimgr command displays the mapping between LUNs and lunpaths.# scsimgr lun_map -D /dev/rdisk/disk17 LUN PATH INFORMATION FOR LUN : /dev/rdisk/disk17 Total number of LUN paths = 4 World Wide Identifier(WWID) = 0x6006016035901e0076c2e3d21f11de11 LUN path : lunpath12 Class = lunpath Instance = 12 Hardware path = 0/1/2/0.0x5006016941e0b836.0x4000000000000000 SCSI transport protocol = fibre_channel State = ACTIVE Last Open or Close state = ACTIVE LUN path : lunpath10 Class = lunpath Instance = 10 Hardware path = 0/1/2/0.0x5006016141e0b836.0x4000000000000000 SCSI transport protocol = fibre_channel State = STANDBY Last Open or Close state = STANDBY LUN path : lunpath14 Class = lunpath Instance = 14 Hardware path = 0/5/2/0.0x5006016041e0b836.0x4000000000000000 SCSI transport protocol = fibre_channel State = STANDBY Last Open or Close state = STANDBY LUN path : lunpath16 Class = lunpath Instance = 16 Hardware path = 0/5/2/0.0x5006016841e0b836.0x4000000000000000 SCSI transport protocol = fibre_channel State = ACTIVE Last Open or Close state = ACTIVE # scsimgr get_attr -D /dev/rdisk/disk17 -a load_bal_policy SCSI ATTRIBUTES FOR LUN : /dev/rdisk/disk17 name = load_bal_policy current = round_robin default = round_robin saved =
LUN WWID
The wwid attribute holds the LUN VPD page 83h WWID:
# scsimgr get_attr -D /dev/rdisk/disk17 -a wwid
SCSI ATTRIBUTES FOR LUN : /dev/rdisk/disk17
name = wwid
current = 0x6006016035901e0076c2e3d21f11de11
default =
saved =
The wwid attribute holds the LUN VPD page 83h WWID:
All the SAN Drives on a system running HP-UX 11i
v3 was showing NO_HW in the ioscan output. The following commands
solved the problem.
# ioscan -fnNC tgtpath
Class I H/W Path Driver S/W State H/W Type Description
tgtpath 7 0/3/1/0.0x2040000b5d6a0582 estp CLAIMED TGT_PATH fibre_channel target served by fcd driver, target port id 0x10700
tgtpath 4 0/4/1/0.0x5000c500073db91d estp CLAIMED TGT_PATH sas target served by sasd driver, target port id 0x5000c500073db91d
tgtpath 5 0/4/1/0.0x5000c500073dedfd estp CLAIMED TGT_PATH sas target served by sasd driver, target port id 0x5000c500073dedfd
tgtpath 8 0/7/1/0.0x2041000b5d6a0582 estp CLAIMED TGT_PATH fibre_channel target served by fcd driver, target port id 0x20700
tgtpath 6 64000/0x0/0x0.0x0 estp CLAIMED TGT_PATH usb target served by usb_ms_scsi driver, target port id 0x0
scsimgr -f replace_wwid -C tgtpath -I 7
scsimgr -f replace_wwid -C tgtpath -I 8 Virtual
nPartitions – hard partitions with full electrical isolation
Virtual Partitions - Supported only on Mid and Large servers
Hp Integrity Virtual Machines
Resource Partitions
Virtual Partitions - Supported only on Mid and Large servers
Hp Integrity Virtual Machines
Resource Partitions
nPartitions (Node Partition)
Node partitioning is a hardware partitioning technique which is used to divide a cell based server into several small computer called node partitions. Each nPar can then be used as a separate, independent, standalone server running HP-UX OE instances wit its own dedicated processors, memory and I/O chassis. Depending on the hardware model, a server complex may be divided into as many electrically separated nPars as the total number of cell boards in the complex.
Genesis Partition
The very first partition created in a server complex is referred to as the Genesis partition. It is a single cell partition built via MP. Once created, you can load HP-UX into it.
The very first partition created in a server complex is referred to as the Genesis partition. It is a single cell partition built via MP. Once created, you can load HP-UX into it.
To create Genesis partition, go to MP --> CM --> CC and choose option G.
Pick a cell that contain processors and memory and is connected to an
I/O chassis with a core I/O card installed. When created, use the bo MP command to boot the nPar.
Partition can be created using SMH also.
http://IPaddress:2301/parmgr or SMH --> Tools --> partition Management
If the above ip address belongs to another
physical system which is not in the target partition, you will be given
an option to manage the partitions using the MP LAN port of the target
system.
parcreate and parmodify commands are used to create partition and modify the partition properties respectively.
parremove command is used to remove an nPar
cplxmodify modify an attribute of a system complex
parremove command is used to remove an nPar
cplxmodify modify an attribute of a system complex
To modify the Name of complex from default "Complex 01" to "Prod DB Server"
# /usr/sbin/cplxmodify -N "Prod DB Server"
parstatus
-A Only display the available resources in the complex -B Show information for all cabinets in the complex -b cabinet Show information about the specified cabinet -C Show information for all cells in the complex -c cell Show information about the specified cell. Cell name is given as cab#/Cell# eg. 0/2 -I Show information for all I/O chassis in the complex -i I/Ochassis Show information about the specified I/Ochassis -P Show information for all partitions in the complex -p parnumber Show information about the specified partition -V verbose mode -w Display the local partition number in a full sentence -X Display the complex attributes -h IPaddress|hostname specifies the IP address or hostname of the target partition -u username Specifies the required authorization to access a partition other than the local partition. Used along with -h option -g Used along with -h option. If used, then access is through MP LAN port
To get the local partition number
# parstatus -w The local partition number is 1.
To list all the partition in a system
# parstatus -P [Partition] Par # of # of I/O Num Status Cells Chassis Core cell Partition Name (first 30 chars) === ============ ===== ======== ========== =============================== 0 Active 1 1 cab0,cell0 test2 1 Active 1 1 cab0,cell1 test4
To get detailed information about partition number 0
# parstatus -Vp0 [Partition] Partition Number : 0 Partition Name : test2 Status : Active IP Address : Primary Boot Path : 0/0/0/2/0.0x6.0x0 Alternate Boot Path : HA Alternate Boot Path : 0/0/0/1/0 PDC Revision : 9.48 IODCH Version : N/A Cell Architecture : Itanium(R)-based CPU Compatibility : CDH-640 CPU Speed : 1598 MHz Core Cell : cab0,cell0 Core Cell Choice [0] : cab0,cell0 Total Good Memory Size : 64.0 GB Total Interleave Memory: 64.0 GB Total Requested CLM : 0.0 GB Total Allocated CLM : 0.0 GB GSM Sharing : Disabled complex-wide Hyperthreading Enabled : yes [Cell] CPU Memory Use OK/ (GB) Core On Hardware Actual Deconf/ OK/ Cell Next Par Location Usage Max Deconf Connected To Capable Boot Num ========== ============ ======= ========= =================== ======= ==== === cab0,cell0 Active Core 8/0/8 64.0/0.0 cab0,bay0,chassis0 yes yes 0 Notes: * = Cell has no interleaved memory. [Chassis] Core Connected Par Hardware Location Usage IO To Num =================== ============ ==== ========== === cab0,bay0,chassis0 Active yes cab0,cell0 0
parmodify
-a cell:[celltype]:[use_on_next_boot]:[failure_usage][:clm_value] -m cell:[celltype]:[use_on_next_boot]:[failure_usage][:clm_value] -d cell -B reboot the partition now
To change the partition name of partition 0
# parmodify -p0 -P <new_name>
To add cell 2 to partition 0 (-B option reboots nPar and activates the cell)
# parmodify -p0 -a2::y: -B # shutdown -Ry now (-R to reconfigure the partition after reboot)
To delete an active cell 2 from partition 1
# parmodify -p1 -d2 -B # shutdown -Ry now
To delete an in-active cell 2 from partition 1
# parmodify -p1 -d2 (no need to reboot)
parremove
To delete a partition number "1"
To delete a partition number "1"
# parremove -p 1
Dynamic nPar
A cell can be defined as either Base Cell or Floating Cell. Any cell not specifically designated as a floating cell is a base cell. A base cell cannot be online deactivated
The system administrator designates a cell as a base
cell or floating cell using the nPartition commands. Designation as a
floating cell has two important implications. First, a floating cell can
never contain any interleaved memory. 100% of the memory on a floating
cell is cell local memory. Second, the operating system cannot place
certain vital data elements in memory on floating cells. This precaution
ensures that the operating system can continue to run at optimal
performance if the floating cell is online deactivated.
The core cell for an nPartition is a base cell;
therefore, every nPartition must contain at least one base cell. The
system administrator might designate additional cells as base cells so
that the operating system can have more memory in which to place its
vital data elements.
A cell's designation as base or floating can be
changed while the cell is active, however the change cannot take effect
until the partition is rebooted. Similarly, the fraction of cell local
memory on a base cell can be changed while the cell is active, but the
change cannot take effect until the partition is rebooted.
parolrad (Partition Online Reconfigure Add Delete)
olrad (Online Reconfigure Add Delete)
olrad (Online Reconfigure Add Delete)
To make cell 1 as floating from base cell
# parmodify -p0 -m 1:floating:y::100% Warning: Changing the celltype of cell from base to floating would change the CLM of the cell to 100%. Note: It may take a longer time for the partition to boot if any cell is performing power-on selftest.
Hp Integrity Virtual Machines
01. Prepare the system for VM. Run the following commands to tune the kernel parameters of VM host system. Otherwise, VM may not startkctune base_pagesize=64 kctune filecache_max=1% kctune filecache_min=1% /usr/sbin/setboot -m off
02. Create new virtual machine. The command and format of the command is as follows
hpvmcreate -P <virtual system name> -c <# of virtual CPUS> -e <CPU Entitlement> -r <Memeory amount? # hpvmcreate -P test01 -c 4 -e 20 -r 4G # hpvmstatus [Virtual Machines] Virtual Machine Name VM # OS Type State #VCPUs #Devs #Nets Memory Runsysid ignite 1 UNKNOWN Off 4 0 0 4 GB 0
03. Use the hpvmmodify command to modify the VM properties as required
# hpvmmodify -P ignite -O hpux # hpvmstatus [Virtual Machines] Virtual Machine Name VM # OS Type State #VCPUs #Devs #Nets Memory Runsysid ignite 1 HPUX Off 4 0 0 4 GB 0
04. Create Virtaul Switch
hpvmnet -c -S <switch name> -n nic-id • -c indicates the creation of a vswitch. • -S vswitch-name specifies the name of the vswitch. • -n nic-id specifies the network interface on the VM Host that the new vswitch will use. For example, —n 0 indicates lan0. # hpvmnet -c -S backup -n 0 # hpvmnet -c -S sap -n 3 # hpvmnet Name Number State Mode NamePPA MAC Address IPv4 Address localnet 1 Up Shared N/A N/A backup 2 Down Shared lan0 216.226.174.88 sap 3 Down Shared lan3 192.168.248.34
05. To start the switch
# hpvmnet -S backup -b # hpvmnet -S sap -b # hpvmnet Name Number State Mode NamePPA MAC Address IPv4 Address localnet 1 Up Shared N/A N/A backup 2 Up Shared lan0 0x001a4b097f9a 216.226.174.88 sap 3 Up Shared lan3 0x001a4b096829 192.168.248.34
06. Add the Virtual NIC
hpvmmodify -a network:avio_lan|lan:vsiwtch:vswitch_name # hpvmmodify -P ignite -a network:avio_lan::vswitch:sap # hpvmmodify -P ignite -a network:avio_lan::vswitch:backup
07. Add virtual storage
hpvmmodify -P <Vm_Name> -a <disk|tape|dvd|burner>:scsi|avio_stor:HW_Address:<disk|lv|file>:device_name
To Add physical disks as disks to to VM
# hpvmmodify -P ignite -a disk:avio_stor::disk:/dev/rdisk/disk10 # hpvmmodify -P ignite -a disk:avio_stor::disk:/dev/rdisk/disk11 # hpvmmodify -P ignite -a disk:avio_stor::disk:/dev/rdisk/disk12To add a LV as disk to VM
# hpvmmodify -P ignite -a disk:avio_stor::lv:/dev/vg00/rroot_ignite
08. To view the detailed status of Virtual machine
# hpvmstatus -v -P ignite Version B.04.10.00 [Virtual Machine Details] Virtual Machine Name VM # OS Type State ==================== ===== ======= ======== ignite 1 HPUX Off [Authorized Administrators] Oper Groups : Admin Groups : Oper Users : Admin Users : [Virtual CPU Details] #vCPUs Entitlement Maximum ====== =========== ======= 4 40.0% 100.0% [Memory Details] Total Reserved Memory Memory ======= ======== 4 GB 64 MB [Storage Interface Details] Guest Physical Device Adaptor Bus Dev Ftn Tgt Lun Storage Device ======= ========== === === === === === ========= ========================= disk avio_stor 0 2 0 0 0 disk /dev/rdisk/disk10 disk avio_stor 0 2 0 1 0 disk /dev/rdisk/disk11 disk avio_stor 0 2 0 2 0 disk /dev/rdisk/disk12 [Network Interface Details] Interface Adaptor Name/Num PortNum Bus Dev Ftn Mac Address ========= ========== ========== ======= === === === ================= vswitch avio_lan backup 1 0 0 0 2e-53-f2-50-2f-64 vswitch avio_lan sap 1 0 1 0 7e-dc-36-f8-61-c5 [Misc Interface Details] Guest Physical Device Adaptor Bus Dev Ftn Tgt Lun Storage Device ======= ========== === === === === === ========= ========================= serial com1 tty console
09. To start the VM
# hpvmstart -P ignite # hpvmstatus [Virtual Machines] Virtual Machine Name VM # OS Type State #VCPUs #Devs #Nets Memory Runsysid ignite 1 HPUX On (EFI) 4 3 2 4 GB 0
10. Connect to VM console
# hpvmconsole -P ignite vMP MAIN MENU CO: Console CM: Command Menu CL: Console Log SL: Show Event Logs VM: Virtual Machine Menu HE: Main Help Menu X: Exit Connection
11. After OS is installed on the VM, make sure
to install the HPVM-Guest software. This software is included in
/opt/hpvm/guest-images/hpux/11iv3 directory of guest system.
# swinstall -x autoreboot=true \ -s /opt/hpvm/guest-images/hpux/11iv3/hpvm_guest_depot.11iv3.sd HPVM-Guest
Virtual Machine Tasks
Virtual Switchhpvmnet -S switch Name -s switch number -c creates a new switch -d deletes an existing switch -b start the switch -h halt the switch -r reboot the swich -n nic_id Designates the network interface on the VM Host -C changes the specified VM Switch -N New_VS_Name
To change the Virtual swith testswitch to use lan900 interface
# hpvmnet -C -S testswitch -n 900
hpvmmodify
To delete a virtual Lan adapter from test1 system
# hpvmmodify -P test1 -d network:avio_lan::vswitch:sap
Dynamic Memory
# hpvmmodify -P test1 -r 24G -x ram_dyn_type=any -x ram_dyn_min=4G -x ram_dyn_max=24G -x ram_dyn_target_start=16G
The above This command specifies the following values:
- The virtual machine memory size is set to 24 GB.
- Dynamic memory is enabled using any dynamic memory support available.
- The minimum amount of memory that the virtual machine can be reduced to is 4GB.
- The maximum amount of memory that the virtual machine can be increased to is 24GB.
- The memory size to reduce to after it boots is 16 GB. When the guest starts, it initially has access to the guest memory size (specified by the -r option), then the dynamic memory driver reduces the memory to the value of the ram_dyn_target_start parameter.
To dynamically increase the memory to 20GB for test1 system
# hpvmmodify -P test1 -x ram_target=20G
To view the Dynamic memory status
# hpvmstatus -P test1 -V . . . [Dynamic Memory Information] Type : driver Minimum memory : 4096 MB Target memory : 12346 MB Maximum memory : 16378 MB Current memory : 12346 MB Comfortable minimum : 5498 MB Boot memory : 16378 MB Free memory : 8825 MB Available memory : 359 MB Memory pressure : 0 Memory chunksize : 65536 KB Driver Mode(s) : STARTED ENABLED . .
To remove a virutual machine from system
# hpvmremove -P test3 hpvmremove: Remove the virtual machine 'test3'? [n/y]: y
I really appreciate your work and very amazing and important information about the HP-UX Backup and DR which have share in this blog.
AntwortenLöschenHP-UX Backup and DR
As we know, Big data platform managed service is the future of the industries these days, this article helps me to figure out which language I need to learn to pursue the future in this field.
AntwortenLöschen