Pages

Tuesday, May 27, 2008

MRTG - The Multi Router Traffic Grapher

MRTG applications is useful to monitor network and as well as servers utilizations( like CPU, Memory, Disk etc) by seeing MRTG graphs.

MIB MRTG refers to MIB ( Residing in memory, MIBs are data structures that are constantly updated via the SNMP daemon ) counter values as counter values.

Dependencies of MRTG
____________________

* SNMP
* HTTP

Configuring Simple SNMP on a Linux Server


1) Save the old configuration file

[root@leo]# cd /etc/snmp/
[root@leo]# mv snmpd.conf snmpd.conf.old
[root@leo]# vi snmpd.conf


2) Enter the following line in the new configuration file to set the Read Only community string to secrect123.

###snmpd.conf file ########

rocommunity secrect123

## sec.name source community
## ======== ====== =========
com2sec local localhost secrect123
com2sec network_1 10.16.1.0/24 secrect123
com2sec network_2 10.16.2.0/24 secrect123

## Access.group.name sec.model sec.name
## ================= ========= ========
group MyROGroup_1 v1 local
group MyROGroup_1 v1 network_1
group MyROGroup_2 v2c network_2

## MIB.view.name incl/excl MIB.subtree mask
## ============== ========= =========== ====
view all-mibs included .1 80

## MIB
## group.name context sec.model sec.level prefix read write notif
## ========== ======= ========= ========= ====== ==== ===== =====
access MyROGroup_1 "" v1 noauth exact all-mibs none none
access MyROGroup_2 "" v2c noauth exact all-mibs none none


3) start SNMP services on each reboot with the chkconfig command

[root@leo]# chkconfig snmpd on
[root@leo]#

4) Start SNMP to load the current configuration file.

[root@leo]# service snmpd start



5) Test SNMP

[root@leo]# snmpwalk -v 1 -c secrect123 localhost system

[root@leo]# snmpwalk -v 1 -c secrect123 localhost interface



Configuring MRTG


1) Use MRTG's cfgmaker command to create a configuration file named mrtg.cfg for the server using a Read Only community string of secrect123. Place all data files in the directory /var/www/mrtg.

[root@leo]# cfgmaker --output=/etc/mrtg/mrtg.cfg \
--global "workdir: /var/www/mrtg" -ifref=ip \
--global 'options[_]: growright,bits' \secrect123@localhost

2) Use MRTG's indexmaker command to create a Web index page using your new mrtg.cfg file as a guide. The MRTG Web GUI expects to find the index file in the default MRTG Web directory of /var/www/mrtg/, so the format of the command would be.

[root@leo]# indexmaker --output=/var/www/mrtg/index.html \ /etc/mrtg/mrtg.cfg


3) Add MRTG line in /etc/cron.d/mrtg and restart crond daemon

0-59/5 * * * * root env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg

4) Run MRTG using /etc/mrtg/mrtg.cfg as your argument three times.

[root@leo]# env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
[root@leo]# env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
[root@leo]# env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg


Configuring Apache To Work With MRTG

MRTG is useful because it can provide a graphical representation of your server's performance statistics via a Web browser.

1)
#add lines at end to /etc/httpd/conf/httpd.conf

< Location /mrtg >
Order deny,allow
Deny from all
Allow from localhost 10.16.1.0/24
< /Location >

2) restart httpd daemon to run with new configuration


3) URL : http://localhost/mrtg

Thursday, May 22, 2008

GNU Freetalk - console based Jabber client

Looking for a New IM client ?

Here you can try this "GNU Freetalk - console based Jabber client".

Freetalk is a console based Jabber client. It features a readline interface with completion of buddy names, commands, and even ordinary English words. Freetalk is extensible, configurable, and scriptable through a Guile interface.

Thursday, May 15, 2008

Firefox / Sunbird/ Thunderbird/ SeaMonkey Add-ons

Firefox/Sunbird/Thunderbird/SeaMonkey Add-ons allows you to customize application as per your taste. It's just few simple steps which enables your interested plug-in/themes/download/ on your application.

Below Find URL's For particular Add-on and there category

Firefox Add-ons
Sunbird Add-ons
Thunderbird Add-ons
SeaMonkey Add-ons


Firefox Add-ons: Browse Web Development

Firebug

Firebug integrates with Firefox to put a wealth of development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page..

FireFTP

FireFTP is a free, secure, cross-platform FTP client for Mozilla Firefox which provides easy and intuitive access to FTP servers.

Html Validator

HTML Validator is a Mozilla extension that adds HTML validation inside Firefox and Mozilla. The number of errors of a HTML page is seen on the form of an icon in the status bar when browsing. The extension can validate the HTML sent by the server or the HTML in the memory (after Ajax execution) ...

JavaScript Debugger
Venkman is the code name for Mozilla's JavaScript Debugger. Venkman aims to provide a powerful JavaScript debugging environment for Mozilla based browsers.

Tuesday, May 13, 2008

Basket note Pads :note-taking application

This multi-purpose note-taking application helps you to:

* Easily take all sort of notes
* Collect research results and share them
* Centralize your project data and reuse it
* Quickly organize your thoughts in idea boxes
* Keep track of your information in a smart way
* Make intelligent To Do lists


download here

URL Redirect

Redirect Directive

Description: Sends an external redirect asking the client to fetch a different URL
Syntax: Redirect [status] URL-path URL
Context: server config, virtual host, directory, .htaccess
Override: FileInfo
Status: Base
Module: mod_alias

The Redirect directive maps an old URL into a new one by asking the client to refetch the resource at the new location.

The old URL-path is a case-sensitive (%-decoded) path beginning with a slash. A relative path is not allowed. The new URL should be an absolute URL beginning with a scheme and hostname.

Example:

vi /etc/apache2/apache2.conf
RewriteEngine on

Redirect /service http://foo2.bar.com/service

If the client requests http://myserver/service/foo.txt, it will be told to access http://foo2.bar.com/service/foo.txt instead.


Meta Refresh URL Redirect

Meta Refresh URL Redirect is an example of a meta refresh URL redirect.
The code is,

< meta http-equiv="refresh" content="5;url=http://www.foo.org" />

This method displays the new page that the refresh points to by 5 seonds.


PHP URL Redirect


The code for redirect URL, code goes at the top of the page.
<?php
header("location:http://www.foo.org/index.php");
exit;
?>

Monday, May 12, 2008

AniLinux: run-parts : run scripts or programs in a directory

AniLinux: run-parts : run scripts or programs in a directory

sure!!

Gnuplot

Gnuplot is a portable command-line driven interactive data and function plotting utility for UNIX, IBM OS/2, MS Windows, DOS, Macintosh, VMS, Atari and many other platforms. The software is copyrighted but freely distributed (i.e., you don't have to pay for it). It was originally intended as to allow scientists and students to visualize mathematical functions and data. It does this job pretty well, but has grown to support many non-interactive uses, including web scripting and integration as a plotting engine for third-party applications like Octave. Gnuplot has been supported and under development since 1986.

Gnuplot supports many types of plots in either 2D and 3D. It can draw using lines, points, boxes, contours, vector fields, surfaces, and various associated text. It also supports various specialized plot types.

Thursday, May 8, 2008

K3b - The CD/DVD Kreator for Linux - optimized for KDE - licensed under the GPL

K3b is easy to burn data files/ images etc to CD/DVD in Linux Ubuntu. k3b is compatible with other distro's like Fedora etc.
More details www.k3b.og

Wednesday, May 7, 2008

Shell Scripting: Read entries from administrative database

While scripting it is necessary to gather entries from administrative database such as passwd, group files or services, protocols or networks etc. Traditionally grep is choice of all UNIX administrators but recently I found GNU getent command. The command is quick, saves time:

The getent program gathers entries from the specified administrative database using the specified search keys. For example:

$ getent passwd vivek
$ getnet group admins
$ getent protocols vrrp
$ getent services www

Overall, it supports following databases:

* ahosts
* ahostsv4
* ahostsv6
* aliases
* ethers
* group
* hosts
* netgroup
* networks
* passwd
* protocols
* rpc services
* shadow

Thursday, May 1, 2008

Adding New NIS users

New NIS users can be created by logging into the NIS server and creating
the new user account. In this case, you'll create a user account called
nisuser and give it a new password.

Once this is complete, you then have to update the NIS domain's
authentication files by executing the make command in the /var/yp
directory.

This procedure makes all NIS-enabled, nonprivileged accounts become
automatically accessible via NIS, not just newly created ones. It also
exports all the user's characteristics stored in the /etc/passwd and
/etc/group files, such as the login shell, the user's group, and home
directory.

[root@by]# useradd -g users nisuser
[root@by]# passwd nisuser
Changing password for user nisuser.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[root@by]# cd /var/yp
[root@by]# make
[root@by]#

You can check to see if the user's authentication information has been
updated by using the ypmatch command, which should return the user's
encrypted password string.

[root@by]# ypmatch nisuser passwd
nisuser:$1$d6E2i79Q$wp3Eo0Qw9nFD/::604:1100::/home/nisuser:/bin/sbash


You can also use the getent command, which has similar syntax. Unlike
ypmatch, getent doesn't provide an encrypted password when run on an NIS
server, it just provides the user's entry in the /etc/passwd file. On a
NIS client, the results are identical with both showing the encrypted
password.

[root@by]# getent passwd nisuser
nisuser:x:604:1100::/home/nisuser:/bin/bash
[root@by]#