生产中使用了SSD磁盘,使用smartctl -a /dev/sdb可以查看到该磁盘的各项值,我们可以根据这些Value和Worst等于或小于thresh时候就要注意了,下面上脚本:
#!/usr/bin/perl =head check ssd infomation usage: add "nagios ALL=(root) NOPASSWD: /usr/sbin/smartctl" to /etc/sudoers file; =cut use strict; use warnings; use Data::Dumper; us..
Perl脚本Basic Authentication方法
#!/usr/bin/perl use strict; use warnings; use HTTP::Request; use LWP::UserAgent; use Data::Dumper; use Getopt::Std; my %options = (); getopt("d:",\%options); my $debug = $options{d} || 0; my @password_array = qw(ken jack sunny ben kick); &main(@password_array..
因为在工作中,批量的上架服务器,一次几十上百台,如果手动一台一台的在SecureCRT中添加过于麻烦,于是自己编写了一个Perl脚本批量创建,好 用又快速:
1、编辑一个列表文件,包括IP和主机名的,但是IP要以lan:开头,主机名要以hostname:开头,这个绝对不会难倒你吧。
[test@mantis create_session]$ vim list
lan:192.168.21.30 hostname:test1
2、运行脚本生指定ssh端口为22
ssh用户为nagios
ssh的password为6个0,(这里输入的是SecureCRT自己加密后的字符)
指定列表文件名为..
Cacti-spine是一个替换Cacti默认Poller Type如cmd.php
1、下载Cacti-spine最新版本,(要同使用的cacti版本相匹配)
下载地址:http://www.cacti.net/downloads/spine/
2、安装(注意需要安装net-snmp-devel的包,因为需要net-snmp的.h文件)
[cacti@test-22 cacti-spine-0.8.7e]$ ./configure
--prefix=/home/cacti/apps/spine
[cacti@test-22 cacti-spine-0.8.7e]$ make -j
10
[cacti@test-22 cacti-spine-0.8.7e]$ make install
3、安装后,要对配置文件进行修改
[cacti@test-22 ~]$ vim /home/cacti/apps/spine/etc/spine...
cpulimit是一个开源的cpu使用限制工具,可以针对某个进程名、pid等来限制cpu使用率
官方网址:http://cpulimit.sourceforge.net/
安装方法非常简单
tar
zxf cpulimit-xxx.tar.gz
cd cpulimit-xxx
make
make
install(默认安装到/usr/local/bin目录)
编译后就可以使用cpulimit这个命令了(需要root权限)
使用方法如下:
[root@test-22
cpulimit-1.1]# ./cpulimit
Error: You must specify a target process
Usage:
cpulimit TARGET [OPTIONS...]
TARGET must be exactly one of these:
 ..
原因:计划在一台linux机器上mount ISO文件,由于ISO文件众多,当mount超过8个时,提示loop数过少
1、修改/etc/modprobe.conf文件a 2.6 kernel(or /etc/modules.conf on a 2.4
kernel)
----
options loop max_loop=64
----
2、umout所有的mount点,将rmmod掉loop模块(lsmod可以查看已经挂载模块)后重启系统。
另一个不需要重启的方法是在rmmod loop后再modprobe
loop,就是卸掉loop模块后,再重新加载
----
rmmod loop
----
3、重启后我们机器以查看当前的max_loop是否已经变成/etc/modprobe.conf文件中定义的大小了
d..
nagiosql是一个web配置nagios的工具,可以用web页面里添加主机、服务、主机组、服务组、命令、通知组。。。。。等等
首先我们在已经安装好apache、php、nagios目录位置如下:
apache /home/nagios/httpd
php /home/nagios/php
nagios /home/nagios/nagios
先按nagiosql官方的需求说明:
Requirements
Webserver e.g. Apache 1.x or above
PHP 4.3 or above
MySQL 4.1 or above
Nagios 2 or..
从[url]http://blog.sina.com.cn/s/blog_4c621f170100ayti.html[/url]转此帖
民间秘方,里面的方子都是一个老中医几十年的心血
民间秘方,里面的方子都是一个老中医几十年的心血~~很强~~身体不好一定要看~~转
说 明
1、 本报告所用药物,以食物为主,绝对无毒。
2、 为使读者易懂,剂量单位均用旧制,如:斤、两、钱等,有的用碗,是指一般性中碗。
3、 所用药物凡带有*记号的一般可到中药店买,药店都有。
4、 报告中所讲的醋,就是一般食用醋,如果用白醋的,报告中另有注明。
5、 ..