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/
c0t600601605A203100A44CDC74C082E211d0s2 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

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 🙂

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

 

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