> curl -s http://169.254.169.254/latest/meta-data/
ami-id
ami-launch-index
ami-manifest-path
block-device-mapping/
hostname
instance-action
instance-id
instance-type
kernel-id
local-hostname
local-ipv4
placement/
public-hostname
public-ipv4
public-keys/
reservation-id
Use the --parseonly (puppet.conf manpage: “just check the syntax of the manifests”) and --ignoreimport (“enables you to parse-check a single file rather than requiring that all files exist”) flags to the puppet comand:
> puppet --parseonly --ignoreimport <filename.pp>
Reference: Puppet
> sudo checkinstall -D --pkgname openldap_proxy --pkgversion=2.4.22-hrc --arch=amd64 \
--maintainer=sysadmin@example.com --nodoc
Use the +nssearch flag to dig: “When this option is set, dig attempts to find the authoritative name servers for the zone containing the name being looked up and display the SOA record that each name server has for the zone.”
> dig +nssearch hurricane-ridge.com
SOA ns2.hurricane-ridge.com. domainadmin.hurricane-ridge.com. 2009081500 3600 1200 2419200 3600 from server ns6.dnsmadeeasy.com in 18 ms.
SOA ns2.hurricane-ridge.com. domainadmin.hurricane-ridge.com. 2009081500 3600 1200 2419200 3600 from server ns5.dnsmadeeasy.com in 28 ms.
SOA ns2.hurricane-ridge.com. domainadmin.hurricane-ridge.com. 2009081500 3600 1200 2419200 3600 from server ns7.dnsmadeeasy.com in 54 ms.
SOA ns2.hurricane-ridge.com. domainadmin.hurricane-ridge.com. 2009081500 3600 1200 2419200 3600 from server ns2.hurricane-ridge.com in 69 ms.
NetApp requires setting a timeout value of 190 seconds for all VMware data stores on their filers to handle “long fabric or storage-side I/O interruptions”; this is done as follows on FreeBSD:
# sysctl kern.cam.da.default_timeout=190
This can be set permanently in /etc/sysctl.conf:
kern.cam.da.default_timeout=190
Elsewhere, I have seen a recommendation for FreeBSD on ESX that kern.cam.da.retry_count be set to 120.
To query the architecture of installed RPMs, use a custom query format:
rpm -q -a --queryformat='%{N}-%{V}-%{R}.%{arch}\n'
# mount -o loop disk1.iso /mnt/disk
Information from How to install gems when you’re not root as recorded in Google’s cache (site appears to be down from here, perhaps permanently).
Set the GEM_PATH environment variable:
export GEM_PATH=~/gems
When installing gems, use the “-i” flag:
gem install -i $GEM_PATH some_random_gem
You may wish to add ~/gems/bin to your shell’s path.
Disable:
# qmod -d all.q@compute-0-0.local workflow.q@compute-0-0.local
Enable:
# qmod -e all.q@compute-0-0.local workflow.q@compute-0-0.local
Adapted from the lpadmin man page, for an HP JetDirect printer:
> pfexec lpadmin -p lp01 -v /dev/null -m netstandard -o dest=lp01.example.com:9100 -o protocol=tcp -T PS -I postscript
> pfexec lpset -a banner=never lp01
> pfexec lpadmin -d lp01
> pfexec enable lp01
> pfexec accept lp01