internals, kernel, linux, memory management

Linux Memory Management: Slabs

Memory slabs are used by Linux kernel to manage memory for kernel objects. The objects are e.g dentry, inodes, and buffer heads Why to Know About Slabs If you don’t understand about missing usage info of cached memory objects. The system is low on memory and top & free are not enough. Design of Slab […]

Read more
development, linux, netlink, sockets, ubuntu

Netlink Sockets: Addind a new socket family

Kernel version 3.13, Ubuntu 14.04 $ uname -a Linux ubuntu 3.13.0-37-generic #64-Ubuntu SMP Mon Sep 22 21:28:38 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux We need two changes: User space Locate the file “netlink.h” $ sudo locate “netlink.h” You would get the header file at “/usr/include/linux/netlink.h” Add the new family #define NETLINK_MY     17 Keep […]

Read more
development, linux, Linux internals

Linux FUSE Internals for developers

In this post, I will cover FUSE internals for FUSE 2.9.3. Install package fuse and fuse-devel on CentOS. getattr() is a must in a FUSE file-system. Any lame implementation is okay; Just be careful of the file size in stat structure. If you forgot to compile user file system with 64-bit flags on. Otherwise the […]

Read more
development, linux

Pylucene: Installation on Ubuntu

If you want to install pylucene automatically, try Synaptic package manager or apt-get. This installation gives you Pylucene2.3. This is old. If you wish to get the latest pylucene 3.6 or higher, please look for manual installation discussed in this post. Automatic installation (pylucene 2.3) Install everything mentioned here sudo apt-get install pylucene sudo apt-get […]

Read more
linux

Having slow Ubuntu 11.04?

I am using Ubuntu 11.04 as a VM hosted on a Windows machine. I suspend the Ubuntu VM most of the times to resume my work later. Of late, I observed that VM was performing very slow. I checked the CPU consumption behavior and found that a process “telepathy-logger” was using 100% of CPU! After […]

Read more
linux

Extents in “ext3” file system

My Ubuntu Linux ship with ext3 file-system. This FS is very similar to classical model explained in UNIX OS. A file is logically arranged in a set of blocks, managed through an array of block pointers. In ext3, each inode has an array of fifteen elements. Twelve elements of this array point to a disk […]

Read more
linux, ubuntu

Fun with fuser and wisdom of killing Firefox

Who else is using my file? Ever got curious to know who else would be using a file/socket? If i invoke tail polling on a file in two different sessions: $tail -f logs.txt $tail -f logs.txt $ps -fu my my 11449 11322  0 10:14 pts/0    00:00:00 tail -f logs.txt my 11508 11450  0 10:14 pts/1    […]

Read more