TAILIEUCHUNG - Adding Swap File Space in a Linux System

The system administrator of a large company notices that one of the Linux Apache Web servers for the internal company Web site has been running slowly, and most of its resources have been used up. Most of the IT budget for the year has been spent. Therefore, adding more RAM is not an option. The administrator decides to add more swap space to the server instead. | Lab Adding Swap File Space in a Linux System Estimated Time 20 minutes Objective To assess and add swap space in a Linux Red Hat operating system. Equipment A computer with Linux Red Hat installed Scenario The system administrator of a large company notices that one of the Linux Apache Web servers for the internal company Web site has been running slowly and most of its resources have been used up. Most of the IT budget for the year has been spent. Therefore adding more RAM is not an option. The administrator decides to add more swap space to the server instead. Procedures Step 1 Assessing swap usage In order to determine how much swap space to add first look at the size of some files on the system. Determine how much memory is being used and how much is left on the system. The free command in Linux can be used to check the system memory. Type free -m -t at the shell prompt. How much physical memory is available How much physical memory is being used 1 - 2 IT Essentials II - Lab Copyright 2002 Cisco Systems Inc. Step 2 Adding a swap file To add swap space on a system add a swap file by using the following steps 1. Create a file that is equal in size to the swap file that is going to be created. Do this by using the dd command. Enter the following command at the shell prompt dd if dev zero of bs 1024 count 131072 2. The file that was created will need to be initialized. When it is initialized the Linux system can use it to swap memory to a disk. Use the mkswap command to enable Linux to use the new swap file. However the new swap file will not be active. Enter the following command at the shell prompt mkswap -f root or type sbin mkswap -f root 3. To activate this swap file use the swapon command. To make this swap file inactive use the swapoff command in place of the swapon command. Enter the following command at the shell prompt swapon root or type sbin swapon root The swap file that was .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.