0%

通常,我们使用的DELL/HP/IBM三家的机架式PC级服务器阵列卡是从LSI的卡OEM出来的,DELL和IBM两家的阵列卡原生程度较高,没有做太多封装,可以用原厂提供的阵列卡管理工具进行监控;而HP的阵列卡一般都做过封装了,因此需要使用自身特有的管理工具来监控。

本文以几种常用的阵列卡为例,展示其阵列卡及硬盘监控的方法。
DELL SAS 6/iR卡,全称LSI Logic SAS1068E,只支持RAID 0, RAID 1, RAID 1+0, 不支持RAID 5等高级RAID特性,不支持阵列卡电池。
DELL PERC PERC H700卡,全称LSI Logic MegaRAID SAS 2108,支持各种RAID级别及高级特性,可选配阵列卡电池。
DELL PERC H310 Mini卡 ,全称LSI Logic / Symbios Logic MegaRAID SAS 2008,支持常见RAID级别,不支持高级RAID特性,不支持阵列卡电池。
IBM ServeRAID M5014 SAS/SATA Controller卡,全称LSI Logic / Symbios Logic MegaRAID SAS 2108,支持各种RAID级别及高级特性,可选配阵列卡电池。
IBM ServeRAID-MR10i SAS/SATA Controller卡,全称LSI Logic / Symbios Logic MegaRAID SAS 1078,支持常见RAID级别,不支持高级RAID特性,可选配阵列卡电池,这个卡其实和DELL的PERC 6/i卡是一样的,都是基于LSI MegaRAID SAS 1078基础上OEM出来的。

上面是几种常见的阵列卡型号,更多的可以自行查看官方的技术手册。

下面我们要继续的是,这些阵列卡以及硬盘如何监控,阵列卡的管理也请查看官方技术手册,不在本文讨论范畴,或者查看作者的一个分享PPT:PC服务器阵列卡管理简易手册。

Read more »

这是针对上一篇How to Encrypt Your Bash Shell Script on Linux Using SHC [ZT]的延伸资料整理。

1. 动态链接

文中介绍的两种编译方式,无论是shc -r -f random.sh还是shc -v -r -T -f random.sh生成的二进制文件都是动态链接形式的,所以,在其他平台上不能运行。

2. 静态链接

不过,我们可以通过下面的方式生成一个静态链接的二进制可执行文件。

1
# CFLAGS=-static shc -r -f random.sh
Read more »

**Q: **How do I encrypt my bash shell script on Linux environment? The shell script contains password, and I don’t want others who have execute access to view the shell script and get the password. Is there a way to encrypt my shell script?

**A: **First, as a best practice you should not be encrypting your shell script. You should really document your shell script properly so that anybody who views it understands exactly what it does. If it contains sensitive information like password, you should figure out a different approach to write the shell script without having to encrypt it.

That being said, if you still insist on encrypting a shell script, you can use SHC utility as explained below. Please note that encrypted shell script created by shc is not readable by normal users. However someone who understands how this works can extract the original shell script from the encrypted binary created by shc.

Read more »

Aug 26, 2005 By Nalneesh Gaur
in Linux Journal

The shell script compiler, shc, obfuscates shell scripts with encryption—but the password is in the encrypted file. Could an intruder recover the original script using objdump?

shc is a popular tool for protecting shell scripts that contain sensitive information such as passwords. Its popularity was driven partly by auditors’ concern over passwords in scripts. shc encrypts shell scripts using RC4, makes an executable binary out of the shell script and runs it as a normal shell script. Although the resulting binary contains the encryption password and the encrypted shell script, it is hidden from casual view.

At first, I was intrigued by the shc utility (www.datsi.fi.upm.es/~frosal/sources/shc.html) and considered it as a valuable tool in maintaining security of sensitive shell scripts. However, upon further inspection, I was able to extract the original shell script from the shc-generated executable for version 3.7. Because the encryption key is stored in the binary executable, it is possible for anyone with read access to the executable to recover the original shell script. This article details the process of extracting the original shell executable from the binary generated by shc.

Read more »

For my menu of a website I want to add text-decoaration on a:hover to be the » sign/symbol.

I tried it like this:

1
2
3
4
.navbar .nav > li > a:hover:before {
content: "»";
color: #fff;
}

Any thoughts?

It needs to be in Unicode.

1
2
3
4
.navbar .nav > li > a:hover:before {
content: "\00BB";
color: #fff;
}

via:
http://stackoverflow.com/questions/13213826/use-css3-or-javascript-to-add-raquo-to-a-link-on-hover

reference:
http://stackoverflow.com/questions/8621481/removing-raquo-from-a-string-using-jquery
javascript:slicedCrumb = $(this).html().replace('/[&]raquo[;]/ ', '');
http://stackoverflow.com/questions/6202470/set-raquo-html-entity-in-javascripts-document-title
javascript:innerHTML = '»'

对于经常在 Windows 下进行 Web 开发的人来说,Fiddler 是神器。但由于它是 .Net Framework 下开发的,注定了用于 Linux 或者 Unix 之类系统上只能通过反向代理,如果不在同一个局域网内,非常麻烦。

还好在 Mac OS X 下我们还有 Charles

和 Fiddler 相比较,二者的功能不相伯仲。优势在于 Charles 跨平台能力强,Charles 支持 Windows/Mac OS/Linux,Fiddler 只能安装在 Windows 下;劣势在于 Charles 是商业软件,最便宜也得 50 美金。

Read more »

1
networksetup -listallnetworkservices

得到所有接口(interfaces).

1
networksetup -setdnsservers {INTERFACE NAME} {YOUR DNS SERVER}

设置DNS.

1
networksetup -setdnsservers {INTERFACE NAME} {YOUR DNS SERVER} {YOUR DNS SERVER}

如果有多个DNS,那么用空格隔开。

之后就可以用ifconfig查看修改了。

networksetup更多参数可以查看:
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man8/networksetup.8.html