March 2005

It is possible to monitor UNIX system load average and if it crossed certain limit an email can be send to admin user or even text via pager/sms. 1) Download/view chksysload.bash script 2) Open script using vi: # vi chksysload.bash 3) Customize it according to your needs: # Setup up limit below NOTIFY=”6.0″ # Setup […]

{ 3 comments }

Yes, I know we can use the uptime command to find out the system load average. The uptime command displays the current time, the length of time the system has been up, the number of users, and the load average of the system over the last 1, 5, and 15 minutes. However, if you try to use the uptime command in script, you know how difficult it is to get correct load average. As the time since the last, reboot moves from minutes, to hours, and an even day after system rebooted. Just type the uptime command:

{ 8 comments }

You can use read command with -s option, which causes input coming from a terminal to not be echoed. This is useful to verify password or something else. One line is read from the keyboard or from file descriptor FD if the -u option is supplied, and the first word is assigned to the first […]

{ 3 comments }

Use any one of the following command to create temporary empty file names. The first command is special as it use the redirection operator >, the redirection refers to the standard output. So you are creating a new file or destroying existing file:

{ 9 comments }

Various methods exists to create a random temporary file name. This is useful if your application/shell scripting needs temporary unique file names. Method #1: Use of $RANDOM bash shell variable 1) At shell prompt type command: # echo $RANDOM You will get random value every time. This variable can be use to create unique file […]

{ 13 comments }

In order login into Linux system (over ssh or other services ) you need a username and password. Username and password stored in /etc/passwd and /etc/shadow file respectively. When you supplies password, it encrypts and compare with password stored in /etc/shadow, which is also in, encrypted format (it was stored when you or system administrator […]

{ 14 comments }

Tar name come from Tape ARchiver. It is both a file format and the name of the program used to handle such file. Tar archive files have names ending in “.tar”. If an archive is compressed, the compression program adds its own suffix as usual, resulting in filename endings like “.tar.Z”, “.tar.gz”, and “.tar.bz2″. Tar […]

{ 21 comments }