ubuntu

How to investigate sessions

To list all current sessions:

loginctl list-sessions

To investigate details of particular session run:

loginctl show-session [session_id]

The sessions files are located in /run/systemd/sessions on Fedora-based systems and in /run/systemd/sessions on Debian-based systems.

If sessions fill up the /run directory for 100% then per recommendation on
https://www.centos.org/forums/viewtopic.php?f=48&t=65472:

Ubuntu Software RAID 1 on EFI

- Use the "manual" partitioning option during install.

- For each of your disks, delete the partition table, and then "automatically partition" the free space. There might be some 1 MB space left at the beginning and at the end of the automatically created partitioning table, just ignore them.

- Modify the automatically generated partition table: use the ext4 and swap partition as "physical RAID devices".

Tags:

Mdadm Cheat Sheet

Mdadm is the modern tool most Linux distributions use these days to manage software RAID arrays; in the past raidtools was the tool we have used for this. This cheat sheet will show the most common usages of mdadm to manage software raid arrays; it assumes you have a good understanding of software RAID and Linux in general, and it will just explain the commands line usage of mdadm. The examples bellow use RAID1, but they can be adapted for any RAID level the Linux kernel driver supports.

If delivered mail doesn't show in user inbox

One of our Ubuntu servers stopped to show properly delivered messages in user inboxes after the last kernel update (Ubuntu precise (12.04.4 LTS)). Because for some reasons DEFAULT= and ORGMAIL= in /etc/procmailrc got replaced by

DEFAULT=/var/mail/$LOGNAME
ORGMAIL=/var/mail/$LOGNAME

so we had to change it back to:

DEFAULT=$HOME/Maildir/
ORGMAIL=$HOME/Maildir/

Now everything is working fine with the following settings for procmail:

root@quiethost:/etc# cat procmailrc
LOGFILE=/var/log/procmail.log

Tags:

How to completely remove APF from Ubuntu

Running 'apt-get remove --purge apf-firewall' often times is not enough, especially if you tried to modify APF's files and paths. So to completely clean up your Ubuntu system form APF (Advanced Policy Firewall) your also need to run the following commands:

root@host:/etc/apt# rm -rf /var/lib/dpkg/info/apf*
root@host:/etc/apt# rm -rf /usr/src/apf*
root@host:/etc/apt# rm -rf /usr/share/man/man1/apf*
root@host:/etc/apt# rm -rf /usr/share/doc/apf*
root@host:/etc/apt# rm -rf /usr/local/sbin/apf
root@host:/etc/apt# rm -rf /usr/sbin/apf
root@host:/etc/apt# rm -rf /etc/rc0.d/K20apf*

How to install XHProf profiler on Ubuntu

XHProf profiler is developed by Facebook and open sourced in March 2009 under the Apache 2.0 license. XHProf is a function-level hierarchical profiler, with a PHP extension (written in C) to collect the raw data, and a few PHP scripts for the reporting/UI layer.

The easiest way to get it is via the PEAR installer (package home):

install php5-common
pear channel-update pear.php.net
pecl install xhprof

Once you have XHProf installed, you should enable it. Open your /etc/php5/conf.d/xhprof.ini and add

[xhprof]
extension=xhprof.so

Tags:

How to create and clone a KVM virtual machine on Ubuntu Server

After having KVM installed in your system, you can easily create a guest virtual machine by running the following command: vmbuilder kvm ubuntu --suite lucid --flavour virtual --iso /opt/iso-images/ubuntu1004.iso --dest=/home/destination --arch amd64 --libvirt qemu:///system --hostname ubuntu --bridge br0 --ip xxx.xxx.xxx.xxx --mask 255.255.255.248 --gw xxx.xxx.xxx.xxx --user ubuntu --name Ubuntu --pass ubuntu --rootsize 110000 --swapsize 1824 --mem 1824 --addpkg acpid --addpkg rsync --addpkg openssh-server --addpkg nano

After having your guest virtual machine up and running you might want to utilize one of the things that's very useful when using virtual machines - the ability to clone them.

Power up Drupal search with Jetty & Apache Solr in Ubuntu 10.04

If you are running a big site with loads of visitors or just running a normal site with very minimal resources your basic Drupal search functionality might slow down your site significantly. And it's not even very efficient solution to search all the contents of your site. Don't worry, the help is here. Apache Solr helps you with your site's search functionality and makes it blazingly fast! In this first part of Apache Solr walk through we are going to install and configure Apache Solr + Jetty with Drupal.

GPG error: http://archive.ubuntu.com lucid Release: The following signatures were invalid

If running 'apt-get update' you get the error:

Reading package lists... Done
W: GPG error: http://archive.ubuntu.com lucid Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key

then

cd /var/lib/apt
mv lists lists.old
mkdir -p lists/partial
apt-get clean
apt-get update

Tags:

How to remove/turn off/disable Linux KVM virbr0 NAT Interface

A virtual bridge, can be defined as a device that bridges virtual interfaces. It provides an easy means of networking virtual networking devices such as venet (virtual network) or veth (virtual ethernet).

Pages

Subscribe to RSS - ubuntu