Navid Malekghaini's Personal Blog

My personal weblog for sharing and storing some of my activities related to computer science over the internet

Navid Malekghaini's Personal Blog

My personal weblog for sharing and storing some of my activities related to computer science over the internet

Navid Malekghaini's Personal Blog

Navid Malekghaini

Senior Software Engineer @ Intelligent Cloud Infrastructure Laboratory
Prev. Research Engineer @ University of Waterloo x Orange Telecom

University of Waterloo
Department of computer science
200 University Ave W, Waterloo, ON N2L 3G1, Canada
cs.uwaterloo.ca

contact me
navidmalekedu (AT) gmail (DOT) com [ Primary Email ]
nmalekgh (AT) uwaterloo (DOT) ca

۳ مطلب با کلمه‌ی کلیدی «ubuntu» ثبت شده است

As a seasoned Linux user with a decade of experience, I’ve encountered my fair share of disk space issues on the root filesystem (“/”). In this blog post, I’ll share practical tips to tackle this problem and keep your system running smoothly. Feel free to bookmark this for future reference!

1. Avoid Rebooting

If you notice that your root filesystem is running out of space, avoid shutting down or restarting the system. Restarting can complicate matters further. Instead, follow these steps:

2. Apt Cleanup

  • Run automated cleanup commands:
    sudo apt autoremove  # Removes old packages (especially older kernel images/modules)
    sudo apt clean       # Clears the cache of apt
    
  • Identify and remove large packages using the following command and remove them if not needed:
    dpkg-query --show --showformat='${Package;-50}\t${Installed-Size}\n' | sort -k 2 -n | grep -v deinstall | awk '{printf "%.3f MB \t %s\n", $2/(1024), $1}'
    

3. Clear Snap Packages

  • Clear the snap package cache:
    sudo sh -c 'rm -rf /var/lib/snapd/cache/*'
    
  • Remove disabled snap packages:
    set -eu
    snap list --all | awk '/disabled/{print $1, $3}' |
    while read snapname revision; do
      snap remove "$snapname" --revision="$revision"
    done
    

4. Clean Logs

  • Remove old logs to free up space:
    journalctl --vacuum-time=10d
    

5. Docker Cleanup (if applicable)

  • List big Docker images and containers:
    docker ps -a
    docker images
    
  • Release unused space:
    docker system prune -a --volumes
    
  • Consider moving Docker to a different location (e.g., /home) instead of the root (“/”).

6. Inspect Directories

  • Manually check the size of different directories in the root (“/”) and dig into the root cause:
    du -hs /* | sort -h
    

7. Repartition if Necessary

  • If all else fails, consider repartitioning the root directory (“/”) to reclaim space from other partitions (e.g., “/home”). You can do this at runtime.

Remember, regular maintenance and monitoring disk space can prevent headaches down the road!

موافقین ۰ مخالفین ۰ 11 May 24 ، 01:40

In this post I will show you not only how to run any multimedia application inside docker, but also in efficient and easy way.

Download full tutorial from here

Requirements:

  • Linux OS and Docker (tested on ubuntu)

  • X or Wayland (Linux Display Servers)

    • Ensure that the packages for an X or Wayland server are present on the Docker host. Please consult your distribution's documentation if you're not sure what to install. A display server does not need to be running ahead of time.

  • X11docker

    • x11docker allows Docker-based applications to utilize X and/or Wayland on the host. Please follow the x11docker installation instructions and ensure that you have a working setup on the Docker host.

What is X11Docker?

Reference: https://github.com/mviereck/x11docker/

x11docker allows to run graphical applications (or entire desktops) in Docker Linux containers.

  • Docker allows to run applications in an isolated container environment. Containers need much less resources than virtual machines for similar tasks.

  • Docker does not provide a display server that would allow to run applications with a graphical user interface.

  • x11docker fills the gap. It runs an X display server on the host system and provides it to Docker containers.

  • Additionally x11docker does some security setup to enhance container isolation and to avoid X security leaks. This allows a sandbox environment that fairly well protects the host system from possibly malicious or buggy software.

Download full tutorial from here

موافقین ۰ مخالفین ۰ 09 August 19 ، 23:05




in these series of tutorials i want to play with Linux kernel and Loadable Kernel Modules (LKM) along with getting basic information about kernel architecture and system calls (part 1) , proc file system and processes information's (part 2), these tutorials are adopted from my operating system's class project.

there are two major parts as i mentioned before:

 
  1. Linux kernel (focusing on system calls)
  • Building kernel from source with adding a simple system call
  • Finding specified devices information and necessary functions to implement them
  • How to implement the system call and user space program to get info on specified drivers from kernel

     2. Loadable Kernel Modules (focusing on Proc File system)

  • Implementation of simple “hello world” module and run
  • Finding specified information and necessary functions to implement desired module
  • Implementation of desired kernel module and user program

requirements:

  • Ubuntu version: 16.04.2 (recommended not required)

  • Linux kernel : 4.x.x

  • Internet connection

  • about 30 or 40 gigabytes of space (first part)

  • lots of time for compile ! (first part)



i will start from the simple system call in the next post.

navidx
موافقین ۰ مخالفین ۰ 11 July 17 ، 06:12