Tuesday, March 3, 2009

When that file was deleted?!! Nice Tool for Linux

It happens a lot when you just wish if you be able to track file deletions and manipulations on your file system to know the root cause of a specific problem.

Imagine if you get this output on your log file:

[21/Feb/2009 11:21:18] IN_CREATE /tmp/services
[21/Feb/2009 11:21:18] IN_CLOSE_WRITE /tmp/services
[21/Feb/2009 11:21:18] * /tmp/services is closed
[21/Feb/2009 11:21:25] IN_DELETE /tmp/services
[21/Feb/2009 11:21:25] * /tmp/services is deleted
[21/Feb/2009 11:21:35] IN_CREATE /tmp/foo
[21/Feb/2009 11:21:35] IN_CLOSE_WRITE /tmp/foo
[21/Feb/2009 11:21:35] * /tmp/foo is closed
[21/Feb/2009 11:21:46] IN_DELETE /tmp/foo
[21/Feb/2009 11:21:46] * /tmp/foo is deleted


So how can you get that?



There is a Linux utility called iwatch that can be downloaded from this url:http://iwatch.sourceforge.net/index.html



You simply trigger the command by: $ iwatch -v /tmp



And you get the output above.



You can also have that send the output to your mailbox:



$ iwatch -v -m 2luqman@luqmanux.com /tmp



Thanks to matty, who posted this tip at his blog and I used it here using his article, read on the full article here: http://prefetch.net/blog/index.php/2009/02/28/monitoring-file-activity-on-linux-hosts/

Tuesday, January 20, 2009

Red Hat Enterprise Linux 5.3 Officially released today

The Red Hat Enterprise Linux 5.3 Release Notes note over 150 updates and upgrades, but here are a few key highlights:

Virtualization enhancements: Red Hat Enterprise Linux 5.3 supports larger x86-64 systems. The number of supported physical CPUs is increased to 126, while maximum memory is increased to 1TB. Virtual server CPU and memory limits have been increased to 32 and 80GB respectively – far higher than competing virtualization products. Additionally the per-guest limits for disks and network interfaces have also been increased. The performance and range of paravirtualized device drivers has been increased, enabling ever more applications to be deployed on virtual servers with near bare-metal performance.

Next-generation hardware enablement: The soon-to-be-released Tylersberg/Nehalem platform is the next-generation of Intel x86-64 hardware. Support for the virtualization and performance features provided by this processor combined with numerous optimizations have already demonstrated exceptional performance over previous processor generations in internal Red Hat testing.

OpenJDK: Red Hat is taking a leadership position in Red Hat Enterprise Linux 5.3 by shipping the first productized implementation of OpenJDK. OpenJDK in 5.3 has passed the full Java SE 6 TCK and is compatible with all applications written for Java SE 6 and previous versions. With the integration of OpenJDK, Red Hat Enterprise Linux 5.3 is the the first enterprise-ready solution with a fully open source Java stack when combined with JBoss Enterprise Application Platform.

Systemtap: This is an application development tool targeted at dynamically allowing applications to be monitored and diagnosed. With Red Hat Enterprise Linux 5.3 support for User Mode (i.e. application level) tracing and profiling is provided for the first time – adding to the Kernel Mode support that was provided in earlier releases. The operative word here being “dynamically,” as the key benefit of Systemtap is the ability, on-the-fly, to add instrumentation, probe points, and memory tracking to running applications. This is key to enable identification and resolution of issues in live environments. Extremely powerful — both for user and kernel space.

Power management
: With “green IT” gaining increasing focus, we have been implementing a progression of power-saving enhancements in every update of Red Hat Enterprise Linux. 5.3 is no exception, with improved handling of low-level power management low-power sleep states.

Disk encryption: Critical for laptop use, but also becoming increasingly important in server deployments (due to concerns with hardware disposal at the end of its lifecycle), Red Hat Enterprise Linux 5.3 includes full support for encryption of storage, either at the block level or file system level. Installer enhancements enable encryption to be configured at installation time, and includes support for the root and swap devices.

Red Hat News | Red Hat Enterprise Linux 5.3 Offers Customers New Features and Capabilities

Technorati Tags:

Friday, January 16, 2009

The Ultimate Linux Reference Guide for Newbies

During the course of your daily sys admin tasks, you definitely need to change IP addresses several times.

In RedHat/Fedora, the first tool that you will find easy to use is probably: system-config-network, then you’ll find your self using the command setup in cases you couldn’t manage to get into Run Level 5, days will pass by and you’ll find your self using ifconfig for this task, and then many tools available for this task.

But how about using the ifcfg command?

ifcfg eth0 del 192.168.0.1

This command takes eth0 down and removes the assigned IP 192.168.0.1

ifcfg eth0 add 192.168.0.2

This command brings eth0 up and assigns the new IP 192.168.0.2

[Originally posted on The Ultimate Linux Reference Guide for Newbies ]

Technorati Tags:

PreCentral.net | all things Palm Pre

Following the same trend of treocentral and other mobile devices portals, we now have two websites that are the 1st place to go for Pre info, these are:

PreCentral.net | all things Palm Pre

And it’s fellow brand-new webOS/Pre-related site:

http://webosareana.com

Just add these to your Google Reader subscriptions and stay tuned!

Technorati Tags:

Vi and Vim Macro Tutorial: How To Record and Play

VI is beast, have you heard this before?

Many of you might be wondering why? this is one of the reasons:

Vi and Vim Macro Tutorial: How To Record and Play

[By SathiyaMoorthy at the http://www.thegeekstuff.com/ ]

Technorati Tags:

Thursday, December 11, 2008

Safe Reboot Of Linux Using Magic SysRq Key

Great, I was looking for kind of the STOP + A key in solaris for Linux and here it is.

I have summarized this great article to:

Safe Reboot Of Linux Using Magic SysRq Key: "First, you need to enable the SysRq key, as shown below.

echo '1' /proc/sys/kernel/sysrq

Following are the command keys available for Alt+SysRq+commandkey.
‘b’ - Immediately reboot the system, without unmounting partitions or syncing.

So: Alt+SysRq+b

We can also do this by echoing the keys to the /proc/sysrq-trigger file. For example, to re-boot a system you can perform the following.

echo 'b' /proc/sysrq-trigger

Perform a Safe reboot of Linux using Magic SysRq KeyTo perform a safe reboot of a Linux computer which hangs up, do the following. This will avoid the fsck during the next re-booting. i.e Press Alt+SysRq+letter highlighted below.

reBoot."

So: Alt+SysRq+B

Monday, December 8, 2008

The Macbook Experiment: Fedora 10 for Two Days | Tux Geek

The Macbook Experiment: Fedora 10 for Two Days | Tux Geek:

Great article that mentions the main differences between Ubuntu and Fedora:

"
  • It uses RPM packaging and YUM for command-line package management, which some may find slower than Ubuntu’s apt-get and aptitude, but I didn’t notice that much of a difference.
  • Community is smaller, number of pages indexed by Google is smaller(31 mil compared to 75) but the forums are active and you will definitely get your questions answered.
  • It is considered leading-edge, because it always integrates the latest open-source technologies. (For example: OpenOffice 3.0, that didn’t made it to Ubuntu 8.10)
  • Comes only with FOSS. So you don’t have MP3 support out of the box.8-thumb The Macbook Experiment: Fedora 10 for Two Days
  • Because security is one of the most important features in Fedora, it has Security-Enhanced Linux(SELinux) which provides advanced security policies trough the use of Linux Security Modules(LSM) in the Linux kernel".
However, I'll add the following:

  • Fedora is Red Hat Based, Ubuntu is Debian based, and since I'm overly used to Red Hat Products, including rpm and Yum, this is my choice, and BTW, it's Linus Torvalds choice and distro! --According to Wikipedia- .
  • Fedora is more for Geeks, Ubuntu is more for Linux novices and starters, there is no clearer than the mandatory Sudo --I know there is workarounds to disable it- while in Fedora you're free to switch to root.
Read on the original article to know about how that works on a Macbook!!