-

Launching of Online PC / Software shopping platform – iboss.hk

Posted by aionman on Dec 12, 2011 in Others

We are proud to launch our new online hardware and software shopping platform – iboss

 
-

Openfiler snapshots

Posted by aionman on Sep 2, 2011 in NAS

For reference to others.  Here is a playback of my solution:
SYMPTOM: Volume named “share” I was not letting be remove it because it reported a snapshot exists.
PROBLEM: Their was a manual snapshot named “snap-manual” that was not reflected properly in the web interface.
RESOLUTION:
df -k           # To see the mountpoint
umount /mnt/snapshots/vg1/share/snap-manual
lvdisplay     # To see the logical volume assigned to the mount point, note the that will be used in the following
lvremove /dev/vg1/of.snapshot.share.snap-manual
nano /opt/openfiler/etc/snapshots.xml  # Removed content between <snapshots> and </snapshots> but not headings
nano /etc/fstab     # I commented out the mount point for the snapshot in question
# Go into web interface and remove volume as desired

 
-

Viewing mailbox sizes in exchange 2007 remotely by using powershell

Posted by aionman on Aug 13, 2011 in Exchange

add-pssnapin Microsoft.Exchange.Management.PowerShell.Admin

Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label=”TotalItemSize(MB)”;expression={$_.TotalItemSize.Value.ToMB()}},ItemCount

 
-

Understanding swap files in Linux

Posted by aionman on Jun 29, 2011 in Linux

http://distilledb.com/blog/archives/date/2009/02/22/swap-files-in-linux.page

Understanding swap files in Linux

Summary If you run anything close to a modern operating system, you almost certainly interact with a swap file. You might be familiar with the basics of how these work: they allow your OS to prioritize more frequently-used pages in main memory and move the less frequently-used ones to disk. But there’s a lot going on underneath the covers. Here’s a simple guide to swap files in Linux.

To appease some of my hungrier applications and support heftier development efforts, I recently upgraded the memory on my system from 4 GiB to 8 GiB. That gave me occasion to tinker around with the swapping behavior of my system and check things out.

If you run anything close to a modern operating system, you almost certainly interact with a swap file. You might be familiar with the basics of how these work: they allow your OS to prioritize more frequently-used pages in main memory and move the less frequently-used ones to disk. But there’s a lot going on underneath the covers. Here’s a simple guide to the theory and practice of swap files in Linux, and how you can tweak things for your benefit.

An abstract memory model

It’ll be useful to have a mental model of the way memory works in general1, so we’ll start from the basis of a simple one here.

In general, all computers have access to physical memory, where the actual bits are manipulated and stored for use. Most modern operating systems present physical memory to higher-level applications as an abstraction calledvirtual memory. This allows applications to see memory as if it were a contiguous block, even though the underlying physical memory may theoretically be taken from many arbitrary, heterogeneous sources — multiple memory chips, flash memory, disk drives, and so on.

The memory manager divides virtual memory into chunks of identical size called pages. A page is the smallest amount that the OS will allocate in response to requests from programs. It is also the smallest unit of transfer between main memory and any other location, such as a hard disk. The size of a page is usually fixed by the operating system’s kernel2.

Applications see virtual memory as a contiguous resource divided into units called pages. A typical page size for a modern desktop system is about 4 kilobytes.

As pages are allocated to applications, they are assigned pages in the physical memory space through a special mapping called address translation. Applications don’t know where they are in the physical space; they see only the pages they use.

Address translation maps virtual pages onto physical pages. This mapping is transparent to applications.

The memory manager knows how to aggregate different backing stores to provide the abstraction of contiguous virtual memory. By updating the address translation mechanism so that a virtual page always points to the correct physical page, the memory manager may move pages around in physical memory without directly impacting applications.

The backing stores for pages can be quite heterogeneous.

Wide variation in different kinds of physical memory

Not every backing store displays the same storage and speed characteristics. If different types of physical memory display different characteristics, the memory manager can exploit these differences to optimize system performance. It can make intelligent decisions about which pages should go where.

Consider the difference between main memory and a hard drive, for example.

characteristic storage medium
on disk in main memory
absolute relative absolute relative
access time 5ms 10ns 500,000× faster
peak transfer rate 80 MB/s 8 GB/s 100× faster
storage space 100 GB 25× larger 4 GB
price/GB storage $0.60/GB 20× cheaper $12/GB
Some comparisons of a typical hard drive and typical main memory on a consumer-grade desktop.

Because storage on disk-backed file systems does indeed have different characteristics than storage in main memory, there’s significant room to optimize depending on the characteristics of how pages are accessed. As the table shows, hard disks are several orders of magnitude slower and less efficient at retrieving data than main memory. Thus, the memory manager needs to carefully balance the demand for memory against the different kinds of supply.

Flavors of pages

If all pages were of the same kind, deciding which pages should go where would be a simpler decision. For example, one strategy is to make the access time quickest for the pages that are accessed the most frequently. Unfortunately, it’s not just the types of memory that are heterogeneous, but also the contents of the pages that are stored there. On Linux, there are four different kinds of pages.

  • Kernel pages. Pages holding the program contents of the kernel itself. Unlike the other flavors, these are fixed in memory once the operating system has loaded and are never moved.
  • Program pages. Pages storing the contents of programs and libraries. These are read-only, so no updates to disk are needed.
  • File-backed pages. Pages storing the contents of files on disk. If this page has been changed in memory (for example, if it’s a document you’re working on), it will eventually need to be written out to disk to synchronize the changes.
  • Anonymous pages. Pages not backed by anything on disk. When a program requests memory be allocated to perform computations or record information, the information resides in anonymous pages.

When the in-memory version of a page is the same as the one on disk, we say that the page is clean; the contents are the same. But sometimes the contents of a page have been updated since the last time they were read. When this happens, the page becomes dirty.

A clean page can be repurposed for something else easily; no updates need to be made, and the page can simply be recycled. But a dirty page has to be written back to disk before it can be used again. For file pages, this is an expensive operation, so the kernel tries to avoid the overhead of flushing back to disk when it can.

For anonymous pages, there’s a different problem. Effectively, they’re always dirty: the very act of creating the anonymous page means that there is now data that is in memory which isn’t in disk. If the kernel wants to use anonymous pages for something else, it must first reclaim them. But anonymous pages have no files to back them. How can you flush something back to disk when there’s nowhere to flush it to?

Swap files

The use of swap can resolve many of these issues. Swap is a disk-backed area that’s treated as an extension of main memory. It serves as a holding area for pages that have been evicted by the kernel. Let’s use an illustrative example to show how swap files help make memory work better.

Legend for the next few diagrams. Unused pages have dotted borders; dirty pages have an alert symbol; and anonymous and file pages are colored orange and green, respectively.

When a moderately loaded system gets additional requests for memory, the kernel generally draws from the pool of free pages first to fulfill these requests. If there are few free pages remaining, the kernel tries to flush clean pages to make room for the new requests.

The kernel prefers to go after unused pages first.

If the clean pages also become depleted, the kernel is forced to clean a dirty page and then flush it. This is an expensive operation. For this reason, the kernel tries to maintain at least some clean pages all the time.

When the ratio of anonymous pages to dirty pages is high and the number of clean pages is low, the kernel is running out of memory. Without swap, this situation will require a number of costly disk writes. Consider a request for allocation when a number of dirty pages are already present.

Without swap space, it’s easier for systems to get overloaded.

In the figure above, a request for two anonymous pages has come in. There are no more unused pages, so the kernel must drop one of the existing pages to satisfy the request. The kernel can use one page freely: the single clean file page in slot 6.

But to allocate the second page, the kernel now has to flush one of the dirty file pages (in slots 1, 3, or 4) back to disk to make room. It cannot move the page in slot 5 anywhere, because it is anonymous and has no backing store; there’s nowhere else to put it. Even if this page has not been used in a very long time, it must still occupy space in memory until the process using it has released the page.

When space is tight and there’s no swap the kernel must make room by cleaning dirty pages and freeing them. In this example, the kernel is forced to clean page #1 back to disk to make room for the second allocated page.

Without swap, the kernel gets boxed into this unfortunate corner more easily.

With swap, however, the kernel gets an additional tool to use in its arsenal. Instead of being forced to clean one of the dirty pages, it can instead evict one of the anonymous pages to the swap region.

When swap is available, the kernel doesn’t need to clean dirty pages, and can instead move anonymous pages to swap.

As in the earlier non-swap scenario, the kernel use can use the clean page in slot 6 for the first requested page. It is allocated and the clean page is dropped.

For the second requested page, the kernel must no longer clean a dirty page to make room. Instead, it can simply flush one of the anonymous pages to the swap region. The code required to do this is generally very simple and significantly less complex than cleaning a dirty page, and the kernel prefers swapping to cleaning dirty file-backed pages.

Optimizing your swap settings

Linux provides a number of ways to interact with your swap. Two are detailed here:

  • Aggressiveness of swapping
  • Adding and removing additional swap containers

Controlling aggressiveness of swapping

The more aggressively the kernel swaps, the more efficiently existing memory can be put to use. Pages that look like they’re not being used will be swapped out rapidly. If the kernel swaps too often, though, applications that were using those pages will take longer to become responsive again as the kernel swaps their memory back into main memory.

For a desktop user, responsiveness of applications can be important, so an aggressive swap may not be desirable, even if it results in less efficient use of memory. For servers and other non-interactive systems, more aggressive swapping may be appropriate and acceptable.

On Linux, this careful balancing act can be configured to meet your personal preferences. The kernel swaps out pages with a zealousness controlled by a swappiness setting.

Swappiness is an integer that ranges from 0 to 100, and indicates the degree to which the kernel favors swap space over main memory. Higher swappiness means that the kernel will move things to swap more frequently. Lower swappiness means that the kernel tries to avoid using swap. A swappiness of zero causes the kernel to avoid swap for as long as possible.

Ubuntu and several other Linux distributions have a default swappiness of 60. You can check your swap setting by reading a /proc/sys value:

$ cat /proc/sys/vm/swappiness
60

To temporarily modify your swappiness, simply edit this value:

$ sudo sysctl vm.swappiness=40
vm.swappiness = 40

This setting lasts until reboot or you change it again with another sysctl vm.swappiness invocation. To make this setting take effect on every reboot, edit your /etc/sysctl.conf configuration file.

$ gksudo gedit /etc/sysctl.conf

Find the vm.swappiness line; if none exists, add it.

vm.swappiness = 40

Adding swap containers

Modern operating systems generally have either a swap partition or a swap file. In a swap partition, part of the hard drive is sliced off and becomes dedicated to swap. A swap file is just an ordinary file that holds up to its file size in swapped pages.

A swap file is considerably less complicated than a swap partition to establish. There is no speed difference between the two3, so swap files are favorable in this respect. However, if you want to be able to hibernate or suspend your computer, using a swap partition is required in some cases. (These suspend/hibernate managers usually cannot handle writing to an active file system.)

Making a new swap file is a simple process. In this example, we’ll make a 2 GiB swap file and make it available to the system as additional swap space. We’ll use primary.swap as the name of the example swap file, but there is nothing special about the name of the file or its extension. You may use anything you wish.

First, we need to create the swap file itself. We’ll use a stream of zeroes as the input source (if=/dev/zero), and write it out to a file named primary.swap in the /mnt directory (of=/mnt/primary.swap). We will write 2048 (count=2048) blocks each 1 MiB in size (bs=1M). Depending on the speed of your hard disks, this may take a little while.

$ sudo dd if=/dev/zero of=/mnt/primary.swap bs=1M count=2048
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 30.1085 s, 71.3 MB/s

Next, we need to format this file and prepare it for use as a swapping space. The mkswap utility sets up a swap area on a device or file.

$ sudo mkswap /mnt/primary.swap
Setting up swapspace version 1, size = 2097148 KiB
no label, UUID=7be2b3b6-83b0-4afd-8537-197cf12f8c59

After formatting it, the swap can now be added to our system. Use the swapon utility to activate the swap region.

$ sudo swapon /mnt/primary.swap

You can verify that your swap space is now 2 GiB larger.

$ cat /proc/meminfo | grep SwapTotal
SwapTotal:     2097144 kB

Your changes will be lost at reboot, so if you want to make them permanent we’ll need to edit your filesystem table in /etc/fstab.

$ gksudo gedit /etc/fstab

Now add your swap file to the list of filesystems to mount at boot by appending a line to the file.

/mnt/primary.swap  none  swap  sw  0 0

Removing a swap file

Removal works much the same way, but in reverse. If you’ve added your swap to the /etc/fstab list, you need to remove it here first.

To disable your running swaps, run the swapoff utility. You can either specify the swap you’d like to disable, or use the -a parameter.

$ sudo swapoff /mnt/primary.swap

When you disable swap, you force the kernel to clean every page on the swap and/or push it back to main memory. If there is not enough space to squeeze everything in, you may receive out of memory errors from the kernel, so use this judiciously.

Conclusion

Swap files are an essential part of the memory-management modules of operating systems. In Linux, adding and removing swap partitions and files is simple, and you can control how the kernel interacts with swap through configurable parameters. Through the use of these and other techniques, and with an understanding of the basics of swap, you can tweak your system’s use of memory to your heart’s content.

Additional reading

  • Speed up your system by avoiding the swap fileFOSSWire. Accessed February 8th, 2009.
  • 2.6 swapping behaviorLWN.net. Accessed February 8th, 2009.
  • Swap FAQUbuntu Documentation. Accessed February 12th, 2009.
  • Patterson, David A. and Hennessy, John L. Computer Organization and Design: The hardware/software interface. © 1997. Morgan Kaufmann Publishers, San Francisco, California.

1 As this is only a model, we will naturally be leaving off some of the important but messier details.

2 On Linux, you can check your page size with the getconf command, specifying the PAGE_SIZE parameter. This returns the number of pages in bytes. 4 kilobytes (4,096 bytes) is a typical result on the x86 and x86_64architectures, so there are 256 pages / MB.

$ getconf PAGE_SIZE
4096

3 See this Linux kernel mailing list post.

 
-

Linux log files

Posted by aionman on Jun 29, 2011 in Linux, Ubuntu

Linux Log files and usage

=> /var/log/messages : General log messages

=> /var/log/boot : System boot log

=> /var/log/debug : Debugging log messages

=> /var/log/auth.log : User login and authentication logs

=> /var/log/daemon.log : Running services such as squid, ntpd and others log message to this file

=> /var/log/dmesg : Linux kernel ring buffer log

=> /var/log/dpkg.log : All binary package log includes package installation and other information

=> /var/log/faillog : User failed login log file

=> /var/log/kern.log : Kernel log file

=> /var/log/lpr.log : Printer log file

=> /var/log/mail.* : All mail server message log files

=> /var/log/mysql.* : MySQL server log file

=> /var/log/user.log : All userlevel logs

=> /var/log/xorg.0.log : X.org log file

=> /var/log/apache2/* : Apache web server log files directory

=> /var/log/lighttpd/* : Lighttpd web server log files directory

=> /var/log/fsck/* : fsck command log

=> /var/log/apport.log : Application crash report / log file

 
-

Happy Easter Sales (Apr 11)

Posted by aionman on Apr 16, 2011 in Newsletter

Having trouble reading this mail? View it in your browser .
Happy Easter Sales
April 2011
AOC 919Vwa+ 19″ LCD
HK$ 979 $1099 Free Delivery

19 – Inch LCD Monitor

The AOC 919vwa+ offers premium picture quality for graphics-intensive applications. It comes with 10000:1 high contrast ratio, which delivers exceptional image clarity, and 170-degree viewing angle to provide increased visibility from side viewpoints. Its response time is 5ms, a key feature that prevents fast moving objects from becoming blurred.

AOC 919Vwa 19 LCD

19″ Wide Screen LCD monitor  (16:10 )

Best Resolution: 1440 x 900

Brightness: 300cd/m2(Typ.)

Contrast Ratio: 60,000:1 (Dynamic)

Response Time: 5ms (Typ), Viewing Angel: H:170o V:160o

Input: Analog (D-sub), DVI-D.  Stand: Tilt

Special Feature: HDCP, DCB, DCR, Eco Mode (5 BRIGHTESS MODE), Navigation key, Speaker (1W x 2)

Warranty: 3 years on-site Warranty, including panel, parts and Labor

More info here

Order Now Tel: 2636 6177 or email us at sales@aionsolution.com

AionNAS 1TB x 2 Network Attached Storage

HK$ 5988 $6534 Incl Installation & Del.
If you are looking for Windows file server alternative, NAS is your answer.

AionNAS 1T-RAID offers a high-performance, scalable, and full-featured network attached storage solution that meets the needs of small and medium-sized businesses that require an efficient way to centralize data protection, simplify data management, and rapidly scale storage capacity with minimal time spent on setup and management. The AionNAS is backed with AionSolution’s 3-year limited warranty.

AionNAS 1TB RAID File Server

AionNAS addresses all the key data storage concerns:

  • Reliability – AionNAS supports RAID with monitoring and alert facilities; volume snapshot and recovery
  • Availability – AionNAS supports active/passive high availability clustering, MPIO, and block level replication
  • Performance – Linux 2.6 kernel supports the latest CPU, networking and storage hardware
  • Scalability – filesystem scalability to 60TB+, online filesystem and volume growth support

Include Installation and Delivery

Order Now Tel: 2636 6177 or email us at sales@aionsolution.com
IT Maintenance for SMB

Who is AionSolution?

AionSolution is specialized in helping Small and Medium businesses manage their PCs, Servers and any devices in their Local Area Network (LAN).

Service Offer:

IT Support / Computer Maintenance / Computer Support Services Desktop Outsourcing IT Support / Helpdesk IT Outsourcing IT Consultation Network Infrastructure Design Server / Computer Maintenance Hardware / Software Sourcing

To look at our IT support Plan

This issue:
Foxconn might move iPad assembly to Brazil
New Google CEO wastes no time in management shake-up
Facebook opens its data-center kimono
Tell a Friend
Facebook Twitter More...

Call us now@ (852) 2636 6177 for a free quote

Email us at info@aionsolution.com

 
-

Distribution List Recipients Not Receiving Messages

Posted by aionman on Mar 29, 2011 in Exchange

Distribution List Recipients Not Receiving Messages
Individual users in one distribution list can’t receive messages from outside vendors who e-mail that list. How can I fix this?

Q. I’ve created a distribution list in Exchange Server 2007 for vendors to contact people in our sales department. But when someone from outside sends a message to the list the, individual users don’t receive the message. The postmaster account gets the following delivery error:
Delivery has failed to these recipients or distribution lists: DL_name@company.com Your message wasn’t delivered because of security policies. Microsoft Exchange will not try to redeliver this message for you. Please provide the following diagnostic text to your system administrator.

At the beginning of the detailed diagnostic message it states, “#550 5.7.1 RESOLVER.RST.AuthRequired; authentication required ##.”

I should point out that the distribution group works fine for users inside the company. How can I fix this error?

A. In your case, you’re using Exchange 2007 and the senders are vendors from outside your organization. By default, when you create a distribution list, the delivery is restricted to users that are authenticated. When you use the distribution list inside your organization, it works fine because the users are authenticated — but the outside vendors aren’t. Here’s what you can do to fix the problem:

Go to the distribution list’s Properties.
Click on the Mail Flow Settings tab.
Double-click Message Delivery Restrictions.
Uncheck the box “Require that all senders are authenticated.”
There’s no need to restart the computer or any of the services. Your users in the distribution list should now be able to receive messages from outside vendors.

 
-

IT Support @ HK (March 2011)

Posted by aionman on Feb 27, 2011 in Newsletter

Having trouble reading this mail? View it in your browser . 
 
IT Support @ HK
March 2011 
 
YES to your IT needs
 

All AionSolution IT Support clients can answer a resounding ‘Yes’ to the following questions. Can you?

• Do you feel your IT support company and IT Solution minimises the potential of downtime by proactively checking for and advising you of potential IT Support threats to your system?

• Are you confident your IT support company will respond to your IT Service request within a guaranteed response time?

• Does your IT support contract offer a flexible cost structure that suits your budget?

No, not ‘About Us’ – it’s about you, actually
 

If you are an SMB (Small to Medium Business) with between 1 and 100 users…your specialities may lie in finance (banking, hedge funds, stock brokers, venture capitalists, fund managers), PR and Media, accountancy, law, retail, construction or trading but you have come to realise that an effective IT solution can increase productivity, decrease costs and make life a lot easier all round.

You are looking to form a relationship based on trust with a partner specifically devoted to your IT needs and who functions like your own in-house IT department.

Well, we may have your answers.

 
IT Maintenance for SMB
 

Why choose AionSolution IT Support?

We are proud of our high client retention rate. In fact, we are so confident you’ll love our service that we won’t ask you to commit to a lengthy contract period. We want you to feel comfortable doing business with AionSolution right from the start, so if you like what you’ve heard about us so far, you can sign up straight away with 3 month probation.

To look at our IT support Plan

 
This issue:
Apple slates iPad launch event for Mar 2
Yahoo cuts 1 percent of staff while Google hires
Facebook freezes contact detail sharing feature
 
 
Tell a Friend

Share
|






 

 

 

Call us now@ (852) 2636 6177 for a free quote

How to pronounce our company name Aion? I-on.

 
-

ssh takes a long time to connect or log in

Posted by aionman on Jan 20, 2011 in Linux, Ubuntu

Large delays (more than 10 seconds) are typically caused by a problem with name resolution:

  • Some versions of glibc (notably glibc 2.1 shipped with Red Hat 6.1) can take a long time to resolve “IPv6 or IPv4″ addresses from domain names. This can be worked around with by specifying AddressFamily inet option in ssh_config.
  • There may be a DNS lookup problem, either at the client or server. You can use the nslookup command to check this on both client and server by looking up the other end’s name and IP address. In addition, on the server look up the name returned by the client’s IP-name lookup. You can disable most of the server-side lookups by setting UseDNS no in sshd_config.

 
-

Microsoft Windows XP SP3 RC Does NOT Support High Definition Audio

Posted by aionman on Jan 19, 2011 in Windows XP

Microsoft Windows XP SP3 RC Does NOT Support High Definition Audio

In Windows XP, if we need to run a High Definition Audio (HDA) device, we would have to install the Universal Audio Architecture (UAA) High Definition Audio class driver. This is either the KB835221 (for SP1) or the newer KB888111 (for SP2 or SP1).

However, this does NOT work for the latest Windows XP Service Pack 3 Release Candidate Release. If you’ve already tried installing the Windows XP Service Pack 3 Release Candidate v3264 with a High Definition Audio (HDA) device in your computer, I’ll bet you have encountered problems with the audio drivers as I did.

When you try installing the KB888111 which works for SP1 and SP2, it will not work for Service Pack 3, at least for the current SP3 RC v3264. Instead, you will be prompted with a message saying that the current service pack installed is newer than the fix you are trying to apply. Even the older KB835221 does not work.

It looks like Microsoft “forgot” to add the Universal Audio Architecture (UAA) driver for High Definition Audio devices in the latest release candidate of the Windows XP Service Pack 3. We hope they will not forget to add it into the final release. Fortunately, all is not lost. There is a way to fix this problem for the current release candidate.

You can try tinkering with the Universal Audio Architecture driver’s INF file to make your Windows XP SP3 think that the driver is meant to be installed on Service Pack 3. redxii from MSFN forum did just that and created a modified KB888111 driver which is available for download. Before I tried it out, I found that the feedbacks were all positive!

I tried it on my Windows XP SP3 system and it worked! Just download the 7z (7zip) file or zip file below, extract it and then right-click at the ? mark at the Device Manager where your High Definition Audio (HDA) device is located and reinstall the driver by pointing to the folder you extracted the files to. After that’s done, install the audio driver for your motherboard. That’s it!

If you need the fix (or add-on, as it’s called), you can download it from any one of the two links below. Have fun with Service Pack 3!

Download (right-click and save) :

Copyright © 2012 IT Support Blog All rights reserved. Theme by Laptop Geek.