Category: operating system

operating system

About bash builtin command named “eval”

ABOUT eval eval is a builtin command of the Bash shell. It concatenates its arguments into a single string, joining the arguments with spaces, then executes that string as a bash command. It’s similar to running bash -c “string”, but eval executes the command in the current shell environment rather than creating a child shell

Hacking with Makefile for machine architecture detection

# SPDX-License-Identifier: GPL-2.0 INCLUDEDIR := -I. CFLAGS := $(CFLAGS) $(INCLUDEDIR) -Wall -O2 -g TEST_GEN_FILES := adi-test UNAME := $(shell uname -m) all: $(TEST_GEN_FILES) $(TEST_GEN_FILES): adi-test.c ifeq ($(UNAME), sparc64) $(info Machine architecture does match) else $(info exit) $(error Machine architecture does not match) endif TEST_PROGS := include ../../ $(OUTPUT)/adi-test: adi-test.c

slabinfo – kernel slab allocator statistics

WHAT IS SLAB ALLOCATION ? Slab allocation is a memory management mechanism intended for the efficient memory allocation of kernel objects. It eliminates fragmentation caused by allocations and deallocations. The technique is used to retain allocated memory that contains a data object of a certain type for reuse upon subsequent allocations of objects of the

pstree command usage example

$pidof systemd 1461 1059 $pstree 1461 systemd─┬─(sd-pam) ├─at-spi-bus-laun─┬─dbus-daemon │ └─3*[{at-spi-bus-laun}] ├─at-spi2-registr───2*[{at-spi2-registr}] ├─dbus-daemon ├─dconf-service───2*[{dconf-service}] ├─evolution-addre─┬─evolution-addre───5*[{evolution-addre}] │ └─4*[{evolution-addre}] ├─evolution-calen─┬─evolution-calen───9*[{evolution-calen}] │ └─4*[{evolution-calen}] ├─evolution-sourc───3*[{evolution-sourc}] ├─gnome-shell-cal───5*[{gnome-shell-cal}] ├─gnome-terminal-─┬─bash───pstree │ └─3*[{gnome-terminal-}] ├─goa-daemon───4*[{goa-daemon}] ├─goa-identity-se───3*[{goa-identity-se}] ├─gvfs-afc-volume───3*[{gvfs-afc-volume}] ├─gvfs-goa-volume───2*[{gvfs-goa-volume}] ├─gvfs-gphoto2-vo───2*[{gvfs-gphoto2-vo}] ├─gvfs-mtp-volume───2*[{gvfs-mtp-volume}] ├─gvfs-udisks2-vo───2*[{gvfs-udisks2-vo}] ├─gvfsd───2*[{gvfsd}] ├─gvfsd-fuse───5*[{gvfsd-fuse}] ├─gvfsd-metadata───2*[{gvfsd-metadata}] ├─mission-control───3*[{mission-control}] ├─pulseaudio───2*[{pulseaudio}] └─tracker-store───7*[{tracker-store}] $pstree 1059 systemd─┬─(sd-pam) ├─at-spi-bus-laun─┬─dbus-daemon │ └─3*[{at-spi-bus-laun}] ├─at-spi2-registr───2*[{at-spi2-registr}] ├─dbus-daemon └─pulseaudio───2*[{pulseaudio}] $ $pstree `pidof systemd | awk ‘{print $2}’` systemd─┬─(sd-pam)