• Blog
  • Archives
  • Search
  • Comments
  • Tags
  • Links
  • LianDan
  • RSS

有梦就有快乐[杨恒飞]

Reg | Login

人生旅途慢慢,但有梦就会有快乐!

Total: 51Page 7 of 9« First‹ Prev3456789Next ›

阅读全文

linux下检测网关是否连线
By coldstar On 2009-11-25, 10:42 AM | Category: Linux | Comments: 0

linux下查看网关是否连线有两个命令比较直观:

1、mii-tool 可直接显示连线状态

# mii-tool
eth0: negotiated 100baseTx-FD flow-control, link ok
eth1: no link

 

2、ethtool 这是一来用来设置网卡参数的命令,当然也可以查看

#ethtool eth0
Settings for eth0:
        Supported ports: [ MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes: 10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 100Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: g
        Wake-on: d
        Current message level: 0x000000ff (255)
        Link detected: yes

#ethtool eth1
Settings for eth1:
        Supported ports: [ MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes: 10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Advertised auto-negotiation: Yes
        Speed: Unknown! (0)
        Duplex: Half
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: g
        Wake-on: d
        Current message level: 0x000000ff (255)
        Link detected: no

其中 Link detected 显示了连接状态

Read more
Tags: 网卡 , linux

阅读全文

修复/etc/fstab出错导致的无法启动
By coldstar On 2009-11-23, 1:10 PM | Category: Linux | Comments: 0

一台服务器新加一块硬盘,分区格式化后,编辑/etc/fstab实现自动挂载,结果,把分区ID给写错了,导致系统无法启动。

重启机器,提示磁盘加载错误,输入密码进入恢复模式:

vi /etc/fstab 修正错误,却提示文件系统只读,无法修改。

这时,我们可以重新 mount 根分区,即可修改,具体命令如下:

Read more
Tags: fstab

阅读全文

linux ip命令介绍
By coldstar On 2009-11-18, 8:55 PM | Category: Linux | Comments: 0

ip 是个命令!并不是通常讲的IP地址,该命令的路径为 /sbin/ip
基本上,他就是整合了 ifconfig 与 route 这两个指令罗~不过, ip 可以达成的功能却又多更多!
先看一下他的命令格式:
# ip
Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }
       ip [ -force ] [-batch filename
where  OBJECT := { link | addr | addrlabel | route | rule | neigh | ntable | tunnel |
                   maddr | mroute | monitor | xfrm }
       OPTIONS := { -V[ersion] | -s[tatistics] | -r[esolve] |
                    -f[amily] { inet | inet6 | ipx | dnet | link } |
                    -o[neline] | -t[imestamp] }

Read more
Tags: ip , linux

阅读全文

配置pure-ftpd日志 存储到/var/log/pureftpd.log
By coldstar On 2009-11-18, 11:36 AM | Category: Linux | Comments: 0

默认情况下 pure-ftpd 会将日志记录到 /var/log/message 中,大量的FTP日志感觉影响查看message信息。我们可以修改syslog的设置以使其存储在独立的日志文件中

1、编辑 /etc/syslog.conf
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none               /var/log/messages

添加 ftp.none,修改为:
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none;ftp.none               /var/log/messages

2、在 /etc/syslog.conf 最后添加一行:
# pure-ftpd logfile
ftp.*                                                   -/var/log/pureftpd.log

注意:
-/var/log/pureftpd.log  前面一个 “-”不能去掉,否则日志会在/var/log/messages与/var/log/purefpd.log里各记录一份

3、重启syslog和pureftpd 即会记录到新的路径。

Read more
Tags: pure-ftpd

阅读全文

Linux内存占用过高问题的理解
By coldstar On 2009-11-18, 10:15 AM | Category: Linux | Comments: 0

最近有个月经问题,老有人问为何开机后,还没有其他服务,mem就被用完了?是不是内存泄露?是否要重启服务?只能说不要看现象,要看本质才能找到问题的根源。
往往给出这样的结果,怀疑内存用了90%:
Mem: 4146788k total, 3825536k used, 321252k free, 213488k buffers
Swap: 2650684k total, 80k used, 2650604k free, 3006404k cached

Read more
Tags: 内存 , linux

阅读全文

解决 ip_conntrack: table full, dropping packet
By coldstar On 2009-11-11, 4:56 PM | Category: Linux | Comments: 0

IP_conntrack表示连接跟踪数据库(conntrack database),代表NAT机器跟踪连接的数目,连接跟踪表能容纳多少记录是被一个变量控制的,它可由内核中的ip- sysctl函数设置。每一个跟踪连接表会占用350字节的内核存储空间,时间一长就会把默认的空间填满,就会报错:
 ip_conntrack: table full, dropping packet

那么默认空间时多少?我以redhat为例在内存为64MB的机器上时4096,内存为128MB是 8192,内存为256MB是16376,那末就能在/proc/sys/net/ipv4/ip_conntrack_max里查看、设置。

Read more
Tags: linux
Total: 51Page 7 of 9« First‹ Prev3456789Next ›
  • View Model: Nomal | List
  • Category

    win7 (17) RSS 2.0 订阅这个分类

    Windows (39) RSS 2.0 订阅这个分类

    Linux (51) RSS 2.0 订阅这个分类

    WEB服务器 (73) RSS 2.0 订阅这个分类

    网站架构 (11) RSS 2.0 订阅这个分类

    存储与缓存 (2) RSS 2.0 订阅这个分类

    数据库技术 (20) RSS 2.0 订阅这个分类

    WEB开发 (22) RSS 2.0 订阅这个分类

    网站建设 (28) RSS 2.0 订阅这个分类

    安全相关 (24) RSS 2.0 订阅这个分类

    软件开发 (3) RSS 2.0 订阅这个分类

    网络观察 (20) RSS 2.0 订阅这个分类

    精彩瞬间 (20) RSS 2.0 订阅这个分类

    心情管理 (49) RSS 2.0 订阅这个分类

    个人收藏 (26) RSS 2.0 订阅这个分类

  • Calendar

    « 2010年07月 »
    日 一 二 三 四 五 六
    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 28 29 30 31
  • Hot Tags

    nginx win7 iis apache linux mysql 破解 管理 mssql php access 四博新云 seo 加速 驱动 centos w32dasm yum lvs asp mm rewrite gzip resin 漏洞 优化 awk 架构 cache 创业 oracle ip_hash div+css 程序员 感谢google baidu 百度 老公 女人 shutdown 服务器 apache+tomcat 黑竹沟 小小说 tomcat pure-ftpd iis7 工作 mrtg ie8
  • Comments

    学习了,谢谢!
    07-21 - ajcheng

    不知道你这里用的什么备份工具。我...
    07-19 - apple

    牛哈~~~
    07-17 - Lanyd

    仅仅是统计流量意义不大吧,已经有...
    07-17 - Lanyd

    遗憾的是我今天才发现两者的区别,...
    07-14 - coldstar

    好着了,O(∩_∩)O~
    07-13 - mjxhehe

    lvs应用至少还支持包括free...
    07-09 - dayu

    生成的临时文件仅有300M,如果...
    07-05 - coldstar

    请问下,/tmp目录需要多大才可...
    07-05 - llm_leon

    这世道有钱的就越有钱,因为钱生钱...
    06-27 - 爽爽

  • FriendLinks

    99 Roses[叶涛]

    Alibaba DBA Team

    fovweb

    Franky

    MySQL 中文网

    nginx

    sclife

    SEM一家之言

    Zac 的SEO博客

    [支付宝] 冯大辉

    回忆未来[张宴]

    好朋友

    懒人运维

    田逸的博客

    简朝阳 Sky Jian

    网易高级DBA

    脸蛋网

    花的嫁纱

    西西说

    雨·漫步

    More

  • Others

    Article 402, Comment 93.

    Powered by SaBlog-X.

    Designed by Giki+Kula.

    有梦就有快乐[杨恒飞] All rights reserved.

    陕ICP备07009322号