Archive for September, 2009

Changing the proxy ports and addresses in Webmin

By default, Squid listens for proxy requests on TCP port 3128 on all of your system’s IP addresses. Because this is not the usual port that proxies are run on (8000 and 8080 seem to be the most common), you may want to change it. You might also want to edit the listening address so that only clients on your internal network can connect, if your system has more than one network interface.

To specify the ports that Squid uses, follow these steps :

1. On the module’s main page, click on the Ports and Networking icon.

2. In the Proxy addresses and ports table, select the Listed below option. In the table below, each row defines a listening port and optionally an address to bind to. Any existing ports and addresses will be listed, followed by a single blank row for adding a new one. In the first empty field in the Port column, enter a port number like 8000 or 8080. In the Hostname/IP address column, either select All to accept connections on any of your system’s interfaces, or the second option to enter an IP address in the adjacent text box. Using this table, Squid can be configured to listen on as many ports as you like. However, because only one blank row appears at a time you will need to save and re-open the form to add more than one new port.

3. ICP is a protocol used by Squid to communicate with other proxies in a cluster. To listen on a port other than the default of 3130 for ICP, fill in the ICP port field. This is not generally necessary though, as only other proxies ever use this protocol.

4. Squid will normally accept ICP connections on any IP address. To change this, select the second radio button in the Incoming UDP address field and enter one of your system’s interface IPs into its text field. This can be useful if all of the other proxies that your server might want to communicate with are on a single internal LAN.

5. Click the Save button at the bottom of the page to update the configuration file with your new settings, then click the Apply Changes link back on the main page to activate them.

Article taken from http://doxfer.com/

SBDavid

Configuration Files in Webmin

Configuration Files in Webmin

Most Webmin modules work by editing configuration files on your system, like

/etc/exports for NFS shares,
/etc/passwd for users
/etc/fstab for filesystems.

Each module knows which configuration files it manages, and what commands need to be run to activate them. Not all modules actually deal with config files though - for example, the MySQL module works by executing SQL commands.

As such, it cannot participate in the configuration backup process.

More in details at http://doxfer.com/Webmin/

SBDavid

fdisk usage

fdisk is started by typing (as root) fdisk device at the command prompt, device might be something like /dev/hda or /dev/sda. The basic fdisk commands you need are:

p print the partition table

n create a new partition

d delete a partition

q quit without saving changes

w write the new partition table and exit

Changes you make to the partition table do not take effect until you issue the write (w) command.

Here is a sample partition table:

Disk /dev/hdb: 64 heads, 63 sectors, 621 cylinders
Units = cylinders of 4032 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 184 370912+ 83 Linux
/dev/hdb2 185 368 370944 83 Linux
/dev/hdb3 369 552 370944 83 Linux
/dev/hdb4 553 621 139104 82 Linux swap

The first line shows the geometry of your hard drive. It may not be physically accurate, but you can accept it as though it were. The hard drive in this example is made of 32 double-sided platters with one head on each side (probably not true). Each platter has 621 concentric tracks. A 3-dimensional track (the same track on all disks) is called a cylinder. Each track is divided into 63 sectors. Each sector contains 512 bytes of data. Therefore the block size in the partition table is 64 heads * 63 sectors * 512 bytes er…divided by 1024. (See 4 for discussion on problems with this calculation.) The start and end values are cylinders.

More .. detail at http://tldp.org/HOWTO/

SBDavid

The iostat command

The iostat command

The iostat command at its most basic provides an overview of CPU and disk I/O statistics:

root@buddies:~# iostat
Linux 2.6.27-1-i686-dream (buddies) 09/11/09 _i686_ (1 CPU)

avg-cpu: %user %nice %system %iowait %steal %idle
12.97 0.00 3.60 5.57 0.00 77.86

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 15.46 284.99 170.77 620297 371696

Below the first line (which contains the system’s kernel version and hostname, along with the current date), iostat displays an overview of the system’s average CPU utilization since the last reboot.

The CPU utilization report includes the following percentages:

Percentage of time spent in user mode (running applications, etc.)

Percentage of time spent in user mode (for processes that have altered their scheduling priority using nice(2))

Percentage of time spent in kernel mode.

Percentage of time spent idle.

Below the CPU utilization report is the device utilization report. This report contains one line for each active disk device on the system.

The Sysstat Suite of Resource Monitoring Tools

Sysstat contains the following tools related to collecting I/O and CPU statistics:

iostat
Displays an overview of CPU utilization, along with I/O statistics for one or more disk drives.

mpstat
Displays more in-depth CPU statistics.

Sysstat also contains tools that collect system resource utilization data and create daily reports based on that data. These tools are:

sadc
Known as the system activity data collector, sadc collects system resource utilization information and writes it to a file.

sar
Producing reports from the files created by sadc, sar reports can be generated interactively or written to a file for more intensive analysis.

« Prev - Next »