Thursday, February 26, 2009

Date and Hardware colck change - ubuntu

Resetting the Date and Time

The Ubuntu installer queries during installation for default time zone settings, and whether your computer's hardware clock is set to Greenwich mean time (GMT)more properly known as UTC or coordinated universal time.

Linux provides a system date and time; your computer hardware provides a hardware clock-based time. Ubuntu provides several date and time utilities you can use at the command line or during an X session, including these:

date Used to display, set, or adjust the system date and time from the command line

hwclock A root command to display, set, adjust, and synchronize hardware and system clocks

time-admin Ubuntu's graphical date, time, and network time configuration tool

Using the date Command

Use the date command to display or set your Linux system time. This command requires you to use a specific sequence of numbers to represent the desired date and time. To see your Linux system's idea of the current date and time, use the date command like this:

sahab@sahab-desktop:~$ sudo date 

Thu Feb 26 15:35:36 PST 2009

To adjust your system's time (say, to January 27, 2006 at 8 a.m.), use a command line with the month, day, hour, minute, and year, like so:

$ sudo date 022706002009

Fri Feb 27 08:00:00 EDT 2009

Using the hwclock Command

Use the hwclock command to display or set your Linux system time, display or set your PC's hardware clock, or to synchronize the system and hardware times. To see your hardware date and time, use hwclock with its --show option like so:

sahab@sahab-desktop:~$ sudo hwclock --show

Thu 26 Feb 2009 03:43:26 PM PST -0.689380 seconds

Use hwclock with its --set and --date options to manually set the hardware clock like so:

$ sudo hwclock --set --date "02/27/09 08:00:00"

$ sudo hwclock --show
Fri 27 Feb 2009 08:00:08 AM GMT -0.151718 seconds

In these examples, the hardware clock has been set using hwclock, which is then used again to verify the new hardware date and time. You can also hwclock to set the Linux system date and time date using your hardware clock's values with the Linux system date and time.

For example, to set the system time from your PC's hardware clock, use the --hctosys option like so:

$ sudo hwclock --hctosys

To set your hardware clock using the system time, use the --systohc option like so:

$ sudo hwclock --systohc

Changing the Time and Date

Ubuntu's graphical X tool named time-admin can be used to set your system date and time. The client is found in System, Administration, Time & Date; or you can start it from the command line of an X11 terminal window like this:

$ gksudo time-admin &

After you press Enter, you are asked to enter your password. Type in your password and click the OK button. Set the date and time by using the Calendar and Time fields.

Wednesday, February 25, 2009

Mozilla Bookmark Backup and Restore

Mozilla Bookmark Backup and Restore

In your old machine open the mozilla firefox and Click the Bookmark menu

Then click organize bookmark--->There select the Export Html -->saved to your system names as bookmark.html

Then login to your new machine or newly installed firefox

Open mozilla--->organize bookmark--->There select the Import Html --->Point to the location of bookmark.html file

Evolution Backup and Restore - Ubuntu

Backup Evolution

Step 1: Shutdown evolution and gconftool-2

$gconftool-2 --shutdown $evolution –force-shutdown 

Step 2:Create an archive with the data and configuration files

To completely save the Evolution data and configuration, you need to save the following directories/files:

  1. ~/.evolution/

  2. ~/.gconf/apps/evolution/

  3. ~/.gnome2_private/Evolution

The following command will take care of these
$tar -cvzf evolution-backup.tar.gz .evolution .gconf/apps/evolution

Now the file evolution-backup.tar.gz is the backup you want. You can move the data over to another Ubuntu computer if you like, and just un-tar the archive while in your /home/username/ directory to restore it.

To restore, use:

$gconftool-2 --shutdown

$evolution --force-shutdown
$tar xzf evolution-backup.tar.gz

Sunday, February 22, 2009

kernel panic : not syncing - Ubuntu 8.10

kernel panic : not syncing; VFS; Unable to mount root fs on unknown-block (0,0)

Try the Following steps for solving the issue

Boot from live cd

mkdir /mnt/linux
mount /dev/sda1 /mnt/linux ----> sda1 is my system root partition
chroot /mnt/linux /bin/bash
mount -t proc /proc /proc

change source list into Intrepid Ibex.

apt-get install initrd-tools
apt-get remove linux-image-2.6.27-9-generic

it will remove 2.6.27-9 and install linux-image-2.6.27-11-generic

Friday, February 20, 2009

Default keyring can't unlock - Ubuntu 8.10

For Solving wireless issue default keyring can't unlock error in ubuntu 8.10. I have remove the "default.keyring" file .gnome folder. i.e

rm ~/.gnome2/keyrings/default.keyring

After that I have tried to setup wirelss network, It ask to setup the new password.
Then I can able to setup the wireless network.

Converting PDF to .doc

KWord is a KDE application that has a pdf “import” feature which lets you import either entire pdf documents or just a few pages from a pdf document while preserving the formatting! Of course - this only works for pdf documents which are not scanned images of pages.

Installing kword

sudo apt-get install kword

KWord - file menu
Start the import using the “File” -> “Import” option in the main KWord menu.

Kword - import pdf
After you select the pdf file to be imported, you will see a window like the one above where you can specify the pages you want to import. After the edit you can save it .doc or open office standard format.

PDF to .doc convertor using website

Following website we can convert out pdf document to word,excel and image formats

Wednesday, February 18, 2009

Live Linux DVD from Fedora CD ISOs

This is a how to for creating an installable Fedora DVD from the 4 Fedora CD images (ISOs).

  1. Extract all the files from Discs 2,3,4, into subfolders (Disc2,Disc3,Disc4 respectively).These folders should be under the folder containing the ISO's. (mount -o loop cd.iso disc2)

  2. Open first ISO "FC3-i386-disc1.iso".Double click the file: "\Fedora\RPMS\TRANS.TBL".It should open up in notepad.

  3. look inside the subfolders created in step one,look for :\DiscX\Fedora\RPMS\TRANS.TBL (where X is 2 to 4).

  4. Copy the list inside each version of these TRANS.TBL files into the original TRANS.TBL file opened in the ISO program.

  5. Once all the data is merged/copied into the first file, save it to the root folder where the ISO's are saved.

  6. Drag all the extracted .RPM files(contained in subfolder created in Step 1) into the ISO: "FC3-i386-disc1.iso", folder: "\Fedora\RPMS\".

  7. Drag the merged TRANS.TBL file you saved into the ISO: "FC3 i386 Disc1\Fedora\RPMS\".Answer "yes" to replace the old file.

  8. Edit the file: .idiscinfo Change line 4: from " 1 " to: " 1,2,3,4 ".

  9. Save the ".idiscinfo" to main folder.

  10. Replace orginal ".idiscinfo" file with edited one.

  11. Change the capacity of the media to that of the DVD (normally 4.7GB).

  12. Check everything is correct. That's it, the media should boot, as you used the original Fedora disc1.Rename the file "FC3-i386-disc1.iso" to "FC3-i386-DVD.iso".

  13. Write this ISO image to DVD with disc authoring software (Infrarecorder or Nero).

Monday, February 16, 2009

Increase the screen resolutions - Ubuntu (7.10)

Increase the screen resolutions - Ubuntu (7.10)

    To start, open a Terminal window by selecting Applications -> Accessories -> Terminal

    Enter in sudo dpkg-reconfigure -phigh xserver-xorg and then your password.

    Make sure that vesa is highlighted (it should be by default, but if you have to scroll up or down to get to it, use the up and/or down keys on your keyboard) and then hit enter.

Select the resolutions that you would like to be available for Ubuntu by using the arrow keys to scroll up and down, and the Space Bar to select them. Do not select resolutions that your Mac doesn’t natively support. Because I prefer not to work with Parallels in “Full Screen” mode, and my MacBook Pro is set to 1440×900, I’ve opted for 1228×800. When you’re done selecting resolutions, hit enter.

Restart X by clicking Control+Alt+Delete (backspace). Ta-da! Your new resolutions are now available.

Thursday, February 12, 2009

Server Load - Top Command

Top command – Linux

Top - command produces a frequently-updated list of processes. By default, the processes are ordered by percentage of CPU usage, with only the "top" CPU consumers shown. The top command shows how much processing power and memory are being used, as well as other information about the running processes.

Sample Output is Given above

The information in the screenshot
uptime – Server Uptime
Users – Number of user Login
Load aversage – Server Load Information
  eg: load average: 0.41, 0.50, 1.256
during the last minute, the CPU was overloaded by 41% (1 CPU with 0.41 runnable processes, so that 0.73 processes were waiting for a turn) 
during the last 5 minutes, the CPU was underloaded 50% (no processes were waiting for a turn) 
during the last 15 minutes, the CPU was overloaded 256% (1 CPU with 1.25 runnable processes, so that 6.98 processes were waiting for a turn) 

Some options to top are listed below.

 -d: Delay time interval as: -d (seconds. tenths)
  Specifies the delay between screen updates
 eg) top -d 04.59

 -u: Monitor by user as: -u somebody
  Monitor only processes with an effective UID or user name matching
  That given.
 c: RUSER -- Real User Name. The real user name of the task's owner.
eg) top -u sahab

Use the -n flag to limit the number of iterations: 
  top -n 1

Thursday, February 5, 2009

Mysql Error - “The total number of locks exceeds the lock table size”

“The total number of locks exceeds the lock table size”
I encountered this error when executing the SQL below.

DELETE perfdata_service_raw
FROM perfdata_service_raw, perfdata_host
WHERE perfdata_service_raw.host_name = perfdata_host.host_name AND
perfdata_host.is_deleted = 1


Increase the innodb_buffer_pool_size variable in /etc/my.cnf. The default value is 8M, so I set it to 256M, restart the mysqld service (service mysqld restart), and the problem is resolved.