Ubuntu mrtg交换分区

系统 Linux
Ubuntu有一个软件包叫ubuntu-calendar。安装后,软件包会每月随系统升级一起下载桌面壁纸图像。

Ubuntu的软件管理系统与Debian的相同,俱使用APT管理软件包,而同时亦有图形用户接口的Synaptic(新立得软件包管理器)可供使用。

Ubuntu mrtg交换分区 
Ubuntu mrtg切换到超级用户: 
sudo -sH 

Ubuntu mrtg建立交换分区脚本: 
mkdir /opt/mrtg 
vim /opt/mrtg/mrtg.swap 
#!/bin/bash 
# This script to monitor the swap usage. 
totalswap=`/usr/bin/free |grep Swap |awk '{print $2}'` 
usedswap=`/usr/bin/free |grep Swap |awk '{print $3}'` 
echo "$totalswap" 
echo "$usedswap" 


Ubuntu mrtg使脚本可以执行: 
chmod +755 /opt/mrtg/mrtg.swap 

修改 /etc/mrtg.cfg 在文件***加入 
Target[swap]: `/opt/mrtg/mrtg.swap` 
MaxBytes[swap]: 2048000 
Title[swap]:Memory State of Server 
ShortLegend[swap]: & 
kmg[swap]:kB,MB 
kilo[swap]:1024 
YLegend[swap]: Swap Usage 
Legend1[swap]: Total Swap 
Legend2[swap]: Used Swap 
LegendI[swap]: Total Swap 
LegendO[swap]: Used Swap 
Options[swap]: growright,gauge,nopercent 
PageTop[swap]:<H1>Swap</H1> 


重新生成索引页面: 
indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html 

访问: 
http://localhost/mrtg/

【编辑推荐】

  1. 解决Ubuntu和Fedora的“民事纠纷”
  2. Ubuntu不得不分享的24条使用经验
  3. 在Ubuntu 10.04上安装私有驱动
  4. Ubuntu家族成员 Lubuntu轻量级桌面环境体验
  5. Ubuntu小弟Jolicloud整合云计算的安装实践

 

责任编辑:chenqingxiang 来源: linuxidc
相关推荐

2010-06-09 17:11:33

Ubuntu mrtg

2009-01-14 13:19:45

Ubuntu优化swap

2010-05-31 19:56:26

Ubuntu mrtg

2010-06-07 17:18:54

Ubuntu mrtg

2010-05-31 19:35:23

Ubuntu mrtg

2010-05-31 19:51:49

Ubuntu mrtg

2010-05-31 18:49:16

Ubuntu mrtg

2011-03-31 10:31:18

Ubuntu安装MRTG

2012-12-18 15:21:21

UbuntuSwap

2011-04-02 10:29:19

2011-04-02 10:29:17

2011-04-06 11:36:32

2010-05-31 18:08:26

Ubuntu mrtg

2011-03-30 15:05:41

MRTG监控

2010-05-31 19:42:00

Ubuntu

2010-05-31 19:26:02

Ubuntu mrtg

2011-03-31 09:19:36

CISCOMRTG

2011-03-30 13:29:55

MRTG

2010-03-10 14:18:13

Ubuntu分区

2010-03-05 14:50:56

Ubuntu硬盘分区
点赞
收藏

51CTO技术栈公众号