Chinaunix首页 | 论坛 | 博客
  • 博客访问: 283377
  • 博文数量: 121
  • 博客积分: 3050
  • 博客等级: 中校
  • 技术积分: 1262
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-25 12:18
文章分类

全部博文(121)

文章存档

2016年(3)

2011年(17)

2010年(34)

2009年(16)

2008年(40)

2007年(2)

2006年(9)

我的朋友

分类: LINUX

2009-02-24 18:42:41

闲来看着一个inetd服务的使用方法,呵呵,没事儿在linux测一下,还真有点儿用处,要是做监控什么的可以省得自己写代码做个东西了

[root@logser ~]#
[root@logser ~]# more /etc/services  |grep macer
macer           7777/tcp
[root@logser ~]# more /etc/xinetd.d/macer
# default: on
# description: The finger server answers finger requests. Finger is \
#       a protocol that allows remote users to see information such \
#       as login name and last login time for local users.
service macer
{
        socket_type     = stream
        wait            = no
        user            = nobody
        server          = /macer
        disable         = no
}
[root@logser ~]# more /macer
#! /bin/bash
echo "I Love you,you are welecom"
who
[root@logser ~]# telnet 127.0.0.1 7777
Trying 127.0.0.1...
Connected to logser.monitor.com (127.0.0.1).
Escape character is '^]'.
I Love you,you are welecom
root     tty1         Feb 25 12:45
root     pts/0        Feb 25 13:15 (192.168.1.102)
Connection closed by foreign host.
[root@logser ~]# uname -a
Linux logser.monitor.com 2.6.9-22.EL #1 Mon Sep 19 18:20:28 EDT 2005 i686 i686 i386 GNU/Linux
[root@logser ~]#
阅读(649) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~