By Chris Byers
Given the complexity of the HP-UX operating system, no one could really say that they know everything there is to know about it. Particularly with the release of HP-UX 10.x, there are a great number of new features and changes.
Hewlett-Packard basically overhauled its operating system with the release of HP-UX 10.0
In the releases from 8.0 to 9.04, the operating system was based on the Berkeley (BSD) style of UNIX. From release 10.0 forward, HP-UX is based on the System V (SVR4) style. This meant, not only a change in the location of system related files and softlinks to old locations for backward compatibility, but a shift in philosophy in the direction of Hewlett-Packard's variant of UNIX.
Hewlett-Packard's goal was to attain compatibility with the OSF (Open Systems Foundation) standard for UNIX operating systems. In doing this, Hewlett-Packard has done its part to ensure industry wide compliance with this standard. Additionally, since HP is the market leader in UNIX operating systems, the rest of the industry is somewhat obliged to follow its lead.
In this section we will cover such subjects as finding HP-UX stuff, third party vendors, utilities, HP-VUE, the HP-UX operating system, programming libraries, compilers and linkers, various hardware and peripherals, file locations, version 10.x specifics and version 9.10 specifics.
The biggest theme that you will find throughout this section is the differences between version 9.x and 10.x, and how to get them to work together.
This section covers some of the more common questions on how to find resources for the HP-UX operating system.
Here are a few sites with a description of their contents:
Site: ftp://interworks.org/pub/comp.hp
Contents: The InterWorks HP-UX Library in the directory pub/comp.hp as described above. The iworks node also keeps the last four to six months of comp.sys.hp.hpux online (via an InterWorks member logon. An archive going back to June 1990 is available. Contact the InterWorks librarian for details.
Additionally, a large (about 1300 line) "HP-UX Troubleshooting Guide" is available under the InterWorks member logon.
| Name: | ftp://hpux.csc.liv.ac.uk |
| Contents: | Over 1,000 packages ported to HP-UX 8.X and 9.X |
| Name: | http://hpux.csc.liv.ac.uk/ or http://hpux.cae.wisc.edu/ or http://hpux.ask.uni-karlsruhe.de/ or http://hpux.cict.fr/ or http://hpux.ced.tudelft.nl/ARCHIVE/archive_intro.html or http://hpux.ee.ualberta.ca/ or http://hpux.dsi.unimi.it/ |
| Contents: | WWW interface to the above HP-UX archive |
| Name: | gopher://hpux.csc.liv.ac.uk |
| Contents: | Gopher interface to the above HP-UX archive |
| Name: | wais://hpux.cict.fr/hpux |
| Contents: | WAIS interface to the above HP-UX archive |
There is also a mail server at mail-server@csc.liv.ac.uk for users without FTP.
| Name: | ftp://hpux.ask.uni-karlsruhe.de |
| Contents: | Official German HP-UX archive site (same as hpux.csc.liv.ac.uk) |
| Name: | ftp://hpux.cae.wisc.edu |
| Contents: | Official US HP-UX archive site (same as hpux.csc.liv.ac.uk) |
| Name: | ftp://hpux.cict.fr |
| Contents: | Official French HP-UX archive site (same as hpux.csc.liv.ac.uk) |
| Name: | ftp://hpux.ced.tudelft.nl |
| Contents: | Official Netherlands HP-UX archive site (same as hpux.csc.liv.ac.uk) |
| Name: | ftp://hpux.ee.ualberta.ca |
| Contents: | Official Canadian HP-UX archive site (same as hpux.csc.liv.ac.uk) |
| Name: | ftp://hpux.dsi.unimi.it |
| Contents: | Official Italian HP-UX archive site (same as hpux.csc.liv.ac.uk) |
| Site: | ftp://export.lcs.mit.edu |
| Contents: | The X Window System and contributed clients. |
| Site: | ftp://hpcvaaz.cv.hp.com |
| Contents: | X Window System libraries and utilities. ftp://hpcvaaz.cv.hp.com/readonly/hp-vue/ENWARE/released/b0502 contains the latest version of the Envisex and other HP X station software. There are subdirectories for HP-UX hosts, Solaris and SunOS. |
| Site: | ftp://ftp-boi.external.hp.com |
| Contents: | Drivers for HP printers. |
| Site: | ftp://lut.fi/pub/hpux ftp://lut.fi/pub/unix/hp-ux |
| Contents: | Various |
| Site: | ftp://nic.funet.fi/pub/unix/arch/hpux |
| Contents: | Various |
| Site: | ftp://prep.ai.mit.edu |
| Contents: | The Free Software Foundation's GNU utilities, etc. |
| Site: | ftp://hybrid.irfu.se/pub |
| Contents: | X11 archive and shared libraries, full imake support, and all missing .h files for both X11R4 and R5, dvi2pcl. |
| Site: | ftp://geod.emr.ca |
| Contents: | GNU stuff ported to HP-UX 9.x by Pierre Mathieu. |
| Site: | http://www.cup.hp.com/netperf/NetperfPage.html |
| Contents: | netperf, a network performance measurement tool. |
| Site: | ftp://jazz.gsfc.nasa.gov |
| Contents: | bathymetry, FFT, graph, pgplot, triangulation, sortroutine |
| Site: | ftp://us.external.hp.com |
| Contents: | HP-UX patches available from FTP for SupportLine customers. |
| Site: | ftp://patch.external.hp.com |
| Contents: | European mirror of us.external.hp.com |
| Site: | ftp://jaguar.cs.utah.edu/dist Currently available in the dist directory: gdb-4.13.u4 binutils-2.5.2.u4 gcc-2.6.3.u6 libg++-2.6.2.u2 |
There is no more hpgdb, and gas is now bundled in the binutils.
The prebuilt binaries can be retrieved all at once from
hpuxbin.tar.Z, or in pieces from the hpuxbin directory.
| Site: | ftp://ftp.cs.colorado.edu/pub/sysadmin/utilities/ |
| Contents: | sudo in cu-sudo.v1.3.1-beta9.tar.Z |
| Site: | ftp://ftp.amtp.cam.ac.uk/pub/HP |
| Contents: | ntalk in ntalk.tgz |
| Site: | http://www.am.qub.ac.uk/world/lists/hpmini-l/ |
| Contents: | Contains an archive of messages from the HPMINI mailing list, which is dedicated to topics directly relating to Hewlett-Packard workstations and primarily those running HP-UX. There are also other pointers to HP-UX information. |
On the 9.x systems, there is an installation directory where all the patches are stored. This is the /system directory, and all patches will be included in subdirectories named for the patch. For example, if the patch was the PHSS_9999 patch, there would be a directory named /system/PHSS_9999. The contents would probably look like this:
CDFinfo copyright customize index new/ orig/
The two subdirectories /system/new and /system/orig contain any modules that were not installed with the patch and the modules that were replaced by the patch, respectively.
Really, the only file that you don't need to archive and get off the disk are the customize file, since it has a list of the modules replaced.
The patches that have been installed are listed in the /etc/filesets directory. A listing of this directory will show what patches have been put on the system.
If the preceding files and directories are missing, there may not be any easy way to tell what is installed, aside from checking the results of what commands against the PHSS_xxxx.txt file.
In 10.x, it is a little easier to list the current patches on the system. The swlist command gives a list of the installed patches, as well as some detail into what modules were and weren't installed. In addition, the swinstall command can be somewhat useful in finding installed patches.
The web address is http://us.external.hp.com/. You can download patches from this site, and pointers are available for other related sites.
Here's a short list of publications that cover only HP-UX:
Cardinal Business Media, Inc.
101 Witmer Road
Horsham, PA 19044
Publications and Communications, Inc.
12416 Hymeadow Dr.
Austin, TX
Well, there aren't that many out there, but the best one I know of is The HP-UX System Administrator's "How To" Book by Marty Poniatowski, published by Printice Hall Hewlett-Packard Professional books, ISBN 0-13-099821-4.
I use this book a lot, and it is probably more used than any other manual I have. In one particular instance, I couldn't find any material to decipher the text-based version of glance plus I was using. The only source of information I could find was that book, and it was quite thorough. There are also a lot of good tips for both workstation and server administration that you probably won't get anywhere else.
There is an HP-UX system administration mailing list run by Bart Muyzer to which you can subscribe. All you have to do is send e-mail to majordomo@cv.ruu.nl with the subject SUBSCRIBE. The body of the message should read:
subscribe hpux-admin end
This will automatically subscribe you to the e-mail service. If you have any questions about the service, just go to the address owner-hpux-admin@cv.ruu.nl.
HP's main site is at http://www.hp.com. From there, you can search for product information and more.
The support line page is located at http://us.external.hp.com. Here you can resolve software problems by searching up-to-date support and problem-solving databases.
Here are some other HP-related WWW sites:
| Site: | http://hpwww.epfl.ch/HPUX/tools/disktab.html |
| http://hpwww.epfl.ch/bench/bench.html | |
| http://hpwww.epfl.ch/ | |
| Or send mail to mailer@hpwww.epfl.ch to access disktab information. | |
| Contents: | Contains many disktabs for non-HP disks |
| Site: | http://hpux.csc.liv.ac.uk/intro.html |
| Contents: | Interface to the Liverpool archive, including package descriptions, man pages, and screen shots as well as the packages themselves. Also includes a WAIS server (wais://www.csc.liv.ac.uk/hpux) for searching HTML documents relating to the archive. |
| Site: | http://hpux.ced.tudelft.nl/HPUX_ADMIN_ARCHIVE/ |
| Contents: | Archive for the hpux-admin mailing list. |
| Site: | http://www.eel.ufl.edu/~scot/tutor/ |
| Contents: | HP-UX 9.x Tutorial. |
| Site: | http://hpux.ced.tudelft.nl/HPUX_ADMIN_ARCHIVE/index.html |
| Contents: | System Administrators Mailing List for HP-UX. |
| Site: | http://hpwww.epfl.ch/ |
| Contents: | French speaking HP WWW support (some information, such as benchmarks and disktab entries, also in English). |
| Site: | http://www.eel.ufl.edu/~sessiont/tutorial/tofc.html |
| Contents: | HP-VUE tutorial. |
| Site: | http://www.interex.org/ |
| Contents: | Information from Interex. |
| Site: | http://www.InterWorks.org/ |
| Contents: | Information from InterWorks. |
You can get the electronic versions of the guide at the Interworks Library. You can access the library by:
FTP: www.interworks.org
WWW URL: ftp://www.interworks.org
/pub/comp.hp/porting_info/
sun_hpux_port_ascii_0295 ASCII version of the Porting Guide
sun_hpux_port_html_0295.tar WWW HTML version of the Porting Guide
sun_hpux_port_ps_0295.tar Postscript (level 3) version
The following is a list of vendors for HP-specific products:
Third-party vendors for RAM:
The following vendors are listed in alphabetical order. No guarantees are made regarding compatibility or relative merit of the vendors. Table 29.1 contains other vendors and their products associated with HP-UX.
| Camintonn 22 Morgan Irvine, CA 92718 (800) 843-8336 (714) 454-6500 |
Clearpoint Research Corporation 1000 E. Woodfield Road, Suite 102 Schaumburg, IL 60173 Schaumburg, IL 60173 |
| Concorde Technologies 7966 Arjons Dr. B-201 San Diego, CA 92126 (800) 359-0282 (619) 578-3188 |
Dataram PO Box 7528 Princeton, NJ 08543-7528 (800) DATARAM (800) 799-0071 |
| Digitial Micronics 2075 Corte Del Nogal Unit N Carlsbad, CA 92009 |
Eventide 1 Alsan Way Little Ferry, NJ 07643 (201) 641-1200 |
| Helios Systems 1996 Lundy Ave San Jose, CA 95131 (408) 432-0292 (800) 366-0283 |
Herstal Automation 3171 West Twelve Mile Rd. Berkley, MI 48072 (313) 548-2001 |
| IEM P.O. Box 1889 Fort Collins, CO 80522 (800) 321-4671 (303) 221-3005 |
Infotek Systems 625 South Lincoln Suite 204 Steamboat Springs, CO 80487 (800) 767-1084 |
| Intelligent Interfaces P.O. Box 1486 Stone Mountain, GA 30086-1486 (800) 842-0888 |
ISA Ltd 1-1-5 Sekiguchi Bunkyo-Ku Tokyo 112 Japan 81-3 (5261) 1160 US Office (Texas) (713) 493-9925 |
| Kelly Computer Systems 1101 San Antonio Rd. Mountain View, CA 94043 (415) 960-1010 |
Kingston Technology Corporation 17600 Newhope Street Fountain Valley, CA 92708 (714) 435-2600 |
| Martech 1151 W. Valley Blvd. Alhambra, CA 91803-2493 (800) 582-3555 (818) 281-3555 |
Merida Systems (617) 933-6790 |
| MDL Corporation 15301 NE 90th St. Redmond, WA 98052 FAX (206)861-6767 (800)800-3766 (206)861-6700 |
|
| Newport Digital 14731 Franklin Avenue Suite A Tustin, CA 92680 (714) 730-3644 |
R Squared 11211 E. Arapahoe Rd., Suite 200 Englewood, CO 80112 (303) 799-9292 (800) 777-3478 |
| GFKT HCS Computertechnik GmbH Oldesloer Str.97-99 22457 Hamburg Germany |
| Vendor | Product(s) |
| Andataco Road 10140 Mesa Rim San Diego, CA 92009 (619)453-9191 inquire@andataco.com |
System integrator and peripheral reseller |
| Disk Emulation Systems, Inc. 3080 Oakmead Village Dr. Santa Clara, CA 95051 FAX: 408-727-5496 (408)727-5497 diskmsys@netcom.com |
Solid-state disk emulators (SSDs) |
| IEM, Inc. 1629 Blue Spruce Drive Fort Collins, CO 80524 Voice: (303)221-3005 FAX: (303)221-1909 email: info@iem.com |
Tapes (4mm, 8mm, QIC, 3480), disks, optical, floppy and backup software. SCSI and HP-IB peripherals. |
| Interphase Corporation Dallas, Texas 75234 (214)919-9000 |
High performance bus interfaces 13800 Senlac (EISA/FDDI, VME/ATM.) |
| ITAC Systems, Inc. 3113 Benton St. Garland, TX 75042 (800)533-4822 yvonne@moustrak.com |
Supports Mouse-trak trackball for HP-HIL |
| MDL Corporation 15301 NE 90th St. Redmond, WA 98052 FAX (206)861-6767 (800)800-3766 (206)861-6700 |
Disk, tape, optical, jukebox, EISA expansion, RAID, others. |
| Modular Industrial Computers (615)499-0700 Norma Hansen |
MICHIL PS2 to HP-HIL converter. Allows standard PC keyboards and mice to be connected to HP Workstations. |
| SBE, Inc. 4550 Norris Canyon Road San Ramon, CA 94583-1389 (510)355-2000 (800)925-2666 fax (510)355-2020 |
EISA serial and SCSI boards. |
| Texas ISA 14825 St. Mary's Lane Suite 250 Houston, TX 77079 (713)493-9925 (800)361-2258 sales@texasisa.com support@texasisa.com |
SCSI & HP-IB External Storage Sub-Systems. UNIX Power Management Solutions-Auto. Startup/Shutdown Devices for networked and non-networked UNIX systems. |
| Vital, Inc. 4109 Candlewyck Drive Plano, TX 75024 U.S.A (214) 491-6907 (214) 491-6909 info@vital.com |
Modern Graphical File Editor With Enhanced Softbench Encapsulation. |
| Workstation Solutions One Overlook Drive Amherst, NH 03031-2800 Voice: (603) 880-0080 FAX: (603) 880-0696 jimm@worksta.com (Jimm Parsons, Technical Services Manager) |
Data backup and recovery solutions. |
| Confluent, Inc. 132 Encline Court San Francisco, CA 94127 Voice: (415) 586-8700 FAX: (415) 586-8700 info@confluent.com http://www.confluent.com |
UNIX diagramming and flowcharting tools for engineering, technical, and business graphics. |
Respond to the configuration questions as follows:
This section covers questions on the HP-VUE X windows based graphics system.
As you may have noticed, HP does not ship a full set of X11 libraries and include files, and does not provide imake or associated tools. There is an HP-maintained, but UNSUPPORTED, set of X11R4 libraries and utilities for the HP 9000 Series 300, 400, 700, and 800. You can get the libraries, include files, and config files (imake) via anonymous ftp from
ftp://hpcvaaz.cv.hp.com/pub/MitX11R4/libs.s*00.tar.Z
The above file is archived on the iworks node. HP has also submitted X11R5 sources to the iworks node, and Bo Thide has X11R4 and R5 support available via anonymous FTP, as mentioned above.
Note that imake is shipped with HP-UX 10.x.
To do this, you must change the following: Set Vuewm*backdrop*image: none. In the Style Manager for HP-VUE 3.0, there is an explicit choice for this option.
When the backdrop is clear, you can use xloadimage, xsetroot,or xv to display the image of your choice.
First you must set the resources:
Hpterm*scrollBar:TRUE Hpterm*saveLines:1024
The saveLines setting can be any large number you choose for saving the number of lines in a window. This number can also be specified for the number of screens you would like to save, such as 4s for four screens. You can do this interactively by using the command hpterm -sb -sl 1024.
These settings can be placed in the app-default file (/usr/lib/X11/app-defaults/Hpterm).
You can have the hpterm window come up with these setting from the VUE panel terminal icon. You can also have their login shell run at the startup of the terminal.
To do this, you must modify the default action of the VUE panel. For a system-wide change, you must modify the /usr/vue/types/xclients.vf file. Simply modify the line hpterm to read hpterm -ls -sb -sl 400. For example:
| ACTION | Hpterm |
| TYPE | COMMAND |
| WINDOW-TYPE | NO-STDIO |
| EXEC-STRING | hpterm -ls -sb -sl 400 |
| DESCRIPTION | The Hpterm action starts an hpterm terminal emulator. |
This short program should do the trick:
/* Quick and dirty program to put argv[1] in the title bar of an hpterm
Tom Arons March 1992
*/
#include <string.h>
main(argc,argv)
int argc; char **argv;
{
printf("\033&f0k%dD%s", strlen(argv[1]), argv[1]);
printf("\033&f-1k%dD%s", strlen(argv[1]), argv[1]);
}
An alternative is
#!/bin/sh
LENGTH='strlen $1'
echo "&f0k${LENGTH}D$1\c"
That's ESC between the first quote and the f0k.
strlen, in case you don't have it, comes from:
#include <stdio.h>
main(argc, argv)
int argc;
int *argv[];
{
if (argc != 2)
exit(0);
printf("%d\n", strlen(argv[1]));
}
To set the title in the icon:
#!/bin/sh
LENGTH='strlen $1'
echo "&f-1k${LENGTH}D$1\c"
Where the & is ESC.
Or, you could do it the easy way and start a new window with nohup, run it in the background, and exit out of the original window, using hpterm with the -title option. For example:
nohup hpterm -title (window title) &
Then you can exit out of the original window.
If you are using the C Shell, check to see if the autologout is set. The default is 60 minutes.
To get rid of this problem, simply edit your .cshrc file and add the line unset autologout.
If you are using the Korn shell, there is a value that may be set for the shell variable TMOUT. To get rid of the timeout period, set this variable to 0.
This is a problem specific to Sun workstations. There is a patch available from Sun; OW3 patch 100444-35 or the current replacement patch.
This was supposed to be fixed in OW 3.0.1. If you are unable to get a patch or you just need a temporary fix, you can get around this problem by setting the X resource *useColorObj: False on the Sun workstation side of things.
The documentation indicates your ~/.vueprofile should contain either csh, or sh/ksh syntax, depending upon what your login shell is. When csh is my login shell, I set my ~/.vueprofile to contain only two lines:
if ( -f /etc/csh.login ) source /etc/csh.login if ( -f ~/.cshrc ) source ~/.cshrc
When sh/ksh is my login shell, I set my ~/.vueprofile to contain only two lines:
test -f /etc/profile && . /etc/profile
test -f ${HOME}/.profile && . ${HOME}/.profile
So, before starting the window manager and any clients, VUE makes sure that all my shell startup files are sourced and all the variables I want in my shell environment are already there and waiting for me.
First, you need to designate an hpterm session as the window that will receive console messages. That's the easy part. The hard part is getting some kind of clean output that you can actually read.
You need to put this line into your ~/.vue/sessions/home/vue.session file (note that the second line is wrapped for readability):
# Start up the Terminal Console as iconic, and raise it if any output vuesmcmd -cmd "hpterm -C -iconic -ls -sb -sl 256 -name Console -T Console -xrm *mapOnOutputDelay:\ 30 -xrm *mapOnOutput:\ True -xrm Console*clientFunctions:\ -close -xrm *workspaceList:\ all"
When you restart your workspace, this should pop up a window with the output of the system console messages.
You need to add an entry into the ~/.vue/vuewmrc file:
Menu VueWindowMenu
{
"Restore" _R Alt<Key>F5 f.normalize
"Move" _M Alt<Key>F7 f.move
"Size" _S Alt<Key>F8 f.resize
"Minimize" _n Alt<Key>F9 f.minimize
"Maximize" _x Alt<Key>F10 f.maximize
"Lower" _L Alt<Key>F3 f.lower
no-label f.separator
"Occupy..." _O Alt<Key>O f.workspace_presence
"Occupy all" _a Alt Shift<Key>O f.occupy_all
no-label f.separator
"Remove from WS" _e Alt Shift <Key>F4 f.remove
"Close" _C Alt<Key>F4 f.kill
You also have to add the resource
Vuewm*windowMenu: VueWindowMenu
and restart the window manager. Then you should be good to go.
If you are using the C shell, the problem is located in the initial settings for LINES/COLUMNS. You can work around this problem by adding the following to .cshrc:
if ( $?WINDOWID ) then set noglob;eval '/usr/bin/X11/resize';unset noglob endif
A patch is available for this problem. It is PHSS-2753. I suggest that you get the patch and implement it as soon as you can, especially if you use the xterm window a lot.
Here is one recommendation that is documented for X terminals (it works for workstations too). This takes advantage of the fact that Vue sets several environment variables for the session, one of which is USER.
Modify the /usr/lib/X11/vue/Vuelogin/Xsession (pre-9.0 HPUX) or the /usr/vue/config/Xsession (9.0 HPUX and later) file:
2. Add a following case statement to fit your needs. It should look something like:
case $USER in
martha | joe) startup=${HOME}/.x11start''
esac
You can add as much or as little intelligence to this as you like. The above assumes that the users' have a .x11start script in their home directories, that its permissions are correct, and so on. You can build in a fallback mechanism. For example, the script will check to see if the user has a .x11start script and, if not, fall back to /usr/lib/X11/sys.x11start. To see an example of this logic, do a more(1) on /usr/bin/x11start.
The above case statement is documented in Chapter 2 of the "HP 700/RX System Administrators Guide."
Another method of disabling VUE assumes you have a .xsession file that starts up your initial xterms, other programs, and window manager. Replace your ~/.vueprofile with:
#! /bin/sh exec sh $HOME/.xsession
Note that the first line was needed, because /usr/lib/X11/vue/Vuelogin/Xsession looks for the shell it wants to use.
You could try to unplug the keyboard for about five seconds and plug it back in. If you do this, you must run xset -r to get the autorepeat back.
You should be able to do this by running the command client -xrm workspaceList:<name>.
First, you must copy the global vuepad to your home directory:
cp /usr/vue/types/vuepad.vf $HOME/.vue/types
Next, you must edit the vuepad.vf file and change the ACTION PRINT_PR_VPAD line as follows:
# The PRINT_PR_VPAD
This action paginates its arguments using pr(1) and prints. It uses arg 2 for a title. It then removes the temp # file. This action is used by the client vuepad.
ACTION PRINT_PR_VPAD
TYPE COMMAND
WINDOW-TYPE NO-STDIO
EXEC-HOST %LocalHost%
EXEC-STRING /bin/sh -c "pr -h %Arg_2% %(File)Arg_1% | \
lp -d%"Printer:"%; rm %(File)Arg_1%"
END
If you implement this, the dialog box will prompt you for the printer name.
Be careful that you don't have the LPDEST set in your .vueprofile, because lp will use that instead of the system default.
This can be configured in your /usr/vue/config/Xstartup. Here is a good example of a configuration:
if [ -f /etc/securetty ] &&
# pwget is an HP command which checks also for Yellow Pages.
# exit code from awk is inverted (!) since sh's tests are...
# === a more simple test would be [ "$USER" = root ] ===
pwget -n "$USER" | awk -F: '{ exit !($3 == 0) }'; then
echo Root Login not allowed | /usr/lib/X11/ignition/text_dialog ERROR
exit 1
fi
if [ -f /etc/nologin ]; then
exit 1
fi
exit 0
See man vuelogin(1X) for more details.
This section focuses on operating system-specific issues, the solutions to which may not be so obvious.
The best thing to do is to go into SAM under the disks and filesystems section to set up your CD-ROM. Sam not only gives the advantage of ease of use, but it also ties up all the loose ends, such as creating the entry in the /etc/checklist file.
Go into filesystem, then pull down Actions|Create a New Filesystem, then choose non-lvm filesystem. A list will pop up showing the configured disks on the system, one of which will be your CD-ROM. Now fill in the required fields. You will have to already have a directory created to which you mount the filesystem; /cdrom is often the directory name used.
Well, it ain't easy, but it can be done, though somewhat indirectly.
There are two schools of thought on this one: Rebuild the system from scratch, or move subdirectories and their contents to other mounted filesystems.
If you opt for rebuilding the system, you could actually look into building a new system on another group of disks and having two operating systems from which to choose on the same server or workstation.
Basically, all you have to do is define the primary boot path to the new root disk, install the operating system to that disk and modify certain system files, such as /etc/fstab, to point back to the original filesystems (except for the root filesystem, of course). I make it sound much easier than it is, but this procedure is actually well documented in the HP manuals.
If you decide to move the volatile directories (/usr, /opt, /var, and other user created filesystems to other filesystems, it may be a better idea if you don't have the extra disk space. You can only do this if you haven't already set up the usual volatile filesystems separate from the root, or if a directory or two is unusually large in the root filesystem.
Here, you want to do one of two things: You can create different filesystems and create links from the original directories; or you can move everything in the original directory to a temporary location, recursively delete everything from the original, create a logical volume with the appropriate amount of space, mount the filesystem from that directory, and move everything back from the temporary location. This must be done in single-user mode.
If you choose to do it the latter way, be very cautious; certain files and directories may not be very obliging to you, and the system may become confused. Be especially careful around device drivers. A system panic is not a pretty site.
Also, as with any kind of operating system surgery: ALWAYS MAKE A FULL BACKUP FIRST!!! This has come to be known as the "save your É job" step.
Whatever you choose, define a clear plan, document everything, and do a quick runthrough before you even consider giving the patient any anesthesia.
No. What you must do is mount the CD using the pfs subsystem instead of the CDFS subsystem, as is the default. This will allow you to use lowercase.
Upgrading isn't that bad. As a matter of fact, it is preferable to do an upgrade because it provides transition links that will allow you to continue to use the old path names from 9.04, and it keeps important things intact, such as /etc/hosts, /etc/passwd, and more.
Since upgrading from 9.04 to 10.01 is really upgrading from the BSD-based UNIX to System V-based UNIX, many commands get moved to comply with the System V standards. For example, all of the lvm commands get moved from /etc to /usr/sbin.
Additionally, an upgrade will retain your site-specific information and provide analysis tools to help you convert any customized scripts you might have. The snoop tool is used to identify errors that will pop up when you upgrade, so you have a chance to straighten out any problems before they arise. This will help you to not run into an abort situation on upgrade, which can completely hose your system.
As always: DO A FULL BACKUP FIRST!!!
In general, the NFS server provides the basic file sharing capabilities (nfsd), as well as the establishment of connections through mountd. In its basic form it's used between all UNIX machines, which use intrinsic multi-user authentication systems using UNIX user name and UNIX user IDs. When a user logs into an NFS client machine, she is using its native authentication system to obtain a user ID. She can then access files using the user ID. By implication, both systems have the same view of the users. Since this is the case, the security authentication is performed by the NFS server machine.
The access control of the filesystem is done at the host level by exporting or publishing filesystems on the NFS server to individual workstations or to all NFS client workstations. Once exported, the NFS client can explicitly choose to mount any or all of these filesystems.
To enable file sharing between heterogeneous operating systems that employ different authentication systems, use the PCNFS utility. The NFS client is then deemed insecure, and the mount authentication is deferred to the NFS server or another delegated UNIX host.
The PC compatibility server PCNFSD handles this process at the server side. An NFS client initiates a filesystem mount by forwarding a UNIX username and password to the PCNFSD server. The username and password are then validated, and a corresponding UNIX user ID is obtained on behalf of the NFS client. Once the mount is established, the original NFS server NFSD handles file requests.
Filesystem access is then controlled by exporting to specific hosts and also by requiring the user name and user ID. Also, the PCNFSD can provide additional file locking and printer sharing capabilities.
To start PCNFS in HP-UX 9.x:
Edit the /etc/netnfsrc file and change the line
PCNFS_SERVER=0
to
PCNFS_SERVER=1
To start PCNFS in HP-UX 10.x:
Edit the /etc/rc.config.d/nfsconf file and change the line
PCNFS_SERVER=0
to
PCNFS_SERVER=1
On both systems you must reboot the server to enable PCNFS.
There is a program called LLNL XDIR. It provides a graphical user interface for file transfer and for direct manipulation of local and remote directories on UNIX and a few non-UNIX machines. It offers the ability to view directory information in four different formats, ranging from long lists to tree structures.
LLNL XDIR is based on UNIX, C, OSF/Motif, and FTP, so it is portable across most platforms.
Neale Smith of the Lawrence Livermore Computing Department wrote the code, and it is available at:
ftp://coral.ocf.llnl.gov/pub/ia/llnlxdir/latest_xdir.tar.Z
You can also check out the web site at:
http://www.llnl.gov/ia/xdir.html.
According to HP documentation:
"Complete year-2000 functionality will be fully supported with HP-UX 10.30, currently scheduled to be available in the summer of 1997. HP will patch 10.01, 10.10 and 10.20."
They are apparently not patching 9.04. Guess you might have to upgrade.
You can use the lsof command to show all open files for all processes or just their listing via a wide range of filtering options, including Internet address selections.
If you don't have losf loaded on your machine, you can pick up a free copy at:
ftp://vic.cc.purdue.edu/pub/tools/unix/lsof
There is actually a bug for which you must get a patch. You need to access the HP patch site to get it, or you can call the HP support line to have them send you a tape.
The Dynamic Buffer Cache is used in 10.x instead of "buffpages" for disk buffers. So the Oracle database will compete for the same memory as your disk buffers, which probably accounts for some very poor cache performance.
If you set that parameter to a lower number, say, 10 percent, you should get more performance out of your database.
The settings may be wrong in your elm configuration file. Check the $HOME/.elm/elmrc file to see if these values are set:
keypad = ON softkeys = ON
First, you must mount the CD as a filesystem. Create a directory off the root (usually /CDROM) and use SAM to mount the CD to that directory. Then when in the swinstall window, specify the software depot as /CDROM. Now you can choose the software to install (after you enter the code words, of course).
If you are using the VxFS filesystem, it is altered dynamically. If you're using HFS (standard), you will have to use newfs or mkfs to rebuild the filesystem. Unfortunately, this will also destroy all the files on this filesystem.
You can use the -i option with newfs or mkfs to change the number of inodes.
You should keep in mind, though, that when you increase your inodes, you lose disk space for files.
If you don't already have long filenames, you can use the /etc/convertfs utility to change to long filenames. This is a one-way street, however. You can't go back after you've made the change.
To check for the existence of long filenames, do the following:
tunefs -v /dev/rdsk/(disk driver) |grep magic
You will get output that looks something like this:
magic 95014 clean FS_OK time Tue Mar 23 14:13:01 1993
If the number in the second field is 95014, long filenames is installed on this file system. If the number equals 11954, the4 system is set to short filenames.
Then getconf command can also be used on each directory as follows:
getconf NAME_MAX (directory)
You can check the /etc/filesets directory. There you will find a file for each fileset that has been loaded which summarizes the files in that fileset. Several utilities use this directory, such as /etc/update, /etc/updist, /etc/netdistd and /etc/rmfn for unloading and loading software.
On HP-UX 10.x there is a utility to do just this. Just use the swlist command.
On HP-UX 9.x, the /etc/rmfn command will remove HP software cleanly. On HP-UX 10.x systems, the utility is swremove.
The mail delivery agent /bin/rmail needs to be able to chown(2) these files. It cannot do so if you have removed the privilege CHOWN (see setprivgrp(1m); removing CHOWN is recommended to prevent cheating on disk quotas).
To get around this, noting that /bin/rmail runs setgid to group mail, you can grant privilege CHOWN to group mail only by inserting the line mail CHOWN in /etc/privgroup. The change takes effect on the next reboot, or immediately if you execute the command setprivgrp -f /etc/privgroup.
There are several fundamental things to remember about HP-UX licensing:
Ascii Terminals:
The simple rule to remember is any ASCII terminal that is logged in counts as a user.
ASCII terminal connections come in several different forms:
X-terminals and workstations:
When a customer buys an X-terminal or workstation from HP or from another vendor, HP acknowledges that the customer has also bought a single UNIX license-to-use.
Therefore, the customer has the right to an unlimited number of logins and terminal windows over the LAN to a Series 700 or Series 800 from either X-terminals or workstations. These logins can be via X terminal windows (hpterm and xterm), telnet, rlogin, or other means.
PC's that use X terminal emulation software, such as XView, each count the same as an X terminal. This is because the PC essentially becomes an X terminal when it is running the X server software. Therefore, when a PC is running an X terminal emulator, the PC has the right to an unlimited number of logins to an HP-UX system.
Exceptions:
The policy of counting DTC users is new for the Series 700. Customers who purchased Series 700 systems prior to HP-UX 9.0 shipments (late 1992) and use them as host systems for multiple DTC-connected terminals, may continue to use those configurations without buying a license upgrade.
An update to HP-UX 9.0 will not lock out these configurations.
On 9.x, you can run the command what /hp-ux. This will give you a list of patch strings. This you can compare to the strings in the patch text file to see if the patches are actually loaded or not.
There are two ways of doing this. You can either run (from the super user login) init 1, which will bring the system run level down to single user mode, or you can have it switch at bootup.
If you choose to do it the hard way, do the following:
The system will now boot into single user mode.
This is usually a problem associated with a user's home directory being in an NFS mounted directory.
The workaround to the problem is to completely unprotect (chmod 777) .sh_history, or you can point to a different HISTFILE somewhere on your local machine.
Yes. The following code in /etc/profile prints the copyright notice the first time each user logs in:
NUMLOGINS='/etc/last -2 $LOGNAME | wc -l'
if [ $NUMLOGINS -lt 2 ]
then
cat /etc/copyright
fi
And, for /etc/csh.login:
set NUMLOGINS='/etc/last -2 $LOGNAME | wc -l' if ( $NUMLOGINS<2 ) cat /etc/copyright
Here a few things that you can do:
$ chmod -x /usr/bin/quota
The first limiting factor is probably swap space. The combined virtual data space of all running processes can't exceed swap size. Run /etc/swapinfo -t and look at the total line. That's all you have left.
For FORTRAN programs:
HP does not support this, but you can still install it if you want. First, make sure ram is configured into your kernel and then make device files with major 9 (both blcok and char), minor 0xVSSSSS, where V is the volume number, SSSSS is the number of sectors in the ram disk, and a sector is 256 bytes.
An example would be:
mknod /dev/ramlm c 9 0x101000
This would make a 1 MB ram disk. Next, you must make a file system on it, and mount it to be used:
mkfs /dev/ramlm 1024
In addition, you will have to make a block device file.
Here are a couple of scripts to run from cron:
#!/bin/sh
DAYS=7
find /tmp /usr/tmp -depth -hidden -fsonly hfs -atime +$DAYS -exec rm -rf {} \;
The -depth option ensures that no directory is removed before its contents; -fsonly hfs is used because occasionally I've NFS-mounted directories there, and it's better to do the clearing in the machine where it's local, and -hidden is used in case a CD-ROM filesystem (CDFS) appears there for some reason.
Another way of doing it is:
#!/bin/sh
DAYS=7
DIRS="/tmp /usr/tmp"
find $DIRS -type d -atime +$DAYS -exec rm -rf {} \;
find $DIRS ! -type d -atime +$DAYS -exec rm -f {} \;
Following is a sample file that lists the sdsadmin commands to divide a disk into two partitions. Note that this is specific to the M2654SA disk; your mileage may vary. The mediainit is probably not required if the vendor has formatted or verified the disk. It is not supported to partition the boot disk, and you must go through some contortions to do it.
Note also that, in order to have several partitions on the root disk and have swap, you must create another partition that you dedicate to swap.
Note that 10.x s700 systems support LVM, which allows great flexibility in partitioning.
# # SDS configuration file for this node. # # To rebuild the /u1 and /news Fujitsu M2654SA disk partitions, do: # mediainit -v /dev/rdsk/c201d5s0 # sdsadmin -m -C /usr/local/etc/sdsadmin.config.u1news /dev/dsk/c201d5s0 # newfs -L -n -v -m 2 -i 16384 /dev/rdsk/c201d5s1 HP_M2654Su1x1-2 # newfs -L -n -v -m 2 -i 2048 /dev/rdsk/c201d5s2 HP_M2654Su1x1-2 # # Disk partitions: # # 1 /u1 145xxxx 1K blocks (/dev/dsk/c201d5s1, /dev/rdsk/c201d5s1) # 2 /news 55xxxx 1K blocks (/dev/dsk/c201d5s2, /dev/rdsk/c201d5s2) # - ----- ------- # 2006016 1K blocks # type M2654Su1x1-2 label u1_news partition 1 size 1450000K partition 2 size max
You can get all fonts, line widths, and sizes on a Laserjet printer as follows:
zcat manfile.1 | nroff -man -Tlj | lpr (printer)
To get a PostScript printout, with the GNU groff, do the following:
zcat manfile.1 | groff -man -Tps | lpr (printer)
For man pages with tables, you will also have to pipe the output through tbl.
Also, some man pages may need the HP macros to print. For example:
zcat manfile.1 | groff -t -e -C -M/usr/lib/tmac -man -Tps | lp (printer)
You can also print off a more crude version of the man pages by simply piping the output to the lp command, using the -onroff option:
man <manfile> | lp -onroff
There really is no way to limit core files in the standard shells. However, there are a couple of workarounds if you know where to expect core dumps to take place.
One is to create a directory called core with no permissions (000) in the directory in which you expect a core dump to occur. Or you could create a file called core in the directory where the dump occurs and link it to /dev/null.
Two programs are available that act as wrappers around other programs that you may expect to dump. These are nocore and corelimit.
In addition, some shells are publicly available, such as tcsh, which allow you to limit core files.
The only exception to the rule for standard shells comes in version 10.10 and later, where the csh does allow you to limit the core files.
Here is the source for the corelimit program.
Build it in the usual way (cc -o corelimit corelimit.c) and use it in the format of: corelimit hpterm 0. This will limit the core file size of all children of the hpterm process to 0.
#include <stdio.h>
#include <sys/resource.h>
#define RLIMIT_CORE 4 /* core file size */
main(argc, argv)
int argc;
char **argv;
{
int res;
struct rlimit rlp;
if (argc != 3) {
fprintf(stderr, "%s: wrong number of parameters\n", argv[0]);
fprintf(stderr, "\tformat: %s command core_size\n", argv[0]);
exit(-1);
}
rlp.rlim_cur = atoi(argv[2]);
res = setrlimit(RLIMIT_CORE, &rlp);
if (res < 0) {
perror("setrlimit: RLIMIT_CORE");
exit(-2);
}
system(argv[1]);
}
Or, you can edit /etc/vuerc to start all of VUE that way:
at line 22 replace:
exec $VUELOGIN $VL_ARGS </dev/null >/dev/null 2>&1
with:
exec /usr/local/bin/nocore $VUELOGIN $VL_ARGS </dev/null >/dev/null 2>&1
Unfortunately, fbackup will always rewind the tape on you. However, here are some alternatives:
You can do batches of patch installs at one time on both 9.x and 10.x, though they use different methods.
For 9.x, you must set up a netdist server by running /etc/updist to load all the patches you want into a netdist area. Then you start /etc/netdistd to install everything from there.
10.x has a utility called swcopy that you use on each patch to copy the patch into a central depot. You can then use the swinstall utility to install all the patches from this depot.
Do the following steps:
init:2:initdefault: vue :34:respawn:/etc/vuerc #VUE validation and invocation
init:3:initdefault: vue :34:respawn:/usr/bin/X11/X -query HOSTNAME # X server startup
In the kernel parameter, the default value of maxswapchunks is defined as 512 MB. When you add more swap to the system, you also must increase the value of maxswapchunks.
/etc/rc kills all child processes on exit; daemons started from localrc() (for example) must have called setsid() and have been given time to "daemonize" themselves.
If your system doesn't have the C compiler, you can use a call to nohup to start the daemon instead of calling setsid().
Another trick that works is to include the following command in the rc file:
/usr/bin/at now + 1 minute < /etc/rc.at
Then create a file named /etc/rc.at, which should contain the command to start the daemon. Your daemon will start one minute after the rc file calls the command. You can use times other than one minute as well.
This is a problem that may occur when root invokes the C compiler on a nonexistent file in 9.x. You may want to track down any root commands that may be doing this.
HP has a utility called nettl to trace all packets seen by the device driver on the HP nodes, except diskless packets. These packets are those sent by the node or addressed to the node.
Here are the steps to follow when using this utility:
/etc/nettl -tn pduin pduout -e all -f /tmp/raw
/etc/nettl -tn pduin pduout loopback -e all -f /tmp/trace
/etc/nettl -tf -e all
/etc/netfmt -N -n -l -f /tmp/raw.TRC0 [ -c /tmp/filter ] > /tmp/fmt0
/etc/netfmt -N -n -l -f /tmp/raw.TRC1 [ -c /tmp/filter ] > /tmp/fmt1
-N - print in "nice" format (e.g. interpret)
-n - print IP addresses, not hostnames
-l - do not highlight fields (for hpterm)
-f - optional, use a filter file (see "filtering", below)
NOTE: netfmt takes a while to run! There will be plenty of information in the trace file--interpretation may be necessary!
E.g. only display packets to/from IP address 192.10.10.1:
filter ip_saddr 192.10.10.1
filter ip_daddr 192.10.10.1
Filter out all put NFS packets (to/from UDP port 2049)
filter udp_sport 2049
filter udp_dport 2049
Filter out all but TCP packets to/from port 25 (sendmail)
filter tcp_sport 25
filter tcp_dport 25
Filter on ethernet addresses:
filter dest 08-00-09-49-91-4a
filter source 08-00-09-49-91-4a
filter ip_saddr 192.10.10.1
filter ip_daddr 192.10.10.1
filter udp_sport 2049
filter udp_dport 2049
Run the following through xmodmap:
keysym Alt_L = Meta_L keysym F12 = Multi_key clear mod1 add mod1 = Meta_L clear mod2 add mod2 = Alt_R Mode_switch keysym Alt_R = Mode_switch
The result is:
The left Alt key acts as the Meta key.
The right Alt key (Alt Gr) selects the extra characters Martin is talking about. (AltGr-o = o).
It is even possible to use both Alt keys together, resulting in Meta versions of the extra characters.
There is a bug in version 2.4 that requires /dev/lan0 to have read and write permissions for everyone. This may be a bit insecure, but in versions after 2.4 this was fixed.
If you can't upgrade right away, here is a workaround:
crw-rw---- 1 root lan0 52 0x202000 May 20 1993 /dev/lan0
-rwxr-sr-x 1 compsci lan0 5255168 Jan 29 1992 ileaf
There will probably be a problem if you are using an FDDI card, particularly if there is no Ethernet card present in the machine. The problem would pop up when you run the Flex utility lmhostid, as it might not return the LAN address of the FDDI card. This specific problem occurred in 9.01 and may not be present in later releases, but just be aware of the problem.
If you are running 9.01 you can get the patch PHNE_4003 to fix this problem.
Here is how to set up ftp so that a group of users only have ftp access, they all have their own individual password, but they all access the same set of files (the system thinks they are all really the same ftp user). With only a slight change, you can have a group of users, all of whom only have ftp access, each with their own individual password, and access only to their own set of files (this is left as an exercise for the reader).
ftpuser:*:1000:1000:FTP User:/users/ftp/ftpusers:/bin/false
ftpgroup:*:1000:ftpuser
ftpgroup:*:1000:
ftpuser:*:1000:1000:FTP User:/ftpusers:/bin/false
george:3RgfBzfnipJPQ:1000:1000:George Smith \
(FTP User):/ftpusers:/bin/false
That's it.
Users access the system via anonymous: $ ftp sysname Connected to sysname.whatever. 220 sysname FTP server Name (something:someuser): ftp 331 Guest login ok, send ident as password. Password: 230 Guest login ok, access restrictions apply. Remote system type is UNIX. Using binary mode to transfer files. ftp> Then, they use a sublogin to access their files: ftp> user george 331 Password required for george. Password: 230 User george logged in. ftp> pwd 257 "/ftpusers" is current directory. ftp>
Users are placed in whatever directory is specified as their home directory in /users/ftp/etc/passwd (relative to the chroot at /users/ftp).
To remove access, remove their passwd entries from
/users/ftp/etc/passwd.
This is all documented (though poorly) in the various ftp-related man pages.
The first number will always be 9000 (at least for HP-UX boxes). The second number, however, does relate to specific machine types. Here is a translation:
Model number on the String returned
outside of the box by uname -m
------------------- ---------------
default ----------> 9000/800
E25 --------------> 9000/806
E35 --------------> 9000/816
E45 --------------> 9000/826
E55 --------------> 9000/856
F10 --------------> 9000/807
F20 --------------> 9000/817
H20 --------------> 9000/827
K400 -------------> 9000/829
F30 --------------> 9000/837
G30/H30 ----------> 9000/847
I30 --------------> 9000/857
G40/H40 ----------> 9000/867
I40 --------------> 9000/877
G50/H50 ----------> 9000/887
I50 --------------> 9000/897
G70/H70 ----------> 9000/887
I70 --------------> 9000/897
G60/H60 ----------> 9000/887
I60 --------------> 9000/897
T500 -------------> 9000/891
If HP-UX can't determine the model number of the machine, it defaults to 9000/800 (800 as a general designation for servers). If you get this as a return value, you probably should contact HP to update your stable storage in your machine.
TIP: If you are using HP-UX 10.0, you can run the model command to show which model you have.
Although you can use the dosif commands to read and write to floppies, there really is no fully supported way of formatting a floppy.
There is a workaround though. First, perform the basic mediainit with the -f16 switch (which will cause the floppy to be formatted with the full 80 tracks, rather than HP's default safer, but nonstandard, 77+3 spare tracks, 512-byte sectors, with no sector skew). This is the setting for most standard PC floppies.
Next, you copy the FAT, directory, label, and other such disk information into the first N sectors, where N=20 would be more than enough.
Before you can copy the disk header onto other disks, you must first copy it from an already formatted, blank PC diskette. You do can this with the following command:
dd if=/dev/rfloppy of=/(directory) bs=512 count=20
To format a floppy, you simply write back that header to each floppy to be formatted with the same command, only you need to switch the if and of commands.
A variant of this command for faster formatting would be:
dd of=/dev/rfloppy if=/(the copied header) ibs=512 count=20 obs=9k conv=sync
Doing this will cause the floppy I/O to be done in multiples of 9 KB, or one cylinder at a time.
You should also have two headers: one for 720 KB and one for 1.44 MB floppies.
The following is a ksh script to determine the capacity of a floppy loaded in the drive:
#!ksh
kbsize=$( diskinfo -b /dev/rfloppy 2>/dev/null )
if (( $? != 0 || $kbsize == 0 )) ; then
print -u2 "$0: No media found"
rm -f core # 9.01s700 diskinfo coredumps
exit 1
fi
The following is some sample LLA code for determining the MAC address of your station's card. It will only work on 9.x or previous versions of HP-UX. For 10.x, you need to use DLPI code, which can be found on HPSL. The document number is CWA940907000, and it gives a more thorough explanation.
/*
Here's some sample code that you can use to get your own station address (otherwise known as MAC address or LAN card address). Be sure to compile this with the -ln option, since the net_ntoa(3N) call is found in /usr/lib/libn.a.
This program was compiled by doing: cc get.c -o get -g -ln.
*/
#include <stdio.h>
#include <netio.h>
#include <fcntl.h>
main(argc, argv)
int argc;
char *argv[];
{
struct fis s_fis;
int lanic;
char *ascii[6];
if (argc < 2) {
printf ("Usage: %s <device file>\n", argv[0]);
exit (1);
}
lanic = open(argv[1], O_RDWR);
if (lanic < 0) {
perror("Error in opening %s", argv[1]);
printf("Error = %d\n", lanic);
exit(1);
} else {
s_fis.reqtype = LOCAL_ADDRESS;
s_fis.vtype = INTEGERTYPE;
ioctl(lanic, NETSTAT, &s_fis);
net_ntoa(ascii, s_fis.value.s, 6);
printf("Station address of %s is %s\n", argv[1], ascii);
s_fis.reqtype = PERMANENT_ADDRESS;
s_fis.vtype = INTEGERTYPE;
ioctl(lanic, NETSTAT, &s_fis);
net_ntoa(ascii, s_fis.value.s, 6);
printf("Permanent Station address of %s is %s\n", argv[1], ascii);
close(lanic);
}
}
First, you must be logged in as root. Then you can use the following commands:
adb -w /hp-ux /dev/kmem ipforwarding/W 0 ipforwarding?W 0 <CTRL-D>
Any time you install a new kernel, you must repeat these steps to disable IP.
A user space thread package was shipped with the DCE product. On HP-UX 10.0, this package was shipped as part of the operating system.
You probably have the @ key set to a kill character. To check this, run the command stty -a to see the settings. If it is set to kill, you can reset the kill character by running the command stty kill ^C.
In addition, you should add this line to your .profile or .cshrc file to get this option every time you log in.
You can create a script on your machine that checks to see whether all the files are installed in the correct place. It won't, however, check file permissions or whether the kernel files are in the kernel.
#!/bin/sh
FSET=/etc/filesets/$1
if [ "$FSET" = "" ]; then
echo "syntax of command $0 Filesetname "
exit 1
fi
if [ ! -f $FSET ]; then
echo "Fileset $FSET not found"
exit 1
fi
# simple test to see non zero size files of any type
while read File
do
if [ ! -s $File ]; then
echo "$File not found"
fi
done < $FSET
exit
Certain filesets have their own verify scripts in 9.x. These are:
NS-SERV, which has the script /usr/nettest/nsverify/ver_ns STREAMS, which has the script /usr/bin/strvf
The fpkg program is used to build a special tar file that is readable by the update utility. That way, you can just install any fileset that you can create with the update utility.
In addition, you must create a PDF file with the mkpdf program. The following will add the PDF file:
pn MY-PROD
pd My product description
fv V.1.0.0
F
> <somedir>/PDF /system/MY-PROD/PDF <
pr <somedir>/prod-dir
F *
The reason you add this is because the PDF file contains a complete file manifest, which tech support can use to verify that the files in a product are correctly installed with the command pdfck.
The network interfaces in 700 workstations must be connected to a network before you can configure them with ifconfig. That error message indicates that the interface's hardware state is down.
To get it going again, plug it into a network and reset the network with the following command:
/usr/bin/landiag
If no errors are returned, you should be able to run ifconfig to set the IP settings.
It's actually quite easy. Add an empty file in the /etc directory called nologin. Then, add the following lines to /etc/profile:
uid='id -u'
if [ -f /etc/nologin -a $uid -ne 0 ]; then
echo "Sorry, no login allowed, try later!"
sleep 5
exit 0
fi
The biggest change is the move from the VUE graphical desktop to the CDE (Common Desktop Environment). This is the new industry standard UNIX desktop that will replace VUE in future releases. The main differences are as follows:
New and more customizable Front Panel:
Graphical MIME-enabled mail application
Graphical Calendar
Graphical Print Queue Manager
New terminal emulator
Action and datatype syntax changes
ToolTalk messaging support
Desktop application registration
More standard X-Windows stuff is part of the installation:
Athena Widget library (Xaw)
X Miscellaneous Utilities library (Xmu)
Imake
HP also implemented a new filesystem layout modeled after the AT&T SVR4 and OSF/1 standard. The files are organized into categories such as static versus dynamic, executable versus configuration data, and so forth.
In addition, OS software is kept in separate directories from application software. System shared files are kept in separate directories from host-specific files.
SAM can be accessed by regular users, but only on a limited basis. Specified users can be given more access to SAM functionality or other custom utilities that may be part of SAM. In certain cases, these users are actually promoted to superuser while they are executing SAM functions.
In addition, certain commands were modified:
The following is different between the two:
Here is a short list of a few standard directories and what goes into them:
HP-UX 10.x ships with an automounter running with a -hosts option. You can then define /net/hostname/directory/..., and the automounter does the rest.
The automounter is a nice feature, in that you don't have to worry about misplaced exported NFS directories on bootup. The machine where NFS is exported to will hang on bootup if the connection with the NFS server is severed in any way.
The following shows the switches you can use with /sbin/set_parms:
To change the hostname:
# /sbin/set_parms hostname
To change the IP address:
# /sbin/set_parms ip_address
To change DNS Server, domain, etc.:
# /sbin/set_parms addl_netwrk
or to set everything just like doing the first-time install:
# /sbin/set_parms initial
Be careful with this command: it can be disastrous if checking for such things as the presence of duplicate addresses is not done first.
At the very least, you should add the following to the PATH statement:
If you also have an HP ANSI C compiler installed on the machine, you need to include these directories:
System management pieces go into:
The file /etc/MANPATH actually lists the directories for the man pages. To set these paths, run the following:
Check to see if the following line is in your /etc/passwd file:
lp:*:7::/var/spool/lp:/sbin/sh
The location of root's shell must be /sbin/sh, or /bin/csh, and it must be defined in /etc/passwd. No matter which shell root is using, it must be located on the root partition since the /usr filesystem is not mounted when init needs to use the root shell to run the startup scripts.
This sections covers some of the more commonly asked questions regarding C coding.
To check where GNU C++ is looking for files, run g++ -v to compile a file with an include in it. You will see a list of directories that g++ looks into.
In general, the g++ headers are stored in $PREFIX/lib/g++-include, and the libraries are located in $PREFIX/lib.
You will have to add the /lib/libPW.a library to your link line.
The reason HP never shipped a /lib/libPW.sl may be because they want to phase out libPW.a in the future. In other words, they may be merging it into libc.a|sl.
The reason for the error is that the program /opt/langtools/bin/pxdb aborted when trying to process the debug information. Since this happened it left a.out alone.
You may not be able to use xdb nor dde to debug your problem, except in assembly mode. The version of pxdb that comes with HP-UX 10.20 does have problems like this, so you might want to look for a patch (if one is available).
The question involves the GNU C++ compiler and the linker message below:
gcc test_h.o -o test_h ../libg++.a -lm ld: R_DATA_ONE_SYMBOL fixup in file ../libg++.a(streambuf.o) for code unsat symbol "abort" - use P' fixup collect: /bin/ld returned 1 exit status
This is caused by the code generator emitting assembly code in a data subspace to initialize a function pointer, equivalent to :
.word foo()
where (in this case) foo() is an extern, and shared libraries are referenced by the executable being built (usually libc.sl).
This problem has been fixed in gcc-2.4.5.u5; if you are still running into this error:
The solution is to make sure gcc and gas are up-to-date and any libraries have been built with the latest gcc/gas combination. For a temporary workaround, the option -static to gcc will suppress dynamic linking and thus avoid the error.
The C compiler that is shipped with HP-UX is intended only to rebuild the kernel. It was not intended for use with program development.
To get a full blown C compiler, you must buy the ANSI C program development bundle. Or, you could just get a copy of gcc.
This refers to a deficient table size for C++. Use the -Wp,-Hxxxxxxx option, where xxxxxxxx is the number of bytes that you will add to the C++ table size.
In lint or cflow, there is no equivalent to the cc driver's -W flag to pass options to subprocesses like cpp. However, both lint and cflow invoke cpp via the cc driver, so you can achieve the same effect by setting the CCOPTS environment variable.
Here is an example:
CCOPTS="-Wp,-H500000" export CCOPTS lint large_file.c
The <varargs.h> and <stdarg.h> include files define va_start in terms of this function, which is built-in on the HP C compiler.
If you're using gcc, you should be picking up include files from the gcc library directory. These include files do the right thing for both GCC and HP C.
More often than not, these files were never installed, or someone has placed a copy of varargs.h/stdarg.h into /usr/local/include (gcc searches there first).
When all else fails, you can replace the definition of va_start as follows, depending on whether you are using varargs or stdarg (K&R or ANSI, respectively).
#include <varargs.h>
#ifdef __hppa
#undef va_start
#define va_start(a) ((a)=(char *)&va_alist+4)
#endif
#include <stdarg.h>
#ifdef __hppa
#undef va_start
#define va_start(a,b) ((a)=(va_list)&)
#endif
For <varargs.h>, this replacement should always work.
For <stdarg.h>, this replacement will work unless the last fixed parameter (b in the call to va_start) is a structure larger than eight bytes. Large structures are passed by reference, with the callee responsible for copying the structure to a temporary area if it will be modified. In this case, &b will take the address of that temporary area instead of the position in the argument list, and va_next won't work. That's why HP uses a built-in compiler.
Yes. Just run the command /usr/contrib/bin/oodump -spaces file.o. If the output shows a space name $DEBUG$, the program was compiled as debuggable with the -g option.
The C compiler gets hung up on this construct in ANSI mode:
x=FLT_MIX;
The problem is that the ANSI mode (_PROTOTYPES) version of FLT_MIN/FLT_MAX in <float.h> ends its constants with an F, which the compiler apparently does not like.
The only workaround is to (temporarily) undef_PROTOTYPES around the <float.h> inclusion:
#ifdef _PROTOTYPES #undef _PROTOTYPES #include <float.h> #define _PROTOTYPES #else #include <float.h> #endif
The ANSI standard clearly states which identifiers it reserves, and says the rest are available to you, the programmer. Many important things, such as ulong, are not specified by ANSI, so ANSI header files are not allowed by the standard to define them.
Each standard supported by HP-UX (POSIX1, POSIX2, XPG2, XPG3, XPG4, AES, and so on) has its own set of reserved identifiers and header files, and the convention is to require -D_POSIX_SOURCE (and all others) to enable their respective name spaces. Since HP could not predict what future standards would come along and claim more header files and identifiers, it proved much simpler to make the name space as restrictive as possible unless -D_HPUX_SOURCE is specified.
While this has turned into one the most frequently asked FAQs about HP-UX, at least once you learn this, you don't have to deal with inconsistencies again. Had all nonstandard headers been allowed to define all nonstandard symbols, you'd find identifiers randomly disappearing from headers over time as they were claimed by various standards.
Check the man page for cc -Ae; it enables the HPUX_SOURCE name space.
You may not be running the correctly updated C compiler. The patches PHSS_3773 for A.09.63, PHSS_4061 for A.09.64 and PHSS_4151 for A.09.65 can be applied, but they all require the C compiler from the April 1994 Application CD-ROM (A.09.61).
My program looks like:
#include <syslog.h>
void main(int argc,char *argv[])
{
syslog(LOG_EMERG,"This is an emergency message\n"));
syslog(LOG_ALERT,"This is an alert message\n");
syslog(LOG_CRIT,"This is a critical message\n");
syslog(LOG_ERR,"This is an error message\n");
syslog(LOG_WARNING,"This is a warning\n");
syslog(LOG_NOTICE,"This is a notice\n");
syslog(LOG_INFO,"This is an informal message\n");
syslog(LOG_DEBUG,"This is a debug message\n");
}
It does not log all the messages to /usr/adm/syslog. Why not?
First of all, the LOG_EMERG cannot be used with user processes and should return -1 (if you check the return status). This is not documented in the man page! All the other message should appear, but your /etc/syslog.conf file might not be configured correctly. To test it, replace the /etc/syslog.conf file with the following line:
*.debug /usr/adm/syslog
Then kill -HUP 'cat /etc/syslog.pid' Then run the test program and tail the /usr/adm/syslog file. You should see all the messages:
Nov 23 09:02:54 orca syslogd: restart Nov 23 09:02:58 orca syslog: This is an alert message Nov 23 09:02:58 orca syslog: This is a critical message Nov 23 09:02:58 orca syslog: This is an error message Nov 23 09:02:58 orca syslog: This is a warning Nov 23 09:02:58 orca syslog: This is a notice Nov 23 09:02:58 orca syslog: This is an informal message Nov 23 09:02:58 orca syslog: This is a debug message
You can get trace from the Interworks ftp site (ftp.interworks.org). The following is the README file for trace:
"Trace prints out system call (and optionally kernel) traces of programs. It compiles and installs fairly easily. It should work fine on 700s running HP-UX 9.X, and probably not at all otherwise.
To run the header file generation scripts, you'll need Perl 4.0pl36 or better, installed as /usr/local/bin/perl.
If you have problems with too much defining, uncomment HFLAGS in the Makefile.
If you encounter undefined ioctls, just comment them out and send me mail about them and what version of HP-UX you're running. fixheader will make sure that nonexistent header files aren't included.
Trace needs to be installed with setuid root so that users can run it.
There is an undocumented function called U_STACK_TRACE() in libcl.a. You can set up the signal handling like this:
#include <signal.h> extern void U_STACK_TRACE(); signal(SIGSEGV, U_STACK_TRACE);
This section deals with how HP-UX handles its hardware.
One possible way around this little problem is to put all your peripherals on a surge protector, leave all the switches in the on position and just turn off the surge protector.
Using this strategy should prevent the small feedback surges that can occur, as well as other problems.
Netscape does not supply example mime.types and mailcap files for UNIX Netscape, nor does it include a Makefile to do a make install.
What you can do is put a mime.types file in /usr/local/lib/netscape and include these lines:
audio/basic au snd auto/x-wav wav
You would probably want a mime type file there for helper apps defined for files with particular extensions (.wav, .doc, .zip, and so on).
The next step is to create a file called /usr/local/lib/netscape/mailcap. You should include the lines:
audio/basic; /usr/audio/bin/send_sound -u %s audio/x-wav; /usr/audio/bin/send_sound -wav %s
(If you are using 10.x, you must use /opt/audio/bin/send_sound instead).
The next thing you must do is start running Aserver and run Netscape. Make sure you start Aserver in the background.
Now that you have these files in place, any time you click on a file with either of the extensions .au or .wav, it should play the sound file.
There are actually two different keyboards available for HP workstations and X Terminals.
The default for the workstation is the A1099B keyboard, and the default for X terminals is the A2205A PC-101-style keyboard.
All 712, 715, and newer workstations do support PS/2 compatible keyboards and mice.
There is a contributed application, xcd, that will pop up a CD-player front panel in X Windows. It will work in HP-UX 7.0 and HP-UX 8.0, on Series 300, 400, and 700 machines. Also, it works with either SCSI or HP-IB CD-ROM drives.
In order for the SCSI drives to work, they must be HP-supplied or Toshiba XM-3201B or XM-3301B. Officially, xcd does not yet work on 9.x, but some people have tried it and had no problems running it in 9.x.
Unfortunately, xcd plays only through the CD player's headphone jack, not through the workstation's speaker.
You can get xcd from the InterWorks workstation user group, their ftp site, the CD-ROM, or DDS tape.
There are two similar programs called xdp and xmcd. They are basically the same as xcd, but with more functionality.
People have, under HP-UX 8.07, used device files with major number 54, minor numbers 0x201202 and 0x201203 for /dev/rmt/2m and /dev/rmt/2mn, respectively, for low