Fsadm Command In Hp-ux Serial Number
LINK https://blltly.com/2sXAZo
This article describes how to extend a file system on HP-UX 11i Operating Environment. The extendfs command should be used to extend HFS or JFS (VxFS) file systems that are not mounted. The Veritas OnlineJFS extends the functionality of the JFS product to extend a file system in using the fsadm command.
If you use the fsadm command to extend a file system you need to know the target size in Megabytes to provied to the -b comman option. The extendfs don't required to previously know the new size.
To convert an HFS file system from largefiles to nolargefiles, the file system must be in a cleanstate[4] and must be unmounted. Also, in order for the fsadm command to succeed in the conversion from a largefiles mode to a nolargefiles mode,you must first remove an files that are greater than 2GB in size.
In the first scenario, you use fsck in the interactive mode. fsck finds a large fileon a no-large-files file system, marks the file system dirty and stops.You can then correct the situation using the fsadmcommand with the -o largefiles option. The fsck command repairs the file system, which you are thenable to mount. This scenario would preserve the large file, if fsck did not find it corrupt in any other way.
The mount command uses thesame two options as the mkfs, newfs, and fsadm commands (largefilesand nolargefiles). mount willnot mount a large-files file system if the -o nolargefiles option is specified. Conversely, the mount commandwill not mount a no-large-files file system if the -o largefiles option is specified. If no option is provided to mount, it will use the state of the file system itself to determine ifit is mounted as largefiles or nolargefiles.
What does that mean? The documentation book says that fsadm is only available with the Advanced VxFS package. How do I know if I have that installed? Is this the same thing as Online JFS? Neither of these names show up when using the swlist command.
To enable large files, create the file systems using the newfs command with the -o largefiles option or alter the file systems using the fsadm command with the -o largefiles option. The following fsadm command alters the file system to enable large files:
For a memory windows installation, the installer appends the instance name and port number of the daemon to /etc/services.window allowing the instance name to be used as a key to the getmemwindow(1M) command. Use the getmemwindow command to determine which port is being used by the instance.
## Command-Line Support Tools Manager (cstm) ## The run cstm cstm cstm> map cstm> sel dev 4 (select the disk of you choice) cstm> info cstm> il (obtain the serial number) cstm> quit
Go into the VG subdirectory and create the group device special file. For the Linux guys, in HP-UX each volume group must have a group device special file under its subdirectory in /dev. This group DSF is created with the mknod command, like any other DSFs the group file must have a major and a minor number.
## Command-Line Support Tools Manager (cstm) ## The run cstm cstm cstm> map cstm> sel dev 4 (select the disk of you choice) cstm> info cstm> il (obtain the serial number) cstm> quit
1. Is there a "defrag" on UNIX?For HFS filesystem:HP-UX experts say that HFS filesystem was designed for optimum performance. It's sort of auto-defragmenting filesystem.But, if you still insist on defragmentation, you have some possibilities: Backup entire filesystem Erase all files from that filesystem Restore entire filesystem (it's rather funny, but works good & requires a lot of time) Use standard HP-UX decompression utility (unfortunatelly, dcopy assumes you have a spare, identically sized filesystem available :( ) Buy product called DISK_PAK (from EagleSoft, )For VxFS (JFS) filesystem:You need to buy additional AdvancedJFS (Online JFS) product from Hewlett-Packard. According to some people it is really worth the money; it allows you to get the full functionality of JFS (VXFS) - files/dirs stats, on-line backup, on-line extend/shrink file system (make sure you install the patches !), online (background) defrag.If you already have this product check man page for 'fsadm' command.2. Starting/Sping DTC's / DDFA in HP-UX 10FILE CHANGE/etc/rc.config.d/dtcmgr START_DTCMGR=1/etc/rc.config.d/netdaemons START_RBOOTD=1 RBOOTD_DEVICES="/dev/lan0" DDFA=1To check that the correct daemons are running when the system comes up, you can check the end of the following log files: tail /var/adm/rbootd.log tail /var/adm/dtcnmd.log tail /var/adm/dtcnmp.log...which should say "INITIALIZATION COMPLETE".The following daemons should be running when DTC's are up: rbootd dtcnmd dtcnmpTo disable DTC's, simply flag /etc/rc.config.d/dtcmgr: START_DTCMGR=0...This ss them from coming up when you reboot. Simply change it back to 1 then reboot to restart the DTC daemon.You can also s the daemons while the system is up (instead of booting) by running: /sbin/init.d/dtcmgr s3. HP-UX 10.x System Info ScriptHere is a script to gather system information on HP-UX 10.x systems: dumpsys.hp104. Setting up routingThese are the steps for setting up routing on HP-UX.I will give the IP address 192.9.200.2 to the router for this example.Run the command: route add default 192.9.200.2 1 to initially add the router for all systems.To keep this information after a reboot edit the file /etc/rc.config.d/netconf add the IP address to ROUTE_GATEWAY change ROUTE_COUNT to 1 5. Patch CleanupFrom HPThere is a utility under /usr/sbin and it is called 'cleanup'. It provides the following functionality for 10.X patch management:/usr/sbin/cleanupRemove superseded patches from the system to reclaim space in /var. Queries the user re trimming SD logfiles as well./usr/sbin/cleanup -FForces the removal of ALL Patch backups to reclaim space in /var (you cannot back out a patch out after this)./usr/sbin/cleanup -tTrim SD logfiles /var/adm/sw*.log to the most recent 5 entries./usr/sbin/cleanup -iRemove overwritten patch entries from the SDUX IPD./usr/sbin/cleanup -d [absolute path to software depot]Removes superseded patches from a software depot.6. Patch Frequently Asked QuestionsFrom HP Q: Instead of following this procedure, can I use swremove(1M) to remove all patches prior to performing the software update? A: Yes. You can do this but it is not recommended. First of all, patches that have been applied may deal with sensitive issues like data corruption, security, and system panics. By removing the patches prior to performing the update you may be exposed to the problems addressed by the patches. It is best to leave the patches installed. Second, removing patches with swremove(1M) can be a labor-intensive process. Not only do many systems have over a hundred patches installed, you must remember that when a patch is removed with swremove(1M), a patch that was superseded by the patch *may* be automatically reinstalled. So, several iterations of invoking swremove(1M) may be required to completely remove all patches from the system. Q: Can I use swremove(1M) to remove the inappropriate patches after the software update process? A: NO! It is critical to remember that removing a patch with swremove(1M) will reinstall software that was present prior to the installation of the patch. So, removing a patch with swremove(1M) after a software update could lead to an undesired mixture of new and old software. Let's use an example of an HP-UX 10.01 to HP-UX 10.20 update to clarify this situation. Assume you were running HP-UX 10.01 and updated to HP-UX 10.20 without following the procedure listed above. After the update, the swlist(1M) command will show that HP-UX 10.01 patches are still installed. What happens if these 10.01 patches are removed via swremove(1M)? The 10.01 files that were resident on the system prior to the installation of the 10.01 patches will be restored. The end result is that the HP-UX 10.20 system will now have HP-UX 10.01 files mixed with the HP-UX 10.20 files. The behavior of such a system is unknown, and most likely, a complete cold install will be required to recover the system. Q: Can I simply remove all patch references from the IPD prior to performing the software update? A: Not really. The problem with this solution is that all software products might not be affected by the software update. If patches for all software are removed from the IPD and some software is not reloaded during the update process, then information will be lost about some patches that are still present after the update. An example of where this may cause a problem is if an operating system update was performed, but some application software products were not updated. This situation arises when the same version of an application runs on multiple versions of the operating system. If patches had been applied to these application products and the patches removed from the IPD but the products not updated, then there would be no record that the patches were installed. This could lead to problems with the application software.7. Fbackup/FrecoverTo backup use: /usr/sbin/fbackup -0v -f /dev/rmt/0m -i /Recover command (absolute): /usr/sbin/frecover -xv -f /dev/rmt/0m -i /path[/file]To do a relative restore using frecover you need BOTH -x and -X, ie -xvX8. HP-UX telnet / pty usersTo increase the number of telnet users a system can have, the npty kernel parameter needs to be altered. However, HP-UX requires "slave" and "master" pty devices for each telnet user. These devices are used logically as two ends of a pipe - they need to be there so HP-UX can allocate a tty device to a new telnet user.To create the required master and slave device files, executed the command: insf -d pty -n 1209. HP-UX 11.x infoThis is intended as a quick summary of the new features and functions incorporated into HP-UX 11.64bit VS 32bitHP-UX 11.x is 64bit.A 32 bit version can also be installed for hardware that doesn't support 64 bit.Currently some D, K and T class servers support 64bit.The new V class server is designed with HP-UX 11.x specifically in mind and doesn't support HP-UX 10.x / 32bit.HP-UX11.x 64bit will still run 32 bit applications, but obviously vice versa does not apply.Upgrading to HP-UX 11HP-UX can be upgraded to release 11.x from 10.20 or 10.30.You can also upgrade to HP-UX 11.x from 10.01/10.10, but this restricts you to the 32bit version of HP-UX 11.STKSoftware Transition Kit is a new tool designed to help you move C/C++/script code over to 64bit.NetworkingNIS+, a new version of the Networking Information Service (yellow pages), has been added. This has enhancements to security, administration and ability to scale larger networks.lanconfig and ifalias no longer exist - ifconfig, lanadmin, lanscan and netstat have been enhanced.DLKM (Dynamically Loadable Kernel Modules)HP-UX has a new method for updating the kernel in order to facilitate dynamic changes for kernel modules.SD-UXSoftware update and maintenance has been signifcantly enhanced.Commands such as swlist now have a GUI-like interface.Patch management has been significantly improved:Ability to rollback O/S patchesAbility to apply patches based on software installed alreadyIgnite/UX - An enhanced program to install HP-UX, replacing the previous method for HP-UX installation (cold install).System RecoveryA new make_recovery command creates bootable system images (similar to the AIX mksysb command).check_recovery lets you know if make_recovery needs to be executed again.Dump devices can be dynamicaly configured.10. Setting up a remote consoleThis is intended to describe the procedure for setting up a remote console for the S800.The remote console allows Hewlett-Packard to perform remote support for your machine by enabling a remote or parallel console.In order to configure a remote console, you will need an HP support modem that is connected on port 7 of the MUX or MDP. Alternatively, the modem can be connected to the back of the box on the Access Port.In addition, please ensure that a 40233A cable is being used.Enabling the Remote ConsoleMake sure that you are using the system console, and then follow this procedure: Issue a from the console: This should return the: CM> prompt, as well as a line on the bottom of the screen similar to this: RUN F01F REMOTE : disabled inactive multiple ACCESS FAULT : 00 Check the access configuration, by entering the following command at the CM> prompt: CA This will return the following: current terminal mode identification : HP mode terminal do you wish to change it ? (Y/[N]) : _ If you choose N, you will see the following information: current remote support modem port configuration : Bit rate : 9600 bits/sec Protocol : Bell System Identification : 'hostname' do you wish to change configuration ? (Y/[N]) : _ Make sure that your settings accurately reflect: the same speed as your modem (eg. 9600) that the protocol is set to Bell that the system name refers to the hostname of the system that you're working on If these settings are not correct, modify them To enable remote access, enter the following command from the CM> prompt: ER This will return the following information: current remote console access configuration : remote CS : Enabled Mode : Multiple Password : test Password Faults : 03 do you wish to change configuration ? (Y/[N]) : _ The password option allows you to set passwords to provide additional security by prompting a user for a password prior to gaining access. If all these fields are appropriately set, do not change the configuration. You will now see the following message displayed : Remote console is now enabled. The status bar at the bottom of the screen should now indicate that remote access is enabled but still inactive: RUN F01F REMOTE : enabled inactive multiple ACCESS FAULT : 00 Once you connect to the console via modem, it will change to ACTIVE. Issue a break signal to toggle between the remote and local console. On the local console hit the key (it is located in the left hand corner of the keyboard) At the remote end of the connection, use this cu command: ~%break : actually type the word "break" This will now allow the remote connection to gain control of the console. Return to console mode be entering this command at the CM> prompt: CO Note that you must hit the key twice. There are a variety of other useful commands that can be executed from the CM > prompt. In order to display the different commands that are available, type HELP at the CM> prompt.11. Using HP-UX 10.20 as DCHP server for Win95 clientsHow do you get the DHCP server to pass the default gateway and DNS information to its clients?The solution is to use the sample file, located in /usr/newconfig/etc/dhcptab, copy it to /etc/dhcptab, and edit it according to your wants and needs.12. Extending the root partitionHow do I extend (enlarge) the root partition which is located on a logical volume, the problem being that you can't umount the root partition.Here are 3 solutions to this commonly asked problem.Solution 1:One can purchase HP IgniteUX which will also do the job, alas after paying money for this product.Solution 2:Remove all things that are not needed on the root partition so you create additional space, e.g. clean up /tmp, symlink various files and/or directories, etc and create the space you need in this way.Solution 3:If you are using LVM there is a work around to extend the root LV.Boot the system in single user mode and extend the root using the lvextend command and it will extend the root logical volume.Make sure that the space to extend the root LV is available in the same disk as continuous physical extents because the root volume allocation poicy must be contigous.If the adjacent physical extents are occupied by any other LV move that logical volume to some other disk using pvmove command.#pvmove -n /dev/vg00/lvolx /dev/dsk/c0txd0 /dev/dsk/c0txd0Shutdown the machine and interrupt the normal boot process by pressing any key if it is a S800 system and if it is S700 use "esc" key.From the boot admin prompt type boot pri isl you will get the isl promptISL> hpux -lmThis will take you to the logical volume maintanence mode. Don't try to mount any logical volume and don't switch to multiuser mode or a different runlevel.The root LV will now be mounted on /dev/root instead of /dev/vg00/lvolxNow you can execute the extendfs command on the root logical volume:# extendfs -F hfs /dev/vg00/rlvolxNote down the alternate superblock locations and reboot the macine using#reboot -n -------------- DONT MISS THIS STEP.This will cause the system to not sync the old superblock back to the filesystem and damage it.When you boot the system normally now you will get all the allocated space for the root filesystem.Now you will notice that the root volume is still mounted on /dev/root rather than /dev/vg00/lvolx. To correct this you remove the /etc/mnttab and you will find bdf now displays the correct logical volume.13. Retreiving data from an old root diskAssumption:Original root disk: 4 Gb LVM/HFS SCSI ID 6New root disk, 4Gb LVM/HFS SCSI ID 6 with a freshly installed HP-UX.We want the system to run with (only) the new disk, but there is data on the first disk that have to be transferred from the original.Solution:Boot from disk one with ID 6. Break the boot process and interact with IPL. Enter the boot stringhpux -lm stand/vmunix -isIssue the commands: pvck -y /dev/dsk/c0t6d0 and vgchange -a n vg00 to prepare the original diskHalt the systemChange SCSI ID of the original disk from 6 to any free ID, say 5Connect both disks then power onBoot from the new disk with ID 6. Break the boot process and interact with IPL. Enter the boot stringhpux -lm /stand/vmunix -ismkdir /dev/vg0xmknod /dev/vg0x/group c 64 0x010000vgimport -v vg0x /dev/dsk/c0t5d0vgchange -a y vg0xmount / /dev/vg0x/lvolxBreakdown:What this does is allow you to change the volume group of the original root disk from vg00 to vg0x. You can then vgimport this and mount the old file systems to get the data you need.A much simpler method is to back up the data you want saved before you replace the old disk!14. HP Certification helpHere are some tips on studying for HP-UX Certification: Get the sample questionnaire from the HP web site and work it out. Only very few questions will come from that. Take online seminar from HP ( 2 hours ) vist the following site -pa5-r02-slides/cert_aniekan1/set.html Read HP-UX system administration manual page to page (HFS,JFS,Startup,Shutdown, boot lv preparation,etc.) It will of great help. Read HP-UX install & configuring Internet services ( DNS,NTP, Subnet, patch) Visit docs.hp.com for the ics not covered in these two books. Fundamentals of unix ( shell scripts, Vi ) ,, general unix knowledge if enough. Prepare answers to the following questions: Default packet size for ping How many servers (maximum) can be specified in /etc/resolv.conf ? When you create a file in unix, by default what permissions will be applied to it? How do you change this setup? Can a non-root user influence the job priority? How to display all the lines in a file not matching with a string How does jfs filesystem write into log file, i.e before updating on the disk or after updating? How do you supply a cron job Significance of at.allow, at.deny and their priority What will linkloop command do? Which command will show socket status? How much time does a client wait if none of the servers specified in /etc/resolv.conf are responding for name query? How do you disable or enable ARPA/BSD services Significance of /var/adm/inetd.sec For a given subnet mask ,how may hosts can be incorporated in a subnet. What subnet mask should be assigned to a network to get a required number of hosts in a subnet? What is fsck -o full,nolog used for? NFS export options How do you setup secondary DNS server What daemon will run only on primary NIS server? How do you update maps on secondary NIS? What is stale file handle error in NFS? What is command line argument in shell scripting? What is syntax of adding a new route? Can NIS work with out NFS ?. Vice versa? IS TCP/IP needed for NFS, NIS What does zz and wq mean in vi How do you combine results of two commands, ( e.g.. date + id ) using shell script. What is the effect of /etc./hosts.equiv on root user How do you do a full fsck on vxfs ( fsck -o ) Can fsck be used for hfs & vxfs ( yes ) How do you find available size for creating lvm ( vgdisplay) What can NOT be done using SAM. Run level for NFS (3) What is the FS type for /stand ( hfs ) What command for listing pathces installed. Steps involved in building new kernal. Steps involved in extending online jfs ( no umount required) Default hp-ux shell ( posix) How do you list & create special files ( mksf, lssf) TFTP, bootp 15. IPD Contains Duplicate Definitions for Productscleanup or cleanup -i work great if you have an IPD that is not corrupt. However you will have to do the following for a corrupt IPD: cd /var/adm/sw/products directory and look for duplicate product directories. These have .2 at the end of the directory name. Also look at the pfiles/INDEX files in both directories to verify they really were the same. Don't always assume that a .2 directory is a duplicate, however. You'll have to verify that the directories are incorrect by looking at the contents of them. Assuming that all of the .2's were incorrect entries in the IPD, move these directories to a temporary location. mv INDEX INDEX.OLD - this is the real IPD, built from the directories vi void.psf - create a package specification file with the following in it. product tag void fileset tag void swpackage -s void.psf - create a void package swinstall void - install the void package. This command actually senses the fact that the INDEX file no longer exists, and rebuilds the IPD from the directories in /var/adm/sw/products. Obviously, it will only be as accurate as what is in that directory structure, so great care must be taken to ensure you remove the right stuff. After swinstall completes, do a 'swlist -a state -l files | more' to verify all the file sets are configured. Also, do 'swlist -l product' and/or 'swlist -l fileset' to verify all your products and fileset are installed properly. If you really want to feel safe, I would suggest these commands be performed prior doing anything and that way you have hard copy of what the IPD looked like before it was touched. 16. Determine block size of logical volumeTo determine the block size of a logical volume's read/write buffers run:fstyp -v {disk/lvol}17. Replacing a boot disk and keeping the old infoThe easy way is to use Ignite/UX, but if you don't have that:Manual procedure: Find an available Volume Group number: # ll /dev/*/group crw-r----- ... 64 0x000000 Oct 8 1996 /dev/vg00/group crw-rw-rw- ... 64 0x010000 Oct 30 1996 /dev/vg01/group crw-r--r-- ... 64 0x020000 Oct 30 1996 /dev/vg02/group crw-r--r-- ... 64 0x020000 Oct 30 1996 /dev/vgtest/group the two hex digits after the "0x" are the VG number, 00,01,02 in the above listing from my system, so "03" would be the logical choice. Create a new VG mkdir /dev/vgboot mknod /dev/vgboot/group c 64 0x030000 Note the new VG number! pvcreate -B /dev/rdsk/cItTd0 Make LVM disk and reserve boot area vgcreate vgboot /dev/dsk/cItTd0 Put LIF boot stuff and AUTO boot string on it. mkboot /dev/rdsk/cItTd0 copy any other LIF stuff for f in `lifls /dev/rdsk/c0t6d0` ; do lifcp /dev/rdsk/c0t6d0:$f /dev/rdsk/cItTd0:$f ; done (assuming that your current boot disk is /dev/rdsk/c0t6d0) mkboot -a "hpux (;0)/stand/vmunix" /dev/rdsk/cItTd0 Create your logical volumes on the new disk that correspond to the LVs on the current root disk: lvcreate -l 40 -n stand -r n -C y /dev/vgboot lvcreate -l 300 -n swap -r n -C y /dev/vgboot lvcreate -l 48 -n root -r n -C y /dev/vgboot (note the contiguous allocation and no BAD-block-relocate) lvcreate -l 400 -n usr /dev/vgboot lvcreate -l 100 -n tmp /dev/vgboot lvcreate -l 200 -n opt /dev/vgboot etc..... You can take this opportunity to adjust the sizes as you wish. Create filesystems on the new LVs created in 3., above newfs -F hfs /dev/vgboot/rstand newfs -F vxfs /dev/vgboot/rroot newfs -F vxfs /dev/vgboot/rusr newfs -F vxfs /dev/vgboot/rtmp etc.... Note: here, that you have the opportunity to make root and the other "system" filesystems JFS (Journaled FS), which is highly recommended. /stand must remain HFS mount the new filesystems into temporary directories mkdir /tmp_mnt mkdir /tmp_mnt/root mkdir /tmp_mnt/usr mkdir /tmp_mnt/tmp ... mount /dev/vgboot/root /tmp_mnt/root mount /dev/vgboot/usr /tmp_mnt/usr mount /dev/vgboot/usr /tmp_mnt/tmp ... Set permissions on the root directory of each filesystem the same as is currently set: chmod 755 /tmp_mnt/root ( or whatever chmod 555 /tmp_mnt/usr you currently have) *** chmod 777 /tmp_mnt/tmp ... ****************************************** NOTE : You probably will not be copying /tmp, BUT BE SURE TO MAKE IT WORLD WRITABLE : # chmod 777 /tmp_mnt/tmp ****************************************** now copy the filesystems: use 'cpio' on root filesystem: cd / ; find . -xdev -hidden | cpio -pdmux /tmp_mnt/root I prefer fbackup for the others (it gets ACLs): (cd /; fbackup -i stand -f -) | (cd /tmp_mnt; frecover -r -f -) (cd /; fbackup -i var -f -) | (cd /tmp_mnt; frecover -r -f -) etc..... update BDRA for vgboot PVs: lvlnboot -r /dev/vgboot/root /dev/vgboot lvlnboot -b /dev/vgboot/stand /dev/vgboot lvlnboot -s /dev/vgboot/swap /dev/vgboot Check config: lvlnboot -v vgboot Boot Definitions for Volume Group /dev/vgboot: Physical Volumes belonging in Root Volume Group: /dev/dsk/cItTd0 -- Boot Disk Root: root on: /dev/dsk/cItTd0 Swap: swap on: /dev/dsk/cItTd0 No Dump Logical Volume configured Update the fstab file on the new root filesystem to reflect the new logical volume names, particularly the VG portion thereof: vi /tmp_mnt/root/etc/fstab /dev/vgboot/stand /stand hfs defaults 0 1 /dev/vgboot/swap ... swap pri=1 0 2 /dev/vgboot/root / vxfs rw,suid,delaylog,datainlog 0 2 /dev/vgboot/usr /usr vxfs rw,suid,delaylog,datainlog 0 2 ... Boot off the new disk to see if it works !!!! You'll have to interrupt the boot process and specify the path to the new disk as the boot device. 18. Altering the baud rate of a serial interfacePROBLEM:How can I permanently set the baud rate of a serial port? Every time I set it and then check it, it is set at 300 baud.SOLUTION:Execute the following two commands: nohup sleep n < tty_port & stty baud_rate < tty_port where n is a large number, for example, 999999999. This sleep command holds the port open for n seconds. tty_port is a serial device file, such as /dev/tty01. baud_rate is the speed at which data will be transmitted over the line, such as 1200, 2400, 9600 or 19200 19. HP-UX Mailing ListThe HP-UX mailing list can be found at: majordomo@dutchworks.nlPlace one of the following in the body of the message: subscribe hpux-admin email-address subscribe hpux-admin-digest email-address20. swinstall not finding targetswinstall needs to be able to do a reverse lookup of the hostname. If DNS is not resolving properly try to rename /etc/resolv.conf and ensure that /etc/hosts has a fully qualified domain name. If this still does not work try to restart swagentd: # /sbin/init.d/swagentd s # /sbin/init.d/swagentd startIf you have had to break the install part way through you may need to remove the file in /var/adm/sw/products/swlock.21. Using both DNS and /etc/hostsTo run both DNS and /etc/hosts you need to set up the /etc/nsswitch.conf file. The easiest way is through SAM, but it can be done by adding the line:hosts: files [NOTFOUND=continue UNAVAIL=continue TRYAGIAN=continue] dnsto nsswitch.conf.22. Patch install hangsIf trying to install a patch on HP-UX 10.20 and the system just hangs, check to see if MeasureWare is running.The MeasureWare Agent often hangs the swinstall process at the Analysis stage.First you will need to kill the swinstall.Remember to remove the lock file: /var/adm/sw/products/swlock.Next disable MeasureWare via "mwa s".You should now be able to install the patch.Finally, restart MeasureWare with "mwa start" to restart.You may also find that the23. Adding new devicesWhen adding new devices, remember to check the kernel subsystem (using SAM) and ensure there is kernel support for the device.24. swinstall not finding targetswinstall uses an IP lookup to determine the hostname.For swinstall to work correctly you need to be able to do an nslookup of the IP address.If you are using /etc/hosts, fix the problem.If you are using DNS you can either fix the DNS entry or temporarily disable DNS by renaming /etc/resolv.conf.After the nslookup has been resolved do an /sbin/init.d/swagentd s/start.25. Limiting the size of core dumpsTo completely suppress core dumps:Bourne-style shells: "ulimit -c 0"C-style shells: "limit coredumpsize 0"If you want to limit dumps to a specific size, specify a number instead of 0, in blocks for Bourne-style shells, or kilobytes for C-style shells.26. Adding additional interfaces to a LANFirst you need to install patch PHNE_12492 to get a command called ifalias. Once you have that patch installed, do the following to add an additional IP: ifalias lan0 add However, this doesn't stick after a reboot. There is a script to fix this posted in the HP-UX mailling list archive at: =3&dn=45061&q=ifalias&fh27. S logging of messages in syslogI had a problem trying to s ftp messages being logged to /var/adm/syslog/syslog.log. Initially I tried playing with /etc/syslog.conf but was pointed in the right direction by the list. The actual file to edit was /etc/inetd.conf. Check for a -l option. Removing the -l should s the logging. Use inetd -c to re-read the config file.28. Finding ports not listed in /etc/servicesTo find open ports that are not listed in /etc/services try using lsof to find out exactly what it is.You can get lsof from the HP porting and archive centre at Try this:lsof -i TCP|grep ":"...to get the image name and PID of the offending process, then just use ps to find out what the heck it is.Here's a (real) example:------root@box> nmap -sT box...911 open tcp unknown...What the heck is running on port 911?root@box> ./lsof -i TCP|grep ":911 "SLSd_daem 1156 root 4u inet 0x02ca2900 0t0 TCP *:911 (LISTEN)Aha! SLSd_daem, PID 1156 is listen()ing on port 911.root@box> ps -AHo user,tty,ppid,pid,args|grep 1156root pts/0 3065 3100 grep 1156root ? 1 1156 /usr/bin/X11/SLSd_daemonroot@box> I know where you live, SLSd_daemon.------Check out the following URL for an authoritative list of port numbers -notes/iana/assignments/port-numbers29. How to add a jetadmin printer from command lineThis is simply done with the command:/usr/hpnp/bin/addqueue -i TYPE -q QUEUE_NAME -h HOST_ADDRESSThe TYPE option comes from the list of printer types given by jetadmin but is not needed.To remove a printer you use the related: removequeue30. Converting /usr to vxfs Create a new partition "newfs -F vxfs" it Mount it (anywhere - say /mnt) Use your favourite backup/restore tool to copy /usr into it Modify /etc/fstab to mount this new usr onto /usr RebootThe rest of the process is a gimme - newfs the old /usr, mount & copy stuff back, put /etc/fstab how it was then reboot.General consensus on the HP-UX list is that this will work - and several people have done it.You can also use Ignite do achieve the same thing.31. Wiping a hard diskOn HP-UX the best way to wipe a disk is to use: mediainitCheck the man page for details.32. FTP: Access DeniedThis is a little FTP "gotcha". If you are getting the message: FTP: Access Denied, check your /etc/shells. If there is no entry ofr a user's shell in this file they will not be able to remote login.33. Finding the MAC addressarp -a will tell you34. Getting rid of stale nfs file handlesRun the command:#fuser -uck /35. FTP umask settingThe ftp daemon (ftpd) uses an internal umask setting, the default being 027.This may be changed by editing the ftpd entry int the /etc/inetd.conf file. For example to change ftpd umask to, say, 022 in /etc/inetd.conf: ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l -u 22Restart inetd (inetd -c)36. Copying printers between serversTo keep consistancy between servers/workstations here is a method to have all servers with the same printer config: On the source server/workstation where you have printer configured make sure that the print queue is empty. Shutdown the spooler tar/cpio "/etc/lp" and "/var/spool/lp" on the source server and startup the spooler. Restore the tar/cpio of /etc/lp and /var/spool/lp from source on to the destination workstations after shutting down the spooler. startup the spooler37. Entering username and passwd with CAPS LOCKThis gettydef allows a user to log into a unix user account with caps lock on (password must also be entered with caps lock on), and receive the password prompt as normal: "Password:", not as "\PASSWORD:".The unix account name and password MUST be truely entered in lower case (in the /etc/passwd file) originally. The key was to eliminate OPOST output processing. This, combined with the user name and password in /etc/passwd in lowcase, and a mod to the .profile file handles it all beautifully!UCgoofy #B38400 CS8 CLOCAL HUPCL IGNPAR ICRNL IXON OPOST ONLCR CREAD ISIG ICANON ECHO ECHOK ISTRIP IXANY TAB3 #B38400 CS8 CLOCAL HUPCL IGNPAR BRKINT ICRNL IXON IXOFF CREAD ISIG ICANON ECHO ECHOK TAB3 #login: # UCgoofyIn order for the user to use the system as a non-caps-locked terminal, they will have to have the following entries in their profile:stty sanestty opost onlcrstty erase "^H" intr "^C"38. Is a system in trusted mode?How do you tell if a system is in trusted mode or not? Try looking at these two:man iscomsec/usr/lbin/getprdef -r39. Mounting a filesystem in a recovery shellYou need to use loadfile and get /sbin/fs/hfs/* and /sbin/fs/vxfs/* to be able to mount filesystems in a recovery shell.40. Clearing the /var/opt/hparray logsI have had the situation with a Model 12 AutoRAID on a K-class running HP-UX 10.20. /var was getting a little to full for my liking and I have found that /var/opt/harray/log is taking up the most space. There are tools in /opt/bin/hparray, namely logprint and arraylog that are supposed to clear this. What I eneded up doing, however, was to delete all files in that directory and then touch LOGCATLG to recreate it. If you don't do the touch, ARMServer supposedly won't restart correctly. I did the delete and touch and had no problems. 2b1af7f3a8