Linux

How to find the processes using the most swap space in Linux

There's already a good answer to the question at stackoverflow. They suggested to use the top command, then change the sorting field to "swap" by hitting O and p. Unfortunately (afaik) there's no way to do this in batch mode (using the -b switch) and save the top swap using prorcesses in a file. There's another method: use the ps command.
psres=$(ps -eo rss,vsz,user,pid,tty,time,cmd); set -- $(/bin/echo "$psres" | head -n1); shift; shift; echo "SWAP $*"; echo "$psres" | awk 'BEGIN {ORS=""; getline} {print $2 - $1 " "; for (i=3; i<NF; i++) print $i " "; print $NF "\n"}' | sort -rn | head

Mozilla (Firefox + Thunderbird) profile cleaner for linux

It happens occasionally that after a crash (Firefox/Thunderbird or the PC itself) starting up Firefox (or Thunderbird) you experience weird behaviour. Eg. it tells you that the app is already running or it starts, but bookmarks are not available, etc. Cleaning your profile can be easily done manually by removing a couple of files in your Firefox/TB profile, but average users are not familiar with contents of these profile folders. To help them I've written a small app (shell script using Zenity to provide a GUI) that you can put in your Gnome/KDE/etc. menu so all your users can easily access it. Of course, you're free to customize the script anyway you like (eg. take out a few questions to make it even more automatic). I've tested the script in Ubuntu 9.10 (Firefox 3.5.9 and Thunderbird 2.0.0.24).

Great Avidemux tutorials

Describes various basic tasks like cropping, trimming, converting, deinterlacing, etc.

MySecureShell

"MySecureShell is an SFTP server that is based on OpenSSH and allows for very flexible configurations, e.g. it has support for chrooting users into their home directories and limiting upload-/download bandwidths. MySecureShell makes maintenance of an SFTP server easy."

The Linux-PAM System Administrators' Guide

"This manual documents what a system-administrator needs to know about the Linux-PAM library. It covers the correct syntax of the PAM configuration file and discusses strategies for maintaining a secure system."

How to put DOS on an USB drive using linux

Having a bootable DOS partition on an USB drive can be necessary for flashing the BIOS of your motherboard or RAID controller (since most recent PCs come without a floppy drive). However the official way to do this requires you to have already a DOS bootable partition. Fortunately there're a couple of solutions in case you've only a running linux system. The linked page has the best description of the qemu+FreeDOS method (the one that I prefer) and lists various other approaches as well. To keep the instructions safe, I made a copy of them here.

Bandwidth throttling/control on linux

The two most popular solutions:
  • trickle, a userspace bandwidth shaper. It's just this easy:
    trickle -d 200 -u 30 firefox
  • Wonder Shaper, a kernelspace bandwidth shaper. More efficient for interface-level bandwidth shaping (but does not support per application control at all).

Mdadm Cheat Sheet

This just the kind of help that a casual software raid (mdadm) user -like me- needs.

Removing disks from an LVM volume

A nice, detailed howto. It's in the Ubuntu forums, but it does not contain anything Ubuntu specific (ie. you can use it with any distribution).

UNetbootin

"UNetbootin allows you to create bootable Live USB drives for a variety of Linux distributions from Windows or Linux, without requiring you to burn a CD. You can either let it download one of the many distributions supported out-of-the-box for you, or supply your own Linux .iso file if you've already downloaded one or your preferred distribution isn't on the list."

UNetbootin supports (at least at the moment) a lot more distributions than LiLi. However LiLi is a lot more user-friendly (meaning that is has a lot fewer options and a lot fewer chances for users to break the process Smiling ).

Syndicate content