Monday, September 14, 2009

Little Sugar: Creating a device node

To create a device node use mknod

mknod /dev/mem c 1 1

here the device name is /dev/mem

c represents character device this can be block device also

the first 1 represents the major number
the second 1 represents the minor number

Sunday, September 13, 2009

Little Sugar: FreeBSD total RAM

to find out the total RAM installed on your FreeBSD box use something like this

sysctl hw.physmem