06 2013 档案
摘要:给Linux系统添加磁盘空间在工作会经常遇到。在添加第二块磁盘一般系统默认为hdb(IDE硬盘)sdb(SCSI 硬盘),以hdb为例。linux-isep:~ # fdisk /dev/hdbThe number of cylinders for this disk is set to 8322.There is nothing wrong with that, but this is larger than 1024,and could in certain setups cause problems with:1) software that runs at boot time (e.g
阅读全文
摘要:对于linux新手来说,在linux上添加新硬盘,是很有挑战性的一项工作。在Linux服务器上把硬盘接好,启动linux,以root登陆。fdisk -l ## 这里是查看目前系统上有几块硬盘 Disk /dev/sda: 36.4 GB, 36401479680 bytes 255 heads, 63 sectors/track, 4425 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 255 2048256 83
阅读全文
摘要:在Linux上添加新硬盘的实例讲解,有需要的朋友可以看看。系统:Redhat AS3 UP3硬盘:scsi注意:# 表示是root用户执行的命令[root@cncmail data1]# fdisk -l ## 这里是查看目前系统上有几块硬盘Disk /dev/sda: 36.4 GB, 36401479680 bytes255 heads, 63 sectors/track, 4425 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System/dev/sda1
阅读全文
摘要:问题描述:nagios自带的check_antp太过简约,除了状态统计输出外,什么参数都不提供。在面对不同应用服务器时,报警就成了很大问题。问题描述:nagios自带的check_antp太过简约,除了状态统计输出外,什么参数都不提供。在面对不同应用服务器时,报警就成了很大问题。于是决定自己写一个check脚本。作脚本运行,与命令操作时一个不同,就是要考虑一下效率问题。在高并发的机器上定期运行netstat -ant命令去统计,显然不太合适,可以直接从proc系统中取数据,这就快多了。先介绍/proc/net/tcp文件,这里记录的是ipv4下所有tcp连接的情况,包括下列数值:sl loca
阅读全文
摘要:sqlserver2005中的万能分页存储过程。–建立主表临时表CREATE TABLE #temp(rownumber bigint,orderseqno VARCHAR(36),goodsname VARCHAR(50),companyname VARCHAR(100))–建立子表临 时表CREATE TABLE #detail(orderseqno VARCHAR(36),detailid UNIQUEIDENTIFIER,unitprice DECIMAL(12,2),Qty int)–插入主表数据到主表临时表insert into #tempSELECT oo.rownumber,
阅读全文
摘要:asp.net 上传图片并作处理(生成缩略图 、在图片上增加文字水印、在图片上生成图片水印)。方法类:upFileClass.csusing System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;/// <
阅读全文
摘要:一个备份并清除老日志Shell脚本,并附有一个清除日志(log)的shell脚本。一、备份并清除老日志Shell脚本:#!/bin/sh#backup eoslog#author www.jbxue.com#定义环境变量EOS_HOME=/home/eosSAS_HOME=/home/eos/SAS# 测试主辅结点if test -d '/home/eos/SAS/SAS1_web1'thenSAS_LOG_HOME=$SAS_HOME/SAS1_web1/SAS_Domain/binelseSAS_LOG_HOME=$SAS_HOME/SAS2_web1/SAS_Domain
阅读全文
摘要:用shell脚本判断文件或目录是否存在,判断是否有某些权限。#!/bin/sh #check file or directory or permission#edit www.jbxue.commyPath="/var/log/httpd/" myFile="/var /log/httpd/access.log" #这里的-x 参数判断$myPath是否存在并且是否具有可执行权限 if [ ! -x "$myPath"]; then mkdir "$myPath" fi #这里的-d 参数判断$myPath是否存在
阅读全文