存档

‘linux shell’ 分类的存档

使用 cURL 度量 Web 站点的响应时间

2010年4月21日 稀饭 没有评论

[root@web-little-opt-146 NginxSoftware]# time curl -o /dev/null -s -w %{time_connect}:%{time_starttransfer}:%{time_total} http://image.kaluli.net/index/images/index/20100416/127141246304.gif
1.259:1.281:1.392
real    0m1.394s
user    0m0.002s
sys     0m0.003s

  清单 1 给出对一个流行的新闻站点执行 curl 命令的情况。输出通常是 HTML 代码,通过 -o 参数发送到 /dev/null。-s 参数去掉所有状态信息。-w 参数让 curl 写出表 1 列出的计时器的状态信息:

阅读全文…

鞋衫各式名品专卖

收藏与分享

sed1line_zh-CN

2010年2月23日 稀饭 没有评论

?Download shell.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
-------------------------------------------------------------------------
SED单行脚本快速参考(Unix 流编辑器)                       2005年12月29日
 
英文标题:USEFUL ONE-LINE SCRIPTS FOR SED (Unix stream editor)
原标题:HANDY ONE-LINERS FOR SED (Unix stream editor)
 
整理:Eric Pement  - 电邮:pemente[at]northpark[dot]edu         版本5.5
译者:Joe Hong     - 电邮:hq00e[at]126[dot]com
 
在以下地址可找到本文档的最新(英文)版本:
   <a href="http://sed.sourceforge.net/sed1line.txt">http://sed.sourceforge.net/sed1line.txt</a> 
   <a href="http://www.pement.org/sed/sed1line.txt">http://www.pement.org/sed/sed1line.txt</a> 
 
其他语言版本:
  中文          - <a href="http://sed.sourceforge.net/sed1line_zh-CN.html">http://sed.sourceforge.net/sed1line_zh-CN.html</a> 
  捷克语        - <a href="http://sed.sourceforge.net/sed1line_cz.html">http://sed.sourceforge.net/sed1line_cz.html</a> 
  荷语          - <a href="http://sed.sourceforge.net/sed1line_nl.html">http://sed.sourceforge.net/sed1line_nl.html</a> 
  法语          - <a href="http://sed.sourceforge.net/sed1line_fr.html">http://sed.sourceforge.net/sed1line_fr.html</a> 
  德语          - <a href="http://sed.sourceforge.net/sed1line_de.html">http://sed.sourceforge.net/sed1line_de.html</a> 
<!--
  意大利语      - <a href="http://sed.sourceforge.net/sed1line_it.html">http://sed.sourceforge.net/sed1line_it.html
--> 
  葡语          - <a href="http://sed.sourceforge.net/sed1line_pt-BR.html">http://sed.sourceforge.net/sed1line_pt-BR.html</a> 
<!--
  西班牙语      - <a href="http://sed.sourceforge.net/sed1line_es.html">http://sed.sourceforge.net/sed1line_es.html
--> 
  <a href="http://blog.thematice.com/html/y2010/02/23/1035/sed1line_zh-cn.html#more-1035" class="more-link">阅读全文...</a>
收藏与分享

端口扫描程序nmap使用手册

2010年2月23日 稀饭 没有评论

其实还是建议看英文的man,对以后学习其他东西很有帮助的:)

摘要
  nmap是一个网络探测和安全扫描程序,系统管理者和个人可以使用这个软件扫描大型的网络,获取那台主机正在运行以及提供什么服务等信息。nmap支持很多扫描技术,例如:UDP、TCP connect()、TCP SYN(半开扫描)、ftp代理(bounce攻击)、反向标志、ICMP、FIN、ACK扫描、圣诞树(Xmas Tree)、SYN扫描和null扫描。从扫描类型一节可以得到细节。nmap还提供了一些高级的特征,例如:通过TCP/IP协议栈特征探测操作系统类型,秘密扫描,动态延时和重传计算,并行扫描,通过并行ping扫描探测关闭的主机,诱饵扫描,避开端口过滤检测,直接RPC扫描(无须端口影射),碎片扫描,以及灵活的目标和端口设定.
阅读全文…

简单生活。简单运动

收藏与分享
分类: Linux tools, linux shell 标签: , ,

使用awk进行大小写转换

2010年1月27日 稀饭 没有评论

echo abc|tr a-z A-Z
文件大小写转换
awk ‘{print tolower($1)}’ up.txt
awk ‘{print toupper($1)}’ up.txt

收藏与分享

FUNC | Fedora特性-Smolt 解决硬件兼容烦恼

2010年1月27日 稀饭 没有评论

许多Linux爱好者购买新电脑时首先考虑的就是硬件配置是否与Linux系统兼容,实际上更多的人只是购买自己喜欢的外形和配置的电脑硬件,当他们回家安装Linux发行版时却发现很多硬件不能被系统识别和正确支持。情理之中,这些人可能就会到论坛和别人抱怨Linux是一个如何土的系统,“怎么连xx都不支持?”。

阅读全文…

收藏与分享

FUNC | 终于找到问题了(about func) [转载]

2010年1月27日 稀饭 没有评论

故障现象
1、在客户端安装好func及certmaster,配好certmaster参数。
2、service funcd start,端口及进程都起来了。
3、在certmaster server 运行certmaster-ca –list死活看不到客户端的主机名。
阅读全文…

收藏与分享

FUNC | FUNC模块学习笔记[转载]

2010年1月27日 稀饭 没有评论

* BridgeModule — Allows for simple network bridge management
————————————————————-
功能:操作网桥
方法:
list() Returns a dictionary containing the bridges and their connected interfaces.
add_bridge(brname) Creates a new bridge named brname.
add_interface(brname, ifname) Adds interface ifname to bridge brname.
delete_bridge(brname) Deletes bridge brname.
delete_interface(brname, ifname) Removes interface ifname from bridge brname.
add_promisc_bridge(brname, ifname) Creates a new bridge brname, attaches interface ifname to it and sets the MAC address of the connected interface to FE:FF:FF:FF:FF:FF, so traffic can flow freely through the bridge. This is required for use with Xen.
up_bridge(brname) Marks bridge brname and all it’s connected interfaces as up.
down_bridge(brname) Marks bridge brname and all it’s connected interfaces as down
————————————————————-
阅读全文…

收藏与分享

FUNC | Func:系统管理员的终极利器

2010年1月27日 稀饭 没有评论

我们经常需要编写内容重复的脚本,使用大同小异的正则表达式,解析花样百出的各种命令输出。我们为了实现操作审计,建立了命令行监控系统,但实际上只能起到事后追查责任的作用。我们想要监控所有新增系统,但完全依靠人执行的制度流程,难免会出现疏漏。

这些令系统管理员头疼不已的问题,可能已经有了终极解决方案。Red Hat 最近正式发布的 Fedora 统一网络控制器 Func(Fedora Unified Network Controller https://fedorahosted.org/func),就是为了解决这一系列统一管理监控问题,而设计开发的系统管理基础框架。
阅读全文…

收藏与分享

使用script记录Linux终端会话

2010年1月27日 稀饭 没有评论

许多系统管理员都知道保留一个包含各种任务、配置改变等活动日志的重要性。对一些组织而言,保留“我做了这件事”或“约翰做了那件事”的简单日志就已足够;但另一些组织则需要记录所有改变。
阅读全文…

收藏与分享
分类: Linux tools, linux shell 标签: ,

FUNC | Fedora 统一网络控制器 func 介绍

2010年1月22日 稀饭 没有评论


1. Func 简介:

  • Fedora 统一网络控制器
  • Fedora Unified Network Controller
  • 可以用在RedHat系列产品上
  • 是为了解决统一管理监控问题,而设计开发的系统管理基础框架


1.1. Func 功能特性

  • Func 可以让你在主控机上一次管理任意多台服务器,或任意多个服务器组
  • Func 命令行可以直接发送远程命令或者远程获取数据
  • Func 通讯基于 XMLRPC 和 SSL 标准协议
  • 新装服务器也可以在 Kickstart 文件中自动安装 Func,自动注册到主控服务器


1.2. Func 基于主控端与被控端

  • 建立了 Master – Slaves 主从 SSL 证书管控体系,可以将证书自动分发到所有受控服务器


1.3. Func 网络架构图

阅读全文…

收藏与分享