Based on many books and Usenet groups comp.unix.admin and comp.sys.sgi.admin contributions.
"There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence." — Jeremy S. Anderson
Obsolete warning: I stopped using SGI machines in 2003, so this page is getting largely outdated, without even adding to it the many chapter 11 of SGI.
For network configuration using static IPs, change the following files:
Once you get the machine to see the world, login with
Add swap space: "/usr/sbin/mkfile 4g /dev/swap2; /sbin/swap -a /dev/swap2; nedit /etc/fstab" and add the line "/dev/swap2 swap swap pri=3 0 0
" in your /etc/fstab.
Exports/mounts: "nedit /etc/exports"
SSH replaces all of the following: telnet, rlogin, ftp which should be disabled manually... For copying files securely you are better off using scp which relies on ssh, but otherwise, some useful SSH tricks include:
ftp stream tcp nowait root /usr/etc/ftpd ftpd -S -l -l -l -p pop-3 stream tcp nowait root ?/usr/freeware/bin/ipop3d ipop3d mountd/1,3 stream rpc/tcp wait/lc root /usr/etc/rpc.mountd mountd mountd/1,3 dgram rpc/udp wait/lc root /usr/etc/rpc.mountd mountd sgi_mountd/1 stream rpc/tcp wait/lc root /usr/etc/rpc.mountd mountd sgi_mountd/1 dgram rpc/udp wait/lc root /usr/etc/rpc.mountd mountd rquotad/1 dgram rpc/udp wait root /usr/etc/rpc.rquotad rquotad imaps stream tcp nowait root ?/usr/freeware/bin/imapd.ssl imapd imap stream tcp nowait root ?/usr/freeware/bin/imapd imapd pop3s stream tcp nowait root ?/usr/freeware/bin/ipop3d.ssl ipop3d
ftp stream tcp nowait root /usr/etc/ftpd ftpd -S -l -l -l -p
". Yes, you'll be able to see every single ftp command in the /var/adm/SYSLOG file; but heh, who's talking about privacy here ?#! /bin/sh # remove world writable directories find ~ftp -perm -002 -exec chmod o-w {} \; # remove group write for ftp or guest find ~ftp -perm -020 \( -user ftp -o -group guest \) -exec chmod g-w {} \;
/dirname machinename.domain localhost
"; make an empty dir "mkdir ~ftp/pub/ReadOnly" and finally make the mount with the following /etc/fstab line: "localhost:/dirname ~ftp/pub/ReadOnly nfs ro,intr,bg 0 0
". The directory will be visible in ftp://machinename/pub/ReadOnly/ and will be truly read-only, even if the permissions in it say something different.Adding a new HD:
Samba is a utility that runs on IRIX and allow it to trade files with PCs on a local network. It is not too easy to intall, every PC needs a registry hack and it is sometimes flaky (particularly in its handling of file permissions), but quite useful.
Remember to registry hack Windows machines to allow for clear text passwords to be sent over the local network. I don't like this but there doesn't seem to be an easy way around it.
Adding a new user to the list of Samba users: "cd /usr/samba; bin/addtosmbpass username <private/smbpasswd >>private/smbpasswd". Then edit private/smbpasswd to make sure there aren't any duplicates. Changing a user's Samba password is achieved with "bin/smbpasswd -U user password"
Problems going from IRIX 6.5.8 to IRIX 6.5.11 with our DLT8000. Have to use TS drivers instead of TPS (TS must be turned on manually with chkconfig ts on).
Backups script, with BackupList.txt containing the list of folders to save:
/usr/sysadm/privbin/backup -f /dev/tape1c -v -n -s BackupList.txt mt -f /dev/tape1c rewind mt -f /dev/tape1c offline
Installing Quantum SuperDLT 220 on IRIX 6.5.11. Add the following inside the /var/sysgen/master.d/scsi:
{ DECDLT, TPDLT, 7, 9, "QUANTUM", "SuperDLT1", 0, 0, {0}, MTCAN_BSF | MTCAN_BSR | MTCAN_APPEND | MTCAN_SPEOD | MTCAN_CHKRDY | MTCAN_VAR | MTCAN_SETSZ | MTCAN_SILI | MTCAN_SEEK | MTCAN_SYNC | MTCAN_CHTYPEANY | MTCAN_COMPRESS, 20, 8*60, 20*60, 5*60, 3*3600, 4096, 64*1024, tpsc_default_dens_count, tpsc_default_hwg_dens_names, tpsc_default_alias_dens_names, {0}, 0, 0, 0, 0, (u_char *)0 },
Then do the usual /etc/autoconfig; /etc/reboot; ...; cd /dev; ./MAKEDEV
If the SuperDLT tape drive gives you random errors like I/O error, Device busy or Error 16, just shut down the drive, it should clear the error. Apparently, putting a normal DLT tape into the SuperDLT can sometimes mess up its default density configuration.
Fortran program hosing the stack ? 3 complementary solutions:
~/.cshrc
file.
rlimit_stack_max = 0x40000000 ll
' to the file /var/sysgen/stune/ (here increase to 1Gb) or, better, use systune. Run /etc/autoconfig and /etc/reboot.
Some stuff you migh want to add to your ~/.cshrc file:
alias ll 'ls -alF' alias lc 'ls *.{c,h,cc,hh,inc,f,f90}' alias ln 'ln -i' alias psg 'ps -ef | grep' alias cd.. cd .. set history = 400 # For interactive shells, set the prompt to show the host name and event number. if ( (! $?ENVONLY) && $?prompt ) then if ( -o /bin/su ) then set prompt="`hostname -s`(`whoami`) \!# " else set prompt="`hostname -s`(`whoami`) \!% " endif endif # rwxr-xr-x umask 022 unlimit stacksize
How to control big running jobs so they don't hose all the CPU available ? We typically run jobs that take several days to complete on 4 processor machines, so we want the ability to lower their priority, run them on specific processors, suspend them during the day... Here are a few options:
% cat >TwoCPU.cfg MEMORY_LOCAL CPU 2 CPU 3 ^D % cpuset -q TwoCPU -c -f TwoCPU.cfgNow a user can run a job that will be restricted to processor 2 and 3 (while other processes can still use all 4): "cpuset -q TwoCPU -A Job". In the evening, if you want the job to use all available processors you can release it to all CPUs with: "cpuset -q TwoCPU -d" (as root). But in the morning you cannot put the job back into the bottle of TwoCPU. Warning, if you have some processors configured with cpuset, even non exclusively, you cannot use runon on them.
Working installation of Qpopper, allowing for Authenticated POP (APOP) retrieval. Compiled with the following:
./configure --enable-apop=/etc/pop.auth --enable-popuid=pop --with-openssl --disable-specialauth --enable-timingCheck the /etc/services for pop services and also add the following line to /etc/inetd.conf:
pop3 stream tcp nowait root /usr/local/bin/popper popper -s -t /var/spool/popper/popper.log
To add yourself (as a user) to the APOP list, do "popauth" and then type a password (same as your login or a specific one for your email). Then change the option in Eudora to APOP (yeah, it won't work in Netscape or Outlook express).
#! /bin/sh # Script that determines its own location current_directory=$(pwd) cd $(dirname $0) script_directory=$(pwd) cd $current_directory
swmgr
FFLAGS= -col120 -n32 -mips4 -r12000 -O3 -static
CFLAGS= -n32 -mips4 -r12000 -O3
group::include:/etc/group.list
" and create a file /etc/group.list with the list of email addresses (complete emails, no aliases). Then run newaliases.
The Good | The Bad and the Ugly |
---|---|
The UNIX System Administration Handbook, although not concerned with IRIX, is a very valuable source of information gathered from experience. Deals with all the glitches that can happen on a Unix box. It does not replace a Unix book, but it teaches you the politics and pitfalls of system administration. The UNIX Hater's Handbook, gives some insight as to why Unix is sometimes so flaky (command names ? vi ? X-Windows ?...) If you program in C, Harbison and Steele's C: A Reference Manual is the best book around; it's not a shelf book since it's always on my desk right at hand. And for security's sake, although it's a bit old: C Traps and Pitfalls by Andy Koenig. |
On the other hand, I do not recommend getting The New Kornshell: even the experienced script writer will be at a loss in the details the authors go (it's no introduction to scripting at all). The examples are useless: they never say what they are supposed to do and they never tell you the results. And main criticism: I have yet to find a system where the new kornshell (which came out in 93) is installed... You'd be much better off learning perl through its main two books.
Another book to steer clear of: The Programmer's Guide to Fortran 90: a programming book without a single figure or drawing, with the poorest pagination I've ever seen. Impossible to find the options for |