Posts

Showing posts from April, 2014

Mục đích của /var/lock/subsystem

Trích nguyên văn :) " Why do init scripts require lock files? When a service is started through an init script, a file is touched in the /var/lock/subsys/ directory with the same name as the init script. When the service is stopped, this file is removed. The contents of this file are unimportant for the scope of this article, as long as the filename is the same as the init script. This file represents that a service's subsystem is locked, which means the service should be running. Since a service may consist of multiple executables with different names, finding the process ID (PID) of a single executable may not be sufficient to determine the status of the entire service itself. For this reason, the command: service <initscript> status checks both the PID of the executable and the file in the /var/lock/subsys/ directory. If the PID is not found but the subsystem is locked, you will receive a message similar to this: <service> dead but subsys locked Managi

Sử dụng nload để mornitor traffic và bandwidth network thời gian thực

Image
Nếu bạn muốn kiểm tra xem traffic và bandwidth network hiện tại của server Linux đang quản lý như thế nào, công cụ nload sẽ giúp bạn làm điều này. Nload hoạt động khá nhẹ, kiểm tra traffic và bandwidth network realtime giúp cho người quản trị hệ thống có kênh thông tin hữu ích về hoạt động mạng hiện tại trên server. 1. Cài đặt - Download:  http://sourceforge.net/projects/nload/ Version mới nhất tại thời điểm hiện tại sử dụng trong bài viết là nload -0.7.4. - Buidl từ source code: tar xvf /path/to/nload-0.7.4.tar.gz cd /path/to/nload-0.7.4/ ./configure --prefix=/usr/local/nload make make install Trong phần cài đặt trên, mặc định tôi cài đặt nload tại thư mục /usr/local/nload. 2. Chạy nload Việc sử dụng nload khá đơn giản, ví dụ tôi cần monitor card mạng eth0, sử dụng nload như sau: /usr/local/nload/bin/nload eth0 Output sẽ hiện thị: Đối với card mạng khác sử dụng tương tự.