月度归档:2014年09月

Monitor Cisco Routers with Cacti and SNMP

Recently I had the desire to start monitoring the statistics of our internet router.  The main thing that I wanted to measure was the volume of traffic passing in from and out to the internet because the ISP limits the amount of data passing over the connection for each month.   With a tool such as Cacti we can collect these statistics via SNMP and graph them in a fairly simple way.  For details on how to set up an instance of Cacti on a CentOS Linux server go here. 继续阅读

PC 上的 LVM 灾难修复

硬盘单碟容量的快速增长和价格快速下降,为普通 PC 提供了丰富的存储空间,也带来的存储管理的需求。对于缺少昂贵硬件支撑的普通 PC 用户,Linux 上的 LVM 是一个理想的选择。对服务器用户而言,LVM 可以构建在基于 Raid 的磁盘组上,通过硬件冗余实现容灾;对于普通 PC 用户来说,可能没有那么多银子来实施,那么我们就不得不面对各种各样的窘境,譬如逻辑卷损坏,磁盘坏道,硬盘位置更改,硬盘损坏等等。好在 LVM 的开发者在设计中就包含了这些考虑,提供了一系列的方法来帮助我们解决这些问题,把数据损失降到最低。本文结合实例,分析和解决 LVM 在实用中可能遇到的各种问题。 继续阅读

HowTo : Check SSL Certificate Expiration Date from the Linux Shell

openssl x509 -noout -in <certificate> -dates

An SSL certificate contains such information as : issuer, validity dates, subject, and other stuff.

It is a quite common task to check if an SSL certificate is valid and when it expires.

You can easily use the Linux command line and the OpenSSL utility to retrieve all this information from the website’s SSL certificate.

Use the Linux command line to connect to a remote https website, decode SSL certificate and get its validity date.
继续阅读

linux shell环境减号”-“的用途

连字符:年轻人称之为dash,年长者称之为minus,英文名称hyphen(连字符),minus sign(减号),或虚线

减号”-”就是代表标准输出/标准输入, 视命令而定. “-”代替stdin和stdout的用法,stdin就是标准输入,stdout就是标准。 继续阅读

OMSA在Linux服务器上安装部署

前言

本页详述了在一台Linux(RHEL6.4 x86_64)服务器上部署安装OMSA的通用做法,包括OMSA软件的获取方法和安装步骤。

演示环境:

PowerEdge R620, RHEL 6.4 x86_64

OMSA所必须的关联安装包的安装

安装OMSA之前,我们必须确保OMSA安装所需的一些先决安装包已经安装,它们包括:

libcmpiCppImpl0
libwsman1
sblim-sfcb
sblim-sfcc
openwsman-client
openwsman-server

其中sblim-sfcb还需要先决包

cim-schema

除此之外,你可能还需要安装

libxslt

我们可以使用下面的命令来安装(假设libxslt已经安装

yum install libcmpiCppImpl0 libwsman1 sblim-sfcb sblim-sfcc openwsman-client openwsman-server

或从RHEL安装光盘Packages目录下运行

rpm -ivh libcmpiCppImpl0 libwsman1 sblim-sfcb sblim-sfcc openwsman-client openwsman-server cim-schema (此处简写,请自觉使用rpm包全名,包括版本号)

继续阅读

Cleaning‘Failed actions’message in Pacemaker/Corosync cluster setup

Sometimes when using Pacemaker/Corosync-based cluster you can see warning message in crm_mon output:

Failed actions:
drbd_mysql:0_promote_0 (node=node2.cluster.org, call=11, rc=-2, status=Timed Out): unknown exec error

To clean it up you can use command crm_resource which checks health of resources:

[root@node1 ~]# crm_resource -P
Waiting for 1 replies from the CRMd. OK
[root@node1 ~]#

To check cluster’s status run crm_mon again, warning message should be gone.

网络基本功:细说交换机

介绍

 

本节介绍交换机的帧转发技术,MAC地址表的维护方式,三种帧转发模式,以及冲突域和广播域。

更多信息

 

帧转发:

 

网络及电信中的交换概念

以太网上的帧包含源MAC地址与目的MAC地址。交换机从源设备接收到帧并快速发往目的地址。交换的基本概念指基于以下两条准则做出决策的设备:

  • 进入(ingress)端口
  • 目的地址

 

术语ingress用于描述帧通过特定端口进入设备,egress用于描述设备通过特定端口离开设备。交换机做出转发决定的时候,是基于进入端口以及消息的目的地址的。 继续阅读

网络基本功系列

网络基本功(一):细说网络传输

介绍

常言道:欲练神功,必先练好基本功。之前做了一个关于IP路由,默认网关和掩码的问答贴,做完这个帖子觉得如果对网络知识点做一个系统的阐述,应该会很有帮助。

本系列文章着重于讲解网络管理实际应用中常常涉及的重要知识点,尽量以实用为主。准备写的几个章节暂时有(可能会有增减):

继续阅读