UNIX: Admin notes

  1. Debian packages for the Intel compilers

    Bad link: The link to intel-compiler-source_8.0-3_all.deb was incomplete! SORRY!

    Download and install intel-compiler-source_8.0-3_all.deb. Alternatively, you can add the following line to your sources.list
    deb http://www.physik.tu-cottbus.de/~george/debian unstable/$(ARCH)/
    deb http://www.physik.tu-cottbus.de/~george/debian unstable/all/
    deb-src http://www.physik.tu-cottbus.de/~george/debian unstable/source/
    

    Then go to http://www.intel.com/software/products/compilers/ and download the C++ and Fortran compilers, together with the corresponding licences. If you choose to save the tar files (l_cc_p_8.0.055.tar.gz and l_fc_p_8.0.034.tar.gz) in a directory other than /usr/src, don't forget point the environment variable TARDIR to that directory before going on:
    export TARDIR=/dir/where/tarballs/have/been/saved
    
    Then change the directory to /usr/src and unpack the intel-compiler archive:
    cd /usr/src
    tar xzvf intel-compiler-8.0.tar.gz
    
    Go to the newly created directory intel-compiler-8.0 and issue
    dpkg-buildpackage -uc -us -rfakeroot
    

  2. Create rc[0-6].d entries with update-rc.d (Debian)
    update-rc.d mini-dinstall defaults
    
  3. no fonts on SuSE after messing with GTK2/GNOME2

    SuSEconfig --module gtk2
    SuSEconfig --module gconf2
    SuSEconfig --module pango
    
    What they actually do ... later :-).

  4. Delete a message out of the postfix que

    postsuper -d MESSAGEID
    

  5. Querying Tru64 for installed hardware

    Get a list of the installed hardware on an alpha system running Tru64. The first option would be sms, or the SysMan Station. This is a graphical tool and I hate GUI's for such basic things. Our friend from now on is hwmgr (see man hwmgr):
    bash-2.04# hwmgr -view hierarchy
    HWID:  hardware component hierarchy                        
    -----------------------------------------------------------
       1:  platform COMPAQ Professional Workstation XP1000
       2:    cpu CPU0
       5:    bus pci1
       6:      connection pci1slot3
      12:        network tu0
       8:      connection pci1slot6
      13:        scsi_adapter isp0
      14:          scsi_bus scsi0
      47:            disk bus-0-targ-0-lun-0 dsk0
      10:      connection pci1slot8
      15:        bus pci2
      16:          connection pci2slot9
      20:            scsi_adapter itpsa0
      21:              scsi_bus scsi1
      23:    bus pci0
      24:      connection pci0slot7
      28:        unconfigured_hardware Unconfigured-device-(<NULL>)-at-pci0slot307
      29:        bus isa0
      30:          connection isa0slot0
      49:            keyboard keyboard0
      50:            pointer mouse0
      33:          connection isa0slot2
      34:            serial_port tty00
      35:          connection isa0slot3
      36:            serial_port tty01
      37:          connection isa0slot4
      38:            parallel_port lp0
      39:          connection isa0slot5
      40:            fdi_controller fdi0
      41:              disk fdi0-unit-0 floppy0
      51:          connection isa0slot7
      52:            legacy_driver Legacy-driver-(mmsess0)
      42:        ide_adapter ata0
      43:          scsi_bus scsi2
      48:            disk bus-2-targ-0-lun-0 cdrom0
      44:        bus ata1
      45:          scsi_bus scsi3
      53:      connection pci0slot12
      22:        graphics_controller comet0
    bash-2.04#
    
    I was looking for the name of the second SCSI controller, as I wanted it for a Linux box:
    bash-2.04# hwmgr -get attribute -id 20
    20:
      name = itpsa0
      category = scsi_adapter
      registration_time = Mon Dec  9 14:40:39 2002
      user_name = (null) (settable)
      location = (null) (settable)
      software_module = (null)
      state = available
      state_previous = unknown
      state_change_time = none
      event_count = 0
      last_event_time = none
      sim_vendor_id = Tru64 ITPSA
      hba_vendor_id = Symbios 53C895
    bash-2.04#
    
    20 is the HWID of the device, the number on the left column of the previous listing.

  6. power_button_changed_to_crash_dump for SGI IRIX 6.5

    Allow users to induce a crash dump when system 'hangs' by setting a systune variable "power_button_changed_to_crash_dump" to 1.

  7. Get rid of flood broadcasts under linux
    echo 1 /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
    
    On kernel 2.4 you can use the limit option with iptables. Read here in section Other Match for more details.
  8. XFS mount options for heavy I/O load
    mkfs -t xfs -f -l size=32768b /dev/xxx
    mount -t xfs -o logbufs=4,logbsize=32768 /dev/xxx /mount_point
    

    The first will make the on disk log bigger which helps metadata intensive loads not become purely log bound - every request for log space ends up having to flush metadata to disk. The mount options allow more log writes to be in progress at once.

    These should help XFS performance, but I have not tried it:
    echo 5000 > /proc/sys/vm/pagebuf/flush_int
    
    For more details go here.

  9. Quering for installed packages/files/...
      Debian GNU/Linux IRIX HP-UX
    Package Manager dpkg, apt-get inst, swmgr swinstall
    List installed products(with versions) dpkg -l versions [[[prod].image].subsystem] ???
    Show contents(installed files) of product dpkg -L product_name versions list prod_name ???
    Search for a file dpkg -S file_name showfiles -- file_name ???
    Show config files N/A versions config package_name
    versions -c package_name
    ??
    Show changed config files (after an installation) N/A versions -c changed ???
    Search database for a product apt-cache search query_string versions -a command | grep query_string ???
  10. Modify uptime to show customed load averages !!. Unfortunately, you have to know romanian. Here is the mail message.