You might find the following three Linux / Unix shell scripts helpful.

  • Display processes based on either %CPU or Memory Usage.
  • Display which user is utilizing the CPU the most.
  • Display system’s memory information – total, used and free.

(more…)

{ 0 comments }

Log Effectively Using Custom Perl Logger Module

by Balakrishnan Mariyappan on July 29, 2010

For any custom written user services and processes, you should maintain a log file to view the status of the service, or to troubleshoot any issues with the services/processes.

Perl CPAN offers few modules which provides the automated object interface for handling logging for services.

In this article, let us write our own Perl logger module which internally uses Perl CPAN modules: Log::Agent, Log::Agent::Driver::File and Log::Rotate.

This custom perl logger module will perform the following operations.
(more…)

{ 1 comment }

Emacs Macro Tutorial: How to Record and Play

by SathiyaMoorthy on July 28, 2010

Using Emacs Macro feature you can record and play a sequence of actions inside the editor.

This article explains how to perform record and play inside Emacs editor with an example.

If you are a Vim editor fan, refer to our How to record and play inside Vim editor article.
(more…)

{ 1 comment }

Three Sysadmin Rules You Can’t (And Shouldn’t) Break

by Ramesh Natarajan on July 27, 2010

When I drafted this article, I really came-up with 7 sysadmin habits. But, out of those 7 habits, three really stood out for me.

While habits are good, sometimes rules might even be better, especially in the sysadmin world, when handling a production environment.

Rule #1: Backup Everything ( and validate the backup regularly )

Experienced sysadmin knows that production system will crash someday, no matter how proactive we are. The best way to be prepared for that situation is to have a valid backup.
(more…)

{ 25 comments }

In bash shell, when you use a dollar sign followed by a variable name, shell expands the variable with its value. This feature of shell is called parameter expansion.

But parameter expansion has numerous other forms which allow you to expand a parameter and modify the value or substitute other values in the expansion process. In this article, let us review how to use the parameter expansion concept for string manipulation operations.

This article is part of the on-going bash tutorial series. Refer to our earlier article on bash { } expansion.
(more…)

{ 3 comments }

In this article, let us discuss about how to setup tftpboot, including installation of necessary packages, and tftpboot configurations.

TFTP boot service is primarily used to perform OS installation on a remote machine for which you don’t have the physical access. In order to perform the OS installation successfully, there should be a way to reboot the remote server — either using wakeonlan or someone manually rebooting it or some other ways.

In those scenarios, you can setup the tftpboot services accordingly and the OS installation can be done remotely (you need to have the autoyast configuration file to automate the OS installation steps).
(more…)

{ 1 comment }

5 Steps to Setup User and Group Disk Quota on UNIX / Linux

by Ramesh Natarajan on July 21, 2010

On Linux, you can setup disk quota using one of the following methods:

  • File system base disk quota allocation
  • User or group based disk quota allocation

(more…)

{ 0 comments }

4 Ways of Executing a Shell Script in UNIX / Linux

by SathiyaMoorthy on July 20, 2010

There are four ways to execute a shell script. Each way has it’s own meaning as explained in this article.

(more…)

{ 7 comments }