SGI IRIX series, part 2. Part 1, SGI IRIX Overview and History, covered the IRIX releases and the MIPS hardware. This part covers the commands you use every day on an IRIX 6.5 system: hinv, chkconfig, versions, inst/swmgr, the System Manager from the sysadmdesktop product, nvram and the PROM monitor, and systune. Each section ends with the closest AlmaLinux 10 command, so a Linux admin can work out the IRIX version quickly. If you also run Sun systems, Solaris Releases and Support Lifecycle covers the Solaris side.
IRIX is System V UNIX with BSD additions, so ps, df, vi, find and the usual tools behave as you expect. The commands below are the ones only SGI had. Option lists and behavior come from the IRIX 6.5.30 reference (man) pages. This is a reference post, not a lab. I did not run these commands on IRIX hardware for this post. Sample output is labeled as an example and will differ on your machine.
Prerequisites
- An IRIX 6.5.x system with a shell at the console, on a serial terminal, or over
telnet/rsh(orsshif it was installed from the freeware CDs). - A normal account for the read-only commands (
hinv,chkconfigwith no arguments,versions,nvramwith no arguments).rootfor anything that changes the system. - The IRIX man pages installed (
man hinvshould work). They are the most reliable reference for your exact overlay level. - An isolated network. IRIX has had no security fixes since 2013. Keep it on a lab segment, not on the internet.
hinv: hardware inventory
hinv prints the hardware inventory table that the kernel builds at every boot: CPUs, caches, memory, disks, network, graphics and more. It is usually the first command you run on an unfamiliar SGI.
hinv
hinv -v
Example of the kind of output you get on an O2 (values will differ):
1 180 MHZ IP32 Processor
CPU: MIPS R5000 Processor Chip Revision: 2.1
FPU: MIPS R5000 Floating Point Coprocessor Revision: 1.0
Main memory size: 256 Mbytes
Integral SCSI controller 0: Version ADAPTEC 7880
Disk drive: unit 1 on SCSI controller 0
Integral Ethernet: ec0, version 1
Graphics board: CRM
The IPnn number on the first line identifies the system board (IP22 is an Indy or Indigo2, IP32 is an O2, IP30 is an Octane, IP35 is a Fuel, Tezro or Origin 3000-class system). Part 1 has the full table.
Filter by class or type
-c limits the output to one class. Valid classes are processor, disk, memory, serial, parallel, tape, graphics, network, scsi, audio, iobd, video, bus, misc, compression, vscsi and display. -t limits it to a type: cpu, fpu, dcache, icache, memory, qic, a2, dsp and scsictlr.
hinv -c processor
hinv -c memory
hinv -c disk
hinv -c network
hinv -c graphics
hinv -t cpu
Use hinv in scripts
With -c or -t, hinv exits with 1 if nothing of that class or type is present, and 0 otherwise. -s suppresses the output, so you can test for hardware in a shell script:
if hinv -s -c tape; then
echo "tape drive present"
else
echo "no tape drive"
fi
Board names, part numbers and /hw paths
On systems that support it, -m shows manufacturing data (board name, part number, barcode). -mv also shows where each board sits under the /hw hardware graph:
hinv -m
hinv -mv
Note from the man page: a device does not appear in hinv if its driver is not configured into the running kernel. A missing card is not always a dead card.
Two more identification commands: uname -R shows the exact 6.5.x overlay level, and /usr/gfx/gfxinfo prints details about the graphics board on workstations.
uname -aR
/usr/gfx/gfxinfo
AlmaLinux equivalent: there is no single tool. Use lscpu, free -h, lsblk, lspci and ip -br link, or sudo dmidecode -t system for vendor and serial data.
chkconfig: turn services on and off
IRIX uses System V init scripts in /etc/init.d, linked into /etc/rc0.d and /etc/rc2.d. Whether a script actually starts its daemon is controlled by a configuration flag: a small file in /var/config (also reached as /etc/config) that contains on or off. chkconfig reads and sets those flags. If the flag file is missing, the flag counts as off.
# list every flag, sorted by name
chkconfig
# list every flag, sorted by state (on flags together)
chkconfig -s
Query a single flag. With one argument, chkconfig prints nothing and exits 0 if the flag is on, 1 if it is off or missing:
chkconfig nfs; echo $?
if /sbin/chkconfig verbose; then
echo "Verbose is on"
else
echo "Verbose is off"
fi
Set a flag as root. The flag file must already exist; use -f to create it:
chkconfig nfsd on
chkconfig rwhod off
chkconfig -f verbose on
Changing a flag does not start or stop anything by itself. It takes effect at the next boot, or when you run the init script by hand:
/etc/init.d/nfs stop
/etc/init.d/nfs start
Useful flags
| Flag | What it does when on |
|---|---|
network | Allows network traffic. Turning it off isolates the machine without unplugging it. |
nfs / nfsd | NFS client operations / NFS serving from /etc/exports (nfsd needs nfs on). |
autofs / automount | The NFS automounter. Enable only one of the two. |
auto_ipaddress | DHCP client. |
named | The DNS server. |
yp, ypserv, ypmaster | NIS client, server and master. |
timed / timeslave | BSD time sync daemon / SGI time sync daemon. |
windowsystem, xdm, visuallogin | The X server, X display manager and graphical login. Use startgfx and stopgfx to start and stop graphics. |
pmcd, pmie | Performance Co-Pilot collector and inference engine, the ancestors of PCP on AlmaLinux. |
sar, savecore, quotas | System activity reporter, crash dump saving, filesystem quotas. |
verbose | Prints daemon names as they start during boot. Handy when you are diagnosing a slow boot. |
Many daemons also read an options file next to the flag, such as /etc/config/vswap.options or /etc/config/netif.options. Change the options file, then restart the matching init script.
AlmaLinux equivalent: systemctl is-enabled nfs-server, sudo systemctl enable --now nfs-server and systemctl list-unit-files --state=enabled.
versions: what software is installed
IRIX software comes in products, divided into images and subsystems, named product.image.subsystem (for example nfs.sw.nis or eoe.sw.base). versions lists them, lists their files and removes them. It is a front end to showprods, showfiles and inst.
# every installed subsystem (I = installed), with install date
versions
# products only
versions -b
# one product, or a pattern (quote the wildcard; * does not match a dot)
versions eoe
versions "*.man.*"
# installed patches
versions -b "patch*"
# internal version numbers instead of dates
versions -n eoe.sw.base
# everything inst has seen: installed (I), removed (R), never installed (blank)
versions -a
Add -M to turn off the built-in pager when you redirect output to a file.
List files and find what owns a file
# files in a subsystem
versions list nfs.sw.nfs
# long listing: type, checksum, size, subsystem, flags (c = config file)
versions long nfs.sw.nfs
# which subsystem installed a file
versions long | grep /sbin/chkconfig
# installed files you have modified
versions -m
.O and .N configuration files
When an install or overlay replaces a configuration file you edited, IRIX keeps both copies. file.O is your old version (the new one is active). file.N is the new version (yours is still active). The boot messages remind you until you deal with them:
versions changed
diff /etc/inetd.conf.O /etc/inetd.conf
Merge the site-specific settings into the active file, then remove or rename the .O/.N copies. If both exist for the same file, one is left over from an older install. Check timestamps with ls -l file file.O file.N before deciding which is newer. versions -t changed returns exit status 0 if any such files exist, which is useful in scripts.
Remove software
versions remove demos.sw
versions remove needs root and refuses to remove subsystems if that would cause conflicts. Do not use -F to force it; it skips the integrity checks and can remove parts of IRIX you need.
AlmaLinux equivalent: rpm -qa, rpm -ql, rpm -qf /path, rpm -Va for modified files, .rpmsave/.rpmnew for the .O/.N idea, and sudo dnf remove.
inst and swmgr: installing software (preview)
inst is the text-mode installer and swmgr (Software Manager) is the graphical one. Both read a distribution (CD, directory or remote host), compare it with what is installed, and install, upgrade or remove subsystems while resolving conflicts. A short inst session looks like this:
inst -f /CDROM/dist
Inst> list
Inst> install nfs.sw.nfs
Inst> conflicts
Inst> go
Inst> quit
Part 3 covers inst, swmgr, overlays, patches, tardist files and freeware in detail.
System Manager (sysadmdesktop)
On a workstation with graphics, most admin tasks also have a GUI. The sysadmdesktop product provides the System Manager, opened from the Toolchest (System, System Manager) or from a shell:
/usr/sysadm/bin/sysmgr
It is built from three kinds of component:
- Managers show a set of objects as icons, for example the User Manager or Disk Manager, with buttons for common tasks.
- Active Guides walk you through one task (such as adding a modem or a user) and make no change until you click OK.
- Status Panels show details of one object, from Get Info.
Every change the GUI makes is logged in /var/sysadm/salog. Read it with viewlog. The GUI runs privileged commands through runpriv. Root can grant individual privileges to users, which are stored in /var/sysadm/privilege. The first-boot System Setup (EZsetup) tool is part of the same product.
Security note: the sysmgr man page says that if there is no root password, all users are treated as privileged users. Many old IRIX installs shipped without root (and other system account) passwords set. Set them before doing anything else:
passwd root
awk -F: '$2=="" {print $1}' /etc/passwd
The awk command prints accounts with an empty password field in /etc/passwd. If the system was converted to /etc/shadow with pwconv, run it against /etc/shadow instead. Lock or set a password for each one.
AlmaLinux equivalent: Cockpit (sudo dnf install cockpit; sudo systemctl enable --now cockpit.socket) for the web GUI, and /var/log/secure plus journalctl for the audit trail.
nvram and the PROM monitor
SGI systems boot from a PROM (firmware) that keeps a small set of environment variables in non-volatile RAM: the console device, boot behavior, the network address used for network installs, and so on. From a running IRIX system, nvram reads and sets them:
# all variables as name=value
nvram
# one variable
nvram console
nvram netaddr
# set one (root only); -v prints the result
nvram -v netaddr 192.168.10.50
nvram -v AutoLoad Yes
nvram can only change variables that already exist. It cannot create new ones. Some variables live only in volatile RAM and reset at power-up, and some systems do not support changing them from IRIX at all. In that case use the PROM monitor.
Variables worth knowing
| Variable | Meaning |
|---|---|
console | g (or g0, g1) for the graphics display, d for a terminal on the first serial port (d2 for the second on some systems). |
AutoLoad | Yes boots IRIX automatically at power-on or reset. No stops at the PROM menu. |
netaddr | The system’s IP address, used when booting or installing over Ethernet. |
OSLoadPartition, SystemPartition, OSLoader | Where the kernel and the sash loader are found. Normally left at the defaults. |
The PROM command monitor
At power-on, press Esc during the roughly ten-second countdown to get the System Maintenance Menu. Option 5, Enter Command Monitor, gives a >> prompt:
>> printenv
>> printenv console
>> setenv console d
>> setenv AutoLoad Yes
>> resetenv
resetenv resets all non-volatile variables to factory defaults (not the PROM password). Be careful with setenv console d on a workstation with no serial terminal attached: you will lose the console. The man page notes that on some systems removing the password jumper forces the console back to graphics.
AlmaLinux equivalent: efibootmgr -v for UEFI boot entries and sudo grub2-editenv list for GRUB environment variables.
Other everyday commands
| Task | IRIX command |
|---|---|
| Hostname | Stored in /etc/sys_id; match it in /etc/hosts. |
| System log | /var/adm/SYSLOG (viewer: sysmon on the desktop). |
| Live performance | osview, gr_osview, top, sar (with the sar flag on). |
| Kernel tunables | systune shows and changes tunables. systune nproc shows one; systune -i is interactive. Changes that need a reboot are written to /unix.install, which becomes the kernel at the next boot. Values are kept in /var/sysgen/stune. |
| Start/stop graphics | startgfx, stopgfx |
A note on sgisetup: part 1 listed sgisetup for this post. I could not find it in the IRIX 6.5.30 reference pages, so I am not documenting it. The documented setup tools are System Setup (EZsetup) and the System Manager described above, and chkconfig plus /etc/config from the shell.
Verification checklist
hinvshows the IP board, CPU, memory and disks you expect, andhinv -s -c disk; echo $?prints0.chkconfig -sshows only the services you want on, andnetworkis on.versions -blists the products you expect, andversions changedlists no unmerged.O/.Nfiles.nvram consoleandnvram AutoLoadshow the values you set.passwdhas been set for root, and no account has an empty password field.
Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
chkconfig foo on does nothing | The flag file does not exist | Use chkconfig -f foo on, then run /etc/init.d/<script> or reboot. |
Service still not running after chkconfig on | Flags are only read by the init scripts | Run the init script by hand, and check /var/adm/SYSLOG for errors. |
A card is installed but not in hinv | Its driver is not in the running kernel, or the card is not seated | Check the driver subsystem with versions, rebuild with autoconfig if needed, then reseat the card. |
versions output scrolls past a page and stops | Built-in pager | Use versions -M or redirect to a file. |
| Boot message about configuration files every time | Unmerged .O/.N files | Run versions changed, merge with diff, then remove or rename the extra copies. |
nvram says it cannot set a variable | Not root, the variable does not exist, or the system does not support NVRAM writes from IRIX | Use su, check the name with nvram, or use setenv in the PROM monitor. |
No console after setting console d | Console moved to the serial port | Attach a serial terminal, or setenv console g from the PROM (password-jumper method on some systems). |
Next in this series
Part 3 covers installing software and patches on IRIX: inst, swmgr, distribution CDs, overlays, tardist files and the nekoware freeware collection.
Sources
- IRIX 6.5.30 reference pages: hinv(1M), chkconfig(1M), versions(1M), sysmgr(1M), viewlog(1M), nvram(1M), prom(1M) and systune(1M), as published on man.irix.fans and help.graphica.com.au.
- SGI, IRIX Admin: System Configuration and Operation (document 007-2859).
- AlmaLinux and RHEL documentation for systemctl, rpm/dnf and Cockpit.
