# haconf -dump -makero
# hastop -all -force
# cd /etc/VRTSvcs/conf/config
# vi main.cf
# hacf -verify .
# hastart
Uncategorized
CDOM and LDOM config
If your server doesn’t have a CDOM, you could create one by running something like this (create_config.ksh):
ldm add-vdiskserver primary-vds0 primary ldm add-vconscon port-range=5000-5100 primary-vcc0 primary ldm add-vswitch net-dev=igb0 primary-vsw0 primary ldm add-vswitch net-dev=nxge0 primary-vsw1 primary ldm set-vcpu 4 primary ldm set-memory 1g primary ldm add-config initial ldm list-config
Reboot the server.
Now let’s say you want to create an LDOM in that server, login to the cdom and do something like this (create_myldom.ksh):
ldm add-domain myldom ldm set-vcpu 16 myldom ldm set-memory 13G myldom ldm add-vnet vnet1 primary-vsw0 myldom ldm add-vnet vnet2 primary-vsw1 myldom ldm add-vdsdev /dev/dsk/
c0t600601605A203100A44CDC74C08 2E211d0s2 vol2@primary-vds0 ldm add-vdisk vdisk0 vol2@primary-vds0 myldom ldm bind myldom ldm set-var auto-boot?=true myldom ldm start-domain myldom
find missing lines
If you want to find the lines “b” is missing from “a”
# fgrep -vxf b a
rsync on an alternate ssh port
rsync -e "ssh -p 44" --progress -rtva myuser@myserver.x:/some/directory/ /somewhere/
fullscreen vs windowed SheepShaver (MacOS classic emulator)
The SheepShaver preferences file is in your user’s home, for instance mine is in /Users/robertodircio/.sheepshaver_prefs
the setting to enable fullscreen is:
screen dga/0/0
to have windowed mode, change that to:
screen win/800/600
Clear linux cached memory
if you want to clear the linux cached memory run “echo 3 > /proc/sys/vm/drop_caches”
root@pc:~# free total used free shared buffers cached Mem: 3951136 2979376 971760 0 29704 2488576 -/+ buffers/cache: 461096 3490040 Swap: 3050492 2268 3048224 root@pc:~# echo 3 > /proc/sys/vm/drop_caches root@pc:~# free total used free shared buffers cached Mem: 3951136 511264 3439872 0 1828 99752 -/+ buffers/cache: 409684 3541452 Swap: 3050492 2268 3048224
it clears it all 🙂
run silent emcgrab
great for scripting 🙂
# ./emcgrab -quiet -legal
create a pptpd vpn server
1. Install pptpd.
sudo apt-get install pptpd
2. the contents of my pptpd.conf:
option /etc/ppp/pptpd-options debug dump logwtmp localip 192.168.2.6 remoteip 192.168.2.230-239
The local IP address is the IP address of your server, the one in ifconfig. The remote IPs are a range you would like the remote user to use on your LAN.
3. My /etc/ppp/pptpd-options:
name pptpd refuse-pap refuse-chap refuse-mschap require-mschap-v2 require-mppe-128 proxyarp nodefaultroute lock nobsdcomp
4. Add user names and passwords for the users you want to give access to your vpn.
rdpm pptpd mypassword *
5. Enable ipv4 forwarding in /etc/sysctl.conf:
net.ipv4.ip_forward=1
6. enable the ipv4 forwarding setting
sysctl -p
7. restart pptpd
/etc/init.d/pptpd restart
add zfs from another spool to your swap.
All the documentation tells you need to use rpool, and if you do a zfs create my pool/swap, it will not appear in /dev/zvol……
it works this way:
zfs create -V 10G anotherpool/swap
then it appears in /dev/zvol and you add it
swap -a /dev/zvol/dsk/anotherpool/swap
two finger scrolling for touchpad in lenovo t400
xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Pressure" 4 xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Width" 8 xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Scrolling" 1 1 xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Edge Scrolling" 0 0 0 xinput set-button-map "SynPS/2 Synaptics TouchPad" 1 2 3 5 4 6 7 8 9 10 11 12