Sunday, January 1, 2012

Undelete utility for the ext2 file system

e2undel

e2undel - Undelete utility for the ext2 file system

Interactive console tool to recover the data of deleted files on an ext2 file system under Linux. It does not require knowledge about how ext2 file systems works and should be usable by most people. 

This tools searches all inodes marked as deleted on a file system and lists them as sorted by owner and time of deletion. Additionally, it gives you the file size and tries to determine the file type in the way file(1) does. If you did not just delete a whole bunch of files with a 'rm -r *', this information should be helpful to find out which of the deleted files you would like to recover. 

E2undel will not work on ext3 (journaling) filesystems. 

Install e2undel in Debian

#apt-get install e2undel

Versatile resource statistics tool

dstat

dstat - versatile resource statistics tool

Dstat is a versatile replacement for vmstat, iostat and ifstat. Dstat overcomes some of the limitations of these programs and adds some extra features. 

Dstat allows you to view all of your network resources instantly, you can for example, compare disk usage in combination with interrupts from your IDE controller, or compare the network bandwidth numbers directly with the disk throughput (in the same interval). 

Dstat also cleverly gives you the most detailed information in columns and clearly indicates in what magnitude and unit the output is displayed. 

Dstat is also unique in letting you aggregate block device throughput for a certain diskset or network bandwidth for a group of interfaces, i.e. you can see the throughput for all the block devices that make up a single filesystem or storage system. 

Dstat's output, in its current form, is not suited for post-processing by other tools, it's mostly meant for humans to interprete real-time data as easy as possible. 

Install dstat in Debian

#apt-get install dstat


output

-cpu-total- -disk/total -net/total- ---paging-- ---system--
usr sys idl|_read write|_recv _send|__in_ _out_|_int_ _csw_
0 0 100| 0 0 | 0 0 | 0 0 | 0 0
1 1 98| 0 608k| 300B 1994B| 0 0 | 120 49
1 1 98| 0 0 | 420B 1328B| 0 0 | 120 42
0 2 98| 0 0 | 480B 1760B| 0 0 | 121 40
1 1 98| 0 0 | 600B 1760B| 0 0 | 123 44
0 2 98| 0 0 | 480B 1760B| 0 0 | 115 40
2 0 98| 0 0 | 473B 1330B| 0 0 | 113 45
2 0 98| 0 0 | 420B 1326B| 0 0 | 120 42
2 0 98| 0 0 | 480B 1544B| 0 0 | 119 42
0 2 98| 0 0 | 480B 1760B| 0 0 | 120 42
2 0 98| 0 0 | 420B 1546B| 0 0 | 112 44
1 1 98| 0 272k| 360B 1326B| 0 0 | 130 43
0 2 98| 0 8192B| 660B 1652B| 0 0 | 141 46
1 1 98| 0 0 | 420B 1544B| 0 0 | 121 40
2 0 98| 0 0 | 782B 1760B| 0 0 | 126 44
1 1 98| 0 0 | 480B 1760B| 0 0 | 120 40
2 0 98| 0 0 | 782B 1760B| 0 0 | 125 45
1 1 98| 0 0 | 646B 1760B| 0 0 | 122 40

Tool for reporting changes in system configuration

diffmon

diffmon - Tool for reporting changes in system configuration.

This tool is run by a nightly cron job, and takes a `diff' of specified system configuration files and emails them to a specified email address. Options to diff can be specified. This is useful in friendly environments where there are multiple sysadmins working on configuration files/setups and everyone's changes are reported. CVS is a better answer, but most of us don't want to have the hassle of putting system files in a repository. 

Install diffmon in Debian
#apt-get install diffmon

Monitor apt sources for upgrades


apt-watch 

apt-watch - Monitor apt sources for upgrades
apt-watch is a GNOME applet which will inform you when upgrades are available for your computer. It is similar to Windows Update or the Red Hat Network applet.

Install apt-watch in Debian
#apt-get install apt-watch

checkservice

checkservice - Checks the status of services on (remote) hosts

Checkservice is a simple and fast service checking perl script. It is able to show the results in many ways: by keeping logs, showing it on the PHP status page, output that MRTG can use or warning(plugins) if something is wrong. Checkservice features grouping of hosts, very easy configuration and thorough service checking using checkplugins

Install checkservice in Debian
#apt-get install checkservice

Debian Administration Utilities (Realtime Apache monitoring tool)


apachetop

apachetop - Realtime Apache monitoring tool

Apache top is a curses-based realtime utility to display information from a running copy of Apache.

It is modelled after the standard 'top' utility, and displays information such as the requests pers second, bytes per second
and the most popular URLs displayed.

It must be run from a machine running Apache, as it works by processing the logfiles found in /var/log/apache.

Install apachetop in Debian

#apt-get install apachetop

If you want to monitor your apache log files need to be in /var/log/apache location

Output
last hit: 00:00:00 atop runtime: 0 days, 00:04:05 17:21:05
All: 0 reqs ( 0.0/sec) 0.0B ( 0.0B/sec) 0.0B/req
2xx: 0 ( 0.0%) 3xx: 0 ( 0.0%) 4xx: 0 ( 0.0%) 5xx: 0 ( 0.0%)
R ( 30s): 0 reqs ( 0.0/sec) 0.0B ( 0.0B/sec) 0.0B/req
2xx: 0 ( 0.0%) 3xx: 0 ( 0.0%) 4xx: 0 ( 0.0%) 5xx: 0 ( 0.0%)

Saturday, December 31, 2011

Seven ways to troubleshoot Ubuntu


Ubuntu strives to be suitable even for novice Linux users, but as with any operating system, problems will inevitably arise. Resolving issues with an unfamiliar OS can be daunting, but never fear. Plenty of resources exist to help get you back on the right track. Here are just a few ways to troubleshoot your Ubuntu desktop.
1. Use the online help. Clicking the question mark icon in the main menu bar will bring up Ubuntu’s extensive collection of formatted help documents. Use these to get up to speed with major features and applications.
2. Read the documentation. The Ubuntu developers maintain a documentation site athelp.ubuntu.com. The quality of the instruction varies, but it’s a good way to familiarize yourself with the day-to-day workings of a Linux desktop. If you prefer paper manuals, a growing list of volumes is available, including The Official Ubuntu Book, published by Prentice-Hall.
3. Join the forums. By and large, Linux is developed and supported by the open source community. Your fellow users are your first and best resource for answers and advice about your Ubuntu desktop. Become an active participant in the community discussions atubuntuforums.org, and ask your questions there. There’s a good chance that someone else has already experienced the same problems you have and has already begun the discussion -- use the search feature.
4. Search the Web. If the official forums can’t provide the answers you seek, by all means search elsewhere. Ubuntu’s popularity has inspired any number of enthusiasts to produce their own documentation and tutorial Web sites. Much of this advice is high quality.
5. Get paid support. Canonical, the company that maintains the Ubuntu Linux distribution, earns its money by offering enterprise-level support for Ubuntu users. You can purchase a 9-to-5 support contract for yourself or your business, or pay a little more to receive around-the-clock support. Contact Canonical Global Support Services for more information.
6. Enable the remote desktop feature. Under the System > Preferences menu you’ll find an option called Remote Desktop. With this enabled, IT staff (or your Linux-savvy friends) can use an application called a VNC (virtual network computing) client to view and control your PC remotely, in order to help diagnose and fix your problems. Just make sure your firewall is configured to let VNC connections in.
7. Make peace with the command line. Linux newbies dread the prospect of working with a text-based interface, but the command line prompt can be your best friend in a troubleshooting emergency. Although it’s similar to the old MS-DOS command shell, the Unix command line is more complex and also much more powerful. Once you’ve learned to use it, you’ll find that Linux is packed with hidden tools that get you back on your feet when the GUI fails you. A Web search will reveal a number of online tutorials to teach you the basics. To get started, you can access the command line in Ubuntu by launching the Terminal from the Applications > Accessories menu.

Downloading Debian CD/DVD images via HTTP/FTP


Official CD/DVD images of the stable release

To install Debian on a machine without an Internet connection, it's possible to use CD images (650 MB each) or DVD images (4.4 GB each). Download the first CD or DVD image file, write it using a CD/DVD recorder, and then reboot from that.
The first CD/DVD disk contains all the files necessary to install a standard Debian system.
To avoid needless downloads, please do not download other CD or DVD image files unless you know that you need packages on them.
CD
The following links point to image files which are up to 650 MB in size, making them suitable for writing to normal CD-R(W) media:
DVD
The following links point to image files which are up to 4.4 GB in size, making them suitable for writing to normal DVD-R/DVD+R and similar media: