# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet manual
auto lxc-br-nat
iface lxc-br-nat inet static
address 10.0.2.1
netmask 255.255.255.0
auto br0
iface br0 inet static
address 115.162.91.174
netmask 255.255.255.240
gateway 115.162.91.161
dns-nameservers 8.8.8.8 8.8.4.4
bridge_ports eth0 lxc-br-nat
bridge_stp off
bridge_fd 0
auto br0:1
iface br0:1 inet static
address 115.162.91.165
netmask 255.255.255.240
auto br0:2
iface br0:2 inet static
address 115.162.91.167
netmask 255.255.255.240
zend@work:work$ cat get_swap.sh
#!/bin/bash
# Get current swap usage for all running processes
# Erik Ljungstrom 27/05/2011
SUM=0
OVERALL=0
for DIR in `find /proc/ -maxdepth 1 -type d | egrep "^/proc/[0-9]"` ; do
PID=`echo $DIR | cut -d / -f 3`
PROGNAME=`ps -p $PID -o comm --no-headers`
for SWAP in `grep Swap $DIR/smaps 2>/dev/null| awk '{ print $2 }'`
do
let SUM=$SUM+$SWAP
done
if [ $SUM != 0 ]; then
echo "PID=$PID - Swap used: $SUM - ($PROGNAME )"
let OVERALL=$OVERALL+$SUM
fi
SUM=0
done
echo "Overall swap used: $OVERALL"
zend@work:work$
zend@sandbox:~$ landscape-sysinfo
System load: 0.03 Users logged in: 1
Usage of /: 10.7% of 32.57GB IP address for vlan24: 10.165.49.47
Memory usage: 18% IP address for vlan20: 192.168.20.116
Swap usage: 0% IP address for tun1: 172.30.1.2
Processes: 98
Graph this data and manage this system at:
https://landscape.canonical.com/
zend@sandbox:~$
auto lo
iface lo inet loopback