List installed perl modules script

Source: http://www.cpan.org/misc/cpan-faq.html

#!/usr/local/bin/perl

use ExtUtils::Installed;
my $instmod = ExtUtils::Installed->new();
foreach my $module ($instmod->modules()) {
my $version = $instmod->version($module) || “???”;
print “$module — $version\n”;
}

Protected: OpenVPN installation – used on CentOS/Redhat/Fedora

This content is password protected. To view it please enter your password below:

Mount error solution – special device LABEL=/xxx does not exist

Appliies Fedora/Redhat/CentOS,etc., but I have just using the OSes mentioned:

I started to run into this with ext3 when changing mount points:
From the /etc/fstab

LABEL=/backup /backup ext3 defaults 1 2

mount /backup

Error message:
mount: special device LABEL=/backup does not exist

tune2fs -L /backup /dev/cciss/c0d2p1
tune2fs 1.39 (29-May-2006)
mount /backup

FWTK and Squid notes

Found this on the internet from 1999:

> Can anyone tell me how I can configurate Squid as an Internal
> proxy-server witch forward internal requested to a FWTK firewall.

Using the cache_peer directive, set it as a parent with the option no-query.

e.g. cache_peer fw.domain.com parent 8080 7 no-query

Clean Vista installation from upgrade disk.

Found this on this, but it was removed from the source site.

1. Boot from the Windows Vista Upgrade DVD and start the setup program.
2. When prompted to enter your product key, DO NOT enter it. Click “Next” and proceed with setup. This will install Windows Vista as a 30-day trial.
3. When prompted, select the edition of Vista which you have purchased and continue with setup.
4. Once setup has been completed and you have been brought to the desktop for the first time, run the install program from within Windows Vista.
5. This time, type in your product key when prompted.
6. When asked whether to perform an Upgrade or Custom (advanced) install, choose Custom (advanced) to perform a clean install of Vista. Yes, this means that you will have to install Vista for a second time.
7. Once setup has completed for the second time, you should be able to activate Windows Vista normally. You can also delete the Windows.old directory which contains information from the first Vista install.

Installing a Vista guest in VMWare Server Notes

Vista guests should use the E1000 virtual NIC, not the AMD Lance one. Add/replace the line in your vmx file ‘ethernet0.virtualDev = “e1000″‘

Protected: DVD Software

This content is password protected. To view it please enter your password below:

How I setup an rsync daemon on CentOS5.

How I setup an rsync daemon and used it between Fedora 5 and CentOS5:

How to start daemon on server you want to sync with:

rsync –daemon –config=/usr/local/etc/rsyncd.conf # two dashes

What is in the /usr/local/etc/rsyncd.conf. Not the most secure, but it is a start:
uid = root
gid = root
use chroot = no
max connections = 4
hosts allow 192.168.0.4
syslog facility = local5
pid file = /var/run/rsyncd.pid

[opt]
path = /opt
comment = Opt directory

[home]
path = /home
comment = Home directory

[varwww]
path = /var/www
comment = Web directories

[varspoolmail]
path = /var/spool/mail
comment = Mail spool directory

How to initate and update any changes while preserving modification times, owner, and group. Also, recursive.

On the server you want to sync to:

rsync -ptrogu rsync://servername:/directory /directory

/proc/cpuinfo document

Source for the information below.

Viewing /proc/cpuinfo will display what type of processor your system is running including the number of CPUs present.

A breakdown of the items you should look for are the following:

* processor – Provides each processor with an identifying number. If you have one processor it will display a 0. If you have more than one processor it will display all processor information separately counting the processors using zero notation.

* cpu family – Authoritatively tells you the type of processor you have in the system. If your computer is an Intel-based system, simply place the number in front of “86” to determine the value. This is helpful to determine the type of architecture of an older system and is helpful in determining which compiled RPM package would best suit that system.

* model name – Gives you the common name of the processor, including the project name.

* cpu MHz – Shows the processor’s precise speed, in megahertz, to the thousandth decimal point.

* cache size – Tells you the amount of level 2 memory cache available to the processor.

* flags – Defines a number of different processor attributes, such as the presence of a floating-point unit (FPU) and the ability to process MMX instructions.

Here is example output from cat /proc/cpuinfo of a system containing 2 CPUs. Note how processor 1 is displayed as ‘processor : 0’ and processor 2 is displayed as ‘processor : 1’ in the output:

processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Pentium(R) 4 CPU 2.80GHz
stepping : 9
cpu MHz : 2793.076
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr
bogomips : 5587.89
clflush size : 64

/proc/meminfo document

cat /proc/meminfo
MemTotal: 2075540 kB
MemFree: 210148 kB
Buffers: 653848 kB
Cached: 827688 kB
SwapCached: 0 kB
Active: 1074788 kB
Inactive: 610512 kB
HighTotal: 1179088 kB
HighFree: 200644 kB
LowTotal: 896452 kB
LowFree: 9504 kB
SwapTotal: 2096472 kB
SwapFree: 2096280 kB
Dirty: 104 kB
Writeback: 0 kB
AnonPages: 203784 kB
Mapped: 60056 kB
Slab: 164348 kB
SReclaimable: 147348 kB
SUnreclaim: 17000 kB
PageTables: 5352 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 3134240 kB
Committed_AS: 679184 kB
VmallocTotal: 114680 kB
VmallocUsed: 4188 kB
VmallocChunk: 110128 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
Hugepagesize: 4096 kB

Source for the information below.

Below you find the individual values we will discuss. First we will discuss the high-level statistics.
High-Level Statistics

* MemTotal: Total usable ram (i.e. physical ram minus a few reserved bits and the kernel binary code)
* MemFree: Is sum of LowFree+HighFree (overall stat)
* MemShared: 0; is here for compat reasons but always zero.
* Buffers: Memory in buffer cache, mostly useless as metric nowadays
* Cached: Memory in the pagecache (diskcache) minus SwapCache
* SwapCache: Memory that once was swapped out, is swapped back in, but is still in the swapfile. (If memory is needed it does not need to be swapped out AGAIN because it is already in the swapfile. This saves I/O.)

Detailed Level Statistics – VM Statistics

VM splits the cache pages into “active” and “inactive” memory. The idea is that if you need memory and some cache needs to be sacrificed for that, you take it from inactive since that is expected to be not used. The VM checks what is used on a regular basis and moves stuff around.

When you use memory, the CPU sets a bit in the pagetable and the VM checks that bit occasionally. Based on that, it can move pages back to active. Within active, there is an order of “longest ago not used” (roughly – it is a little more complex in reality). The longest-ago used ones can get moved to inactive. Inactive is split into two in the above kernel (2.4.18-24.8.0). Some have it three.

* Active: Memory that has been used more recently and usually not reclaimed unless absolutely necessary.
* Inact_dirty: Dirty means “might need writing to disk or swap.” Takes more work to free. Examples might be files that have not been written to yet. They are not written to memory too soon in order to keep the I/O down. For instance, if you are writing logs, it might be better to wait until you have a complete log ready before sending it to disk.
* Inact_clean: Assumed to be easily freeable. The kernel will try to keep some clean stuff around always to have a bit of breathing room.
* Inact_target: Just a goal metric the kernel uses for making sure there are enough inactive pages around. When exceeded, the kernel will not do work to move pages from active to inactive. A page can also get inactive in a few other ways, e.g. if you do a long sequential I/O, the kernel assumes you are not going to use that memory and makes it inactive preventively. So you can get more inactive pages than the target because the kernel marks some cache as “more likely to be never used” and lets it cheat in the “last used” order.

Memory Statistics

* HighTotal: is the total amount of memory in the high region. Highmem is all memory above (approx) 860MB of physical RAM. Kernel uses indirect tricks to access the high memory region. Data cache can go in this memory region.
* LowTotal: The total amount of non-highmem memory.
* LowFree: The amount of free memory of the low memory region. This is the memory the kernel can address directly. All kernel datastructures need to go into low memory.
* SwapTotal: Total amount of physical swap memory.
* SwapFree: Total amount of swap memory free.
* Committed_AS: An estimate of how much RAM you would need to make a 99.99% guarantee that there never is OOM (Out Of Memory) for this workload. Normally the kernel will overcommit memory. That means, say you do a 1GB malloc, nothing happens, really. Only when you start USING that malloc memory you will get real memory on demand and just as much as you use. So you sort of take a mortgage and hope the bank does not go bust. Other cases might include when you mmap a file that is shared only when you write to it and you get a private copy of that data. While it normally is shared between processes. The Committed_AS is a guesstimate of how much RAM/swap you would need worst-case.

Return top

INFORMATION